Questions tagged [android-remoteview]

134 questions
3
votes
0 answers

RemoteView get assigned Resource

Is there a way to get the assigned "ImageViewResource" or Bitmap of a RemoteView? I can successfully set the resource invoking remoteViews.setImageViewBitmap or remoteViews.setImageViewResource. Background info: I want to set a default image in a…
ale974
  • 39
  • 4
3
votes
0 answers

Inflating RemoteViews with ImageView and Support Library 25.3 -> 26+ AppCompatImageView

I have a RemoteViews instance, received from another app as parcelable data. I cannot simply change the service result (still have to provide backwards compatibility). The received RemoteViews has a simple layout: a LinearLayout container, with a…
3
votes
1 answer

None of the methods in RemoteViewsFactory is getting called at all

I have tried my best to follow the directions on developer.android.com but seems like I have a stupid error somewhere that I cannot figure out. After continuous logging, I realized that none of the methods run in my implementation of the…
Khanal
  • 788
  • 6
  • 14
3
votes
4 answers

Android: loading bitmap from local storage into app widget (RemoteViews)

Until now I've been loading a bitmap into my RemoteViews directly using remoteViews.setImageViewBitmap(). It's working fine in general. But a couple of users are having issues, and I think it is when loading in a bitmap that is very large. I cache…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
3
votes
2 answers

What is package name in the RemoteViews constructor?

From the documentation, the constructor of RemoteViews is public RemoteViews (String packageName, int layoutId) The documentation says that packageName is "Name of the package that contains the layout resource". Why is this needed? Wouldn't the…
committedandroider
  • 8,711
  • 14
  • 71
  • 126
3
votes
2 answers

Customize Notification Area in Android

I am using RemoteViews to create a custom notification. Is there any way to customize the Notification Area Specially Height...??? I don't want to use BigView coz i need use it for APIs less than 11. The sanpshots are : Here is my code : public…
3
votes
0 answers

Custom Notification update on click

I am using custum notifiation by creating a layout.I want ot change the background of ImageView in custom notification layout when i click that image in notification.. I want to do this without re creating the whole notification, just change the…
2
votes
1 answer

How does Jetpack Glance widget works without XML? How does it convert to RemoteViews?

Jetpack released a tool called "Glance" that we can replace RemoteViews XML widgets. I wonder how it converts compose layouts to RemoteViews.
2
votes
1 answer

Dark notification on Android 10 with Remote View

Getting Dark (black) notification as per image shown here when I changed display mode to Dark in Android 10. I tried to change text color but it is not reflating. I am using Remote view to create custom notification. How to change remote content…
Nik
  • 1,991
  • 2
  • 13
  • 30
2
votes
1 answer

Textview drawable does not show the drawable image in a remote view

I am trying to display the drawable text view in an Android notification but the text is being displayed, but the drawable is not being displayed. I want the drawable image to be displayed along with the text message. I have tried adjusting the…
Krish
  • 63
  • 6
2
votes
1 answer

Andoroid how add video and GIF in android local notification?

Is it possible too embedded video and gif player into android rich notification like iOS? If possible, please give me an example. Thanks in advance.
2
votes
1 answer

How does RemoteViewsFactory handle ViewTypes in Android?

As there is no getItemViewType() method in RemoteViewFactory - how does it actually determine the ViewType? I just stumbled upon a case where I DEFINITELY had only 4 viewTypes, but kept getting display errors ("loading..." for one item) and a log…
2
votes
1 answer

TransactionTooLargeException on Samsung S7

one of my apps is throwing the following exception on an Samsung S7: java.lang.RuntimeException: at android.app.NotificationManager.notifyAsUser (NotificationManager.java:342) at android.app.NotificationManager.notify…
edmond
  • 833
  • 3
  • 13
  • 31
2
votes
2 answers

How to pin notification always on the top of notification bar

I am trying to fix four buttons always at the top of notification bar that cannot be closed. The buttons will be fixed all the time when the application is launched for the first time. For this purpose I am creating notification through Notification…
2
votes
0 answers

"Bad notification posted - Couldn't expand RemoteViews for: StatusBarNotification" is raised when my app is removed from recent apps

I'm trying to make an demo which can show a custom notification periodically. To do that, I used Remoteviews to update the view of a notification. Put this notification into onReceive method of an BroadcastReceiver. Then call it periodically by…
1 2
3
8 9