草庐IT

notification-listener

全部标签

android - 如何知道Android Notification大图样式中的图片大小?

AndroidBigPictureStyleNotification 最佳答案 BigPictureStyle通知图像的大小最小-512x256平衡-1024x512最大-2048x1024从这个答案中得到https://stackoverflow.com/a/33391039/5783417Note:Insmallerdevices(800x480),thereisstillacentercropoccurring 关于android-如何知道AndroidNotification大图

android - Notification PendingIntent Intent extras 被另一个通知覆盖

使用新的PendingIntent创建新通知时,其Intent中的额外内容会覆盖任何先前通知的PendingIntentIntent额外内容。例如,假设我使用PendingIntent1创建了Notification1,它具有Intent1及其附加功能。当我使用PendingIntent2创建Notification2时,Intent2具有自己的不同额外功能,Intent1现在将具有与Intent2相同的额外功能。为什么会这样?我该如何解决这个问题? 最佳答案 有两种方法可以解决这个问题:一种是在Intent上设置不同的action

android - NotificationListenerService中如何获取Notification内容详情

我想获取RemoteView的内容详情来自StatusBarNotification边听NotificationListenerService我怎样才能得到它? 最佳答案 解决方法RemoteViewsremoteView=statusBarNotification.getNotification().contentView; 关于android-NotificationListenerService中如何获取Notification内容详情,我们在StackOverflow上找到一个类

安卓 Firebase 数据库 : Single data fetch without event listener

现在,以下是我在Firebase数据库控制台中的数据库层次结构。我正在使用以下代码将数据输入到firebase数据库中。publicvoidcreateRecordInDB(PlaceListItemplaceListItem){mDB=FirebaseDatabase.getInstance().getReference();mListItemRef=mDB.child("Places");for(inti=0;iresult=newHashMap();result.put(key,placeDBModel);mListItemRef.updateChildren(result);}

android - Firebase Android : slow "join" using many listeners, 似乎与文档相矛盾

实现一个Android+Firebase应用,多对多关系:UserWidget(Widget可以共享给多个用户)。注意事项:列出用户拥有的所有小部件。用户只能看到共享给他/她的小部件。能够查看共享给定Widget的所有用户。单个Widget可以由具有同等权利的多个用户拥有/管理(修改Widget并更改它的共享对象)。类似于Google云端硬盘向特定用户共享的方式。实现抓取(连接式)的方法之一是遵循以下建议:https://www.firebase.com/docs/android/guide/structuring-data.html("JoiningFlattenedData"):/

android - RemoteServiceException : Bad notification for startForeground: java. util.ConcurrentModificationException

android.app.RemoteServiceException:BadnotificationforstartForeground:java.util.ConcurrentModificationExceptionatandroid.app.ActivityThread$H.handleMessage(ActivityThread.java:2204)atandroid.os.Handler.dispatchMessage(Handler.java:108)atandroid.os.Looper.loop(Looper.java:166)atandroid.app.Activit

Android Status Bar Notifications - 选择通知时打开正确的 Activity

我遇到了一个问题,即单击通知后无法打开/转到正确的Activity。我的通知代码(位于扩展服务的类中):Contextcontext=getApplicationContext();CharSequencecontentTitle="Notification";CharSequencecontentText="NewNotification";finalNotificationnotifyDetails=newNotification(R.drawable.icon,"Consideryourselfnotified",System.currentTimeMillis());Inten

android - 解析 : send push notifications from app

我想知道如何使用我的应用程序直接从我的Android应用程序向其他人发送解析推送通知。可以这样做吗? 最佳答案 如果您想使用Parse,请转到解析仪表板,在那里您会看到推送设置,您可以在其中找到此客户端推送设置。ParsePushpush=newParsePush();Stringmessage="Clientmessage"+Integer.toString(i++);push.setChannel("ChannelName");push.setMessage(message);push.sendInBackground();

Android Volley 库 : do we always have to repeat Response. Listener 和 Response.ErrorListener

我最近开始在我的项目中使用AndroidVolley。大多数教程中提到的常见做法是这样使用它:JsonObjectRequestjsonObjReq=newJsonObjectRequest(Method.GET,url,null,newResponse.Listener(){@OverridepublicvoidonResponse(JSONObjectresponse){//dosomething}},newResponse.ErrorListener(){@OverridepublicvoidonErrorResponse(VolleyErrorerror){//dosometh

android - NotificationManager.cancel() 不起作用 : Notification isn't removed

我一直在尝试使用以下方法删除由服务设置的持久通知:startForeground(1337,notification);我用来取消它的代码:NotificationManagernManager=(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);nManager.cancel(1337);//cancelexistingservicenotification,doesn'ttakeeffectnManager.cancelAll();//surpluous,butalsodoesn't