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
3
votes
1 answer

setBackgroundResource with RemoteViews not applying to layout

I'm trying to set the background resource of my layout in my app widget. I'm using setBackground resource with RemoteViews like so: val views = RemoteViews(context.packageName, R.layout.first_money_widget) views.setInt(R.id.widget_relativeLayout,…
Amy
  • 1,114
  • 13
  • 35
3
votes
0 answers

AdapterViewFlipper with StackView card flip action

I've been looking at the sample StackWidget app, which provides a widget having a StackView. This gives the appearance of a stack of cards, with the ability to flip between cards with a vertical swipe on the widget: I like this effect but would…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
3
votes
1 answer

Remoteview displays system notification when App is not in the foreground or not running instead of Custom Notification

First of all, let me tell you what I have done so far. I have gone through lots of searching including Remoteview is not applied in background firebase_messaging not customizing notification when an app is not in the foreground Also, I have…
Ravi Vaniya
  • 1,562
  • 1
  • 17
  • 28
3
votes
1 answer

How to show custom UI for firebase notification when the app is in background?

I use this class to show notification whit my own UI (RemoteViews) , received from firebase console. This works fine when the app is foreground , but when the app is in background, notification displayed in default style of device.What should I do…
X Fa
  • 137
  • 2
  • 9
3
votes
1 answer

RemoteViews setImageViewBitmap() not working

I am developing a simple android app with custom notifications' layouts. For this purpose I use RemoteViews. I have an ImageView inside my layout but I can't set the bitmap to it. I use this code to set a bitmap: …
TopAd Studio
  • 109
  • 6
3
votes
1 answer

Bitmap won't show in a RemoteView

When I put a text and a bitmap into an app they both work. The code is: TextView textView = findViewById(R.id.textView); textView.setText("This works"); ImageView testView = findViewById(R.id.imageView); testView.setImageBitmap(bitmap); If I try to…
Lyle G
  • 31
  • 4
3
votes
0 answers

TransactionTooLargeException while notify notification

I have update time while recording in android, I using CountDownTimer and update to remote view on notification. I have optimized smallest data but still get TransactionTooLargeException. public void showNotificationRecording() { mRemoteViews =…
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
2 answers

Notification contentView and bigContentView are null in Android 7

Part of my application consists in a custom lockscreen which needs to show notifications as normal android lockscreen does. Everything works fine until Android 6, I used a NotificationListenerService to retrieve notification contentView and…
target33
  • 78
  • 9
3
votes
1 answer

Is there any way to use setColorFilter(int color, PorterDuff.Mode mode) in RemoteViews while working on app widget provider

I am working on an android app widget. Where I've to use setColorFilter with mode PorterDuff.Mode.MULTIPLY. Currently I am using: remoteViews.setInt(R.id.image, "setColorFilter", R.color.color_1); where I only can tint with color. But I need to…
Mostafa Imran
  • 659
  • 2
  • 9
  • 28
3
votes
1 answer

Android: programmatically adding buttons to notification

I am trying programmatically add Imagebuttons to notification, but I cannot find work method for this. I know this is possible, because I saw similar app This is how I build notification: public class MyNotification extends Notification { private…
BrickT
  • 59
  • 1
  • 7
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
1 answer

How to notify Android Widget to redraw

I have an Android Widget using RemoteViewsFactory in order to populate a ListView. My data source is an asynchronous JSON call which can be done at any time (it's not a push notification). Right now the code is located in onDataChanged and looks…
automaton
  • 1,972
  • 5
  • 25
  • 40
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
1 answer

Android - Appwidget with Remoteviews not updating after reboot

I saw similar questions here on SO, but nothing seems to work in my case... I created an appwidget with an AdapterViewFlipper (Simple ViewAnimator that will animate between two or more views that have been added to it). The appwidget has a Next…