小编Mah*_*hdi的帖子

点击通知后打开应用程序

我的应用程序中有一条通知,代码如下:

public class NewMessageNotification {

    private static final String NOTIFICATION_TAG = "NewMessage";

    public static void notify(final Context context,
                          final String exampleString,final String boday ,final int number) {
         final Resources res = context.getResources();

         // This image is used as the notification's large icon (thumbnail).
         // TODO: Remove this if your notification has no relevant thumbnail.
        final Bitmap picture = BitmapFactory.decodeResource(res, R.drawable.billsms);


        final String ticker = exampleString;
        final String title = res.getString(
            R.string.new_message_notification_title_template, exampleString);
        final String text = boday;

        final NotificationCompat.Builder builder …
Run Code Online (Sandbox Code Playgroud)

android android-notifications

1
推荐指数
1
解决办法
6862
查看次数

标签 统计

android ×1

android-notifications ×1