android-remoteview

Chronometer start from specific value in Notification RemoteViews

有些话、适合烂在心里 提交于 2021-01-28 11:41:11
问题 I'm trying to start the chronometer in a new notification but from a paused(elapsed) "the elapsed time is got from another chronometer", not from zero The start base in Notification RemoteViews.class of chronometer is different from the start base in Chronometer.class it has different calculations Notification notification = new NotificationCompat.Builder(getApplicationContext()) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle(songName).build(); notification.contentView =

Notification RemoteView on click listener

三世轮回 提交于 2020-01-01 00:28:09
问题 So, after a lot of head scratching, I am at my wit's end. I have a media player RemoteViews in my notification and I would like to be able to access the play, pause, previous and next buttons. I know that setOnClickPendingIntent() will be used to communicate from the notification. However, I am left wondering how that will work. Is it possible to let the service handle the clicks? I have tried this, but in vain. I was trying to let me service handle the pause and resume of the player: rm =

Hello World For Google Glass

≯℡__Kan透↙ 提交于 2019-12-25 07:09:45
问题 I'm trying to build a simple Hello World GDK program for Google Glass. I've looked up everywhere, but all the samples I could find used "Timeline Manager", which was removed by Google after XE 16. What I'm trying to do is to create a live card that shows texts (Hello world!) in the middle. I've tried to modify codes from HERE (HuskyHuskie's answer) and HERE (IsabelHM's answer) However, no matter what I did, no option or voice command appeared on the glass even though the console showed that

TransactionTooLargeException on Samsung S7

喜你入骨 提交于 2019-12-24 00:57:07
问题 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 (NotificationManager.java:292) at android.app.NotificationManager.notify (NotificationManager.java:276) at org.mypapp.test.service.NotificationReceiverRemoteViews.updateNotification (NotificationReceiverRemoteViews.java:202) at org.mypapp.test.service

Android 4.x RemoteControlClient.setTransportControlFlags() not working?

夙愿已清 提交于 2019-12-21 04:04:41
问题 I'm trying to use the RemoteControlClient class to support the lock screen player with my app. One issue is that setting the transport control flags seems like they don't work properly. For example I'm trying to just show a play/stop icon no prev/next: mRemoteControlClient.setTransportControlFlags( RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE | RemoteControlClient.FLAG_KEY_MEDIA_STOP); This shows a previous icon and pause icon! Why? To make things even worse when pressing the stop/play

RemoteView addView not working

爱⌒轻易说出口 提交于 2019-12-18 04:46:12
问题 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 RemoteViews(context.getPackageName(), R.layout.widget_row_layout); newView.setTextViewText(R.id.textUser, "1234"); views.addView(views.getLayoutId(), newView); // Tell the AppWidgetManager to perform an update on the current App Widget appWidgetManager

Remoteview is not applied in background

試著忘記壹切 提交于 2019-12-13 10:23:53
问题 I've applied Remoteview to notification. It works when user is in foreground, but when user is in background, notification is not showed as remoteview. How can I apply remoteview when user is background? NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.doggy_downgrade3) .setVibrate(new long[] { 1000, 1000, 1000, 1000, 1000 }) .setContentTitle("Doggy") .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri)

TransactionTooLargeException while notify notification

跟風遠走 提交于 2019-12-12 23:36:45
问题 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 = new RemoteViews(getPackageName(), R.layout.notify_recording_layout); mBuilder = new NotificationCompat.Builder(mContext); isSecretModeEnable = mSharePreferencesSettings.getBoolean(RecordSettings.SECRET_MODE, false); Log.d(TAG, "isSecretModeEnable " +

Android USB Debugging Port Forward Error

旧巷老猫 提交于 2019-12-12 09:34:11
问题 I am having a problem with the android remote debug port forwarding. I need to get ports in the 44300-44399 range forward because visual studio debugging only allows SSL on those ports, but I can never get those ports to forward even though the documentation says it should work on any port from 1024-65535. Anyone encountered this or know how I can figure out why the port isn't forwarded? I know the connection is there since other ports work ok. 回答1: I found this in the Chromium source.