Questions tagged [remoteview]

A class specific to Android that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.

A RemoteView is a class specific to Android that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.

This is specific to Android, this tag should be typed as per the Android Tag Info.

331 questions
32
votes
2 answers

AppCompat 23.2 use VectorDrawableCompat with RemoteViews (AppWidget) on API<21

I have an AppWidget and I'd like to use VectorDrawables in it also on pre-Lollipop devices. VectorDrawableCompat won't work with the RemoteViews I create. To keep my app APK size down, I don't want to add alternative PNG versions of my drawables for…
16
votes
2 answers

Couldn't Expand RemoteViews - Bad notification

Lately I've been receiving more and more reports of users getting a RemoteServiceException error. The stack trace i'm given every time is as follows: android.app.RemoteServiceException: Bad notification posted from package…
roarster
  • 4,058
  • 2
  • 25
  • 38
15
votes
1 answer

How to use Glide in remoteViews?

I'm using Glide for all loading images from server, but I'm having troubleshooting trying to set them in a correct way to notifications and RemoteControlClientCompat (that cool thing with lock screens). I am developing a music player, so every time…
14
votes
2 answers

Reliable way of retrieving StatusbarNotification details (title, notification text)

I'd like to get as much information out of a StatusBarNotification-object as possible. Right now, the only "reliable" information that can be accessed is the tickerText-property. I'm using the following code to get the notification's title and text…
Nick
  • 3,504
  • 2
  • 39
  • 78
12
votes
3 answers

Load ImageView from URL into RemoteView of a Home Screen Widget

I'm developing a simple Widget to my Android app based on the Google StackWidget sample: https://android.googlesource.com/platform/development/+/master/samples/StackWidget/src/com/example/android/stackwidget/StackWidgetService.java I'm using the…
12
votes
2 answers

Get Android notification panel width

I'm creating some custom remoteViews, In order to draw custom views and layouts to a bitmap as wide as the notification panel I need its exact width. As every vendor changes the width of the notification panel and in most cases it will changes based…
11
votes
4 answers

Glide: load image to push notifications

I am trying to load an image to a push notification using Glide but it says this: FATAL EXCEPTION: Thread-9730 Process: com.monkingme.monkingmeapp, PID: 24226 java.lang.IllegalArgumentException: You must call this method on the main thread at…
Damia Fuentes
  • 5,308
  • 6
  • 33
  • 65
11
votes
3 answers

Android notification with RemoteViews - having activity associated with RemoteViews layout

I've been researching on how to create custom-layout notification using RemoteView. So far, I am able to create a notification with contentView and bigContentView pointing to a RemoteView with a custom layout xml. However, what does not happen, is…
Siniša
  • 2,988
  • 4
  • 24
  • 36
11
votes
1 answer

RemoteViewsFactory called getViewAt when empty dataset

I'm working on widget for my application which based on StackView and should display some items. Count of items can vary due to user actions - lets say it is some kind of favorites menu. I have implemented RemoteViewsFactory descendant to generate…
Viacheslav
  • 5,443
  • 1
  • 29
  • 36
10
votes
1 answer

remoteview framelayout background color

int mColor = 0xff00ff00; remoteView.setInt(R.id.framelayout1, "setBackgroundResource", android.R.color.white); how do i set the color using mColor ?
mr bum
  • 194
  • 2
  • 10
10
votes
1 answer

How Can I to Change Text Size in RemoteViews

Under RemoteViewsService.RemoteViewsFactory public RemoteViews getViewAt(int position) { final int itemId = (position % 2 == 0 ? R.layout.light_widget_item : R.layout.dark_widget_item); RemoteViews rv = new…
fury
  • 132
  • 1
  • 8
10
votes
1 answer

RemoteView addView not working

I have an app widget and I'd like to add Views (TextView, etc.,) to the RemoteView but it never shows up. Here goes the code: RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout); RemoteViews newView = new…
Tony G.
  • 220
  • 1
  • 3
  • 11
10
votes
1 answer

appwidget freezes and refuses to update anymore: ignores updateAppWidget

So I have an app widget that is refreshing nicely, loading a new bitmap into an ImageView regularly like clockwork. Then, at some point, and silently, it will stop updating any further. I can tell from the log, and from activity at a server which…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
10
votes
5 answers

Passing custom parcelable object extra or in ArrayList to RemoteViewsService breaks appwidget

Basically what i want to do, is to pass a custom parcelable object via an intent, to the RemoteViewsService and thus to my RemoteViewsFactory. For some reason, this simply doesnt work :S Whenever i attempt to do this, the widget ends up displaying…
Chris6647
  • 178
  • 1
  • 2
  • 13
9
votes
2 answers

RemoteViews setViewVisibility on Android Widget

In my AppWidgetProvider, I do following: @Override public void onReceive(Context ctx, Intent intent) { final String action = intent.getAction(); if (action.equals(NEXTPAGE_ACTION)) { AppWidgetManager appWidgetManager =…
trigger
  • 141
  • 1
  • 2
  • 3
1
2 3
22 23