У меня есть следующие журналы, при этом нажимая на уведомление. Когда я нажимаю на уведомление, оно не принесло приложение на передний план или открыть приложение. Это происходит только в Kitkat, на протяжении других работ.09-20 12:14:43.390 3076-3076/com.testapp E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
09-20 12:14:43.390 3076-3076/com.testapp E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
09-20 12:14:43.410 3076-3263/com.testapp E/MyGcmListenerService: Bundle[{google.sent_time=1505889885380, gcm_order=3, title=Test 1, google.message_id=0:1505889885603858%e6c595e0f9fd7e12, message=Test 1}]
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.430 3076-3263/com.testapp W/dalvikvm: VFY: unable to resolve instance field 20
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: VFY: replacing opcode 0x5b at 0x005d
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.440 3076-3263/com.testapp W/dalvikvm: VFY: unable to resolve instance field 20
09-20 12:14:43.440 3076-3263/com.testapp D/dalvikvm: VFY: replacing opcode 0x5b at 0x004c
09-20 12:14:43.450 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.450 3076-3263/com.testapp I/dalvikvm: DexOpt: unable to optimize instance field ref 0x0014 at 0x54 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
09-20 12:14:43.450 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.450 3076-3263/com.testapp I/dalvikvm: DexOpt: unable to optimize instance field ref 0x0014 at 0x61 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
09-20 12:14:43.460 3076-3263/com.testapp D/NotificationManager: com.testapp: notify(1000, Notification(pri=0 contentView=com.testapp/0x10900cf vibrate=default sound=default defaults=0x3 flags=0x10 kind=[null]))
< /code>
Вот мой код: < /p>
android.support.v4.app.NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(getApplicationContext())
.setSmallIcon(getNotificationIcon())
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher))
.setContentTitle(title)
.setContentText(message)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setAutoCancel(true);
Intent notificationIntent = new Intent(this, activityName);
notificationIntent.putExtras(data);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(contentIntent);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(BROADCAST_NOTIFICATION_ID++, mBuilder.build());`
Подробнее здесь: https://stackoverflow.com/questions/463 ... foreground
Android Kitkat выпуск: приложение не вышло на передний план ⇐ Android
Форум для тех, кто программирует под Android
-
Anonymous
1755333341
Anonymous
У меня есть следующие журналы, при этом нажимая на уведомление. Когда я нажимаю на уведомление, оно не принесло приложение на передний план или открыть приложение. Это происходит только в Kitkat, на протяжении других работ.09-20 12:14:43.390 3076-3076/com.testapp E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
09-20 12:14:43.390 3076-3076/com.testapp E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
09-20 12:14:43.410 3076-3263/com.testapp E/MyGcmListenerService: Bundle[{google.sent_time=1505889885380, gcm_order=3, title=Test 1, google.message_id=0:1505889885603858%e6c595e0f9fd7e12, message=Test 1}]
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.430 3076-3263/com.testapp W/dalvikvm: VFY: unable to resolve instance field 20
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: VFY: replacing opcode 0x5b at 0x005d
09-20 12:14:43.430 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.440 3076-3263/com.testapp W/dalvikvm: VFY: unable to resolve instance field 20
09-20 12:14:43.440 3076-3263/com.testapp D/dalvikvm: VFY: replacing opcode 0x5b at 0x004c
09-20 12:14:43.450 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.450 3076-3263/com.testapp I/dalvikvm: DexOpt: unable to optimize instance field ref 0x0014 at 0x54 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
09-20 12:14:43.450 3076-3263/com.testapp D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
09-20 12:14:43.450 3076-3263/com.testapp I/dalvikvm: DexOpt: unable to optimize instance field ref 0x0014 at 0x61 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
09-20 12:14:43.460 3076-3263/com.testapp D/NotificationManager: com.testapp: notify(1000, Notification(pri=0 contentView=com.testapp/0x10900cf vibrate=default sound=default defaults=0x3 flags=0x10 kind=[null]))
< /code>
Вот мой код: < /p>
android.support.v4.app.NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(getApplicationContext())
.setSmallIcon(getNotificationIcon())
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher))
.setContentTitle(title)
.setContentText(message)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setAutoCancel(true);
Intent notificationIntent = new Intent(this, activityName);
notificationIntent.putExtras(data);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(contentIntent);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(BROADCAST_NOTIFICATION_ID++, mBuilder.build());`
Подробнее здесь: [url]https://stackoverflow.com/questions/46315201/android-kitkat-issue-app-did-not-come-to-foreground[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия