1
Я пытаюсь загрузить изображение на пуш уведомления с помощью Glide, но говорит, что это:Glide: изображение нагрузка Push Notifications
FATAL EXCEPTION: Thread-9730
Process: com.monkingme.monkingmeapp, PID: 24226
java.lang.IllegalArgumentException: You must call this method on the main thread at com.bumptech.glide.util.Util.assertMainThread(Util.java:135)
И код используется:
NotificationTarget notificationTarget = new NotificationTarget(
context,
rv,
R.id.remoteview_notification_icon,
notification,
NOTIFICATION_ID);
Glide.with(context.getApplicationContext())
.load(item.getString("cover_img"))
.asBitmap()
.placeholder(placeholder)
.error(placeholder)
.into(notificationTarget);
Я использую MessageHandler от Aerogear ->https://aerogear.org/docs/guides/aerogear-android/push/
Дело в том, что в push-уведомлении приложение не работает, поэтому нет основного потока. Любое предложение?