草庐IT

notification-listener

全部标签

android - 如何在 Notification 中选取文本内容?

只是文本内容太长,无法显示在通知中,被剪切了。我能做些什么?请帮忙。 最佳答案 试试这个:它对我有用,我已经测试过了。首先创建自定义通知:如图所示:ThisLinkofthedevelopersite.之后,在您想要选取框的消息的TextView中,放置以下行:android:ellipsize="marquee"它如您所愿。享受。希望它能帮助你。谢谢。 关于android-如何在Notification中选取文本内容?,我们在StackOverflow上找到一个类似的问题:

android - smack packet listener 和 message listener 的区别

您好,我正在创建一个android应用程序作为ejabbered服务器的XMPP客户端。但我真的很困惑,因为我看到我可以将消息作为数据包或消息发送,我也可以使用PacketListener和MessageListener接收消息。PacketListener和MessageListener有什么区别,哪个是接收消息的好方法?使用数据包监听器或消息监听器? 最佳答案 MessageListener只监听与消息相关的数据包,而PacketListener监听各种数据包,可能包括消息相关数据包、订阅相关数据包、邀请相关数据包,如果没有,它

android - onSaveInstanceState 中的保存接口(interface)(Listener)

保存实例状态对于Integer、Long、String等数据,我只是将其放入bundle中,并在再次调用onCreateView时将其取回。但是我的fragment也有像下面这样的听众,publicclassSomeFragmentextendsFragment{publicinterfaceSomeListener{publicvoidonStartDoingSomething(ObjectwhatItIsDoing,Datewhen);publicvoidonDoneDoingTheThing(ObjectwhatItDid,booleanresult);}privateSomeF

Android 后台堆栈不是从 Notification PendingIntent 创建的

如果遵循通知时应用程序不在内存中,我会遇到问题。不会创建后台堆栈。我已经按照开发人员指南执行了这些步骤。请告诉我我错过的一点,否则我将不得不通过我的HomeActivity路由所有Intent,以便根据以下Intent手动创建后台堆栈。AndroidManifest.xml:建筑通知:finalStringchatId=cursor.getString(cursor.getColumnIndexOrThrow(MessageColumns.CHAT));finalIntentchat=newIntent(c,ChatActivity.class);chat.putExtra(ChatA

机器人 : GIF animation cycle complete Listener

我有一张GIF图片,想在启动画面中加载。我遇到了几个图书馆,比如android-gif-drawable和Glide有什么方法可以听一个动画周期完成吗?我的意思是一旦动画周期完成(整个动画完成,不重复)我想要一个监听器,动画完成,并为我们提供一些回调。有点像:SomeLibrary.load("GIF").into(imageview).repeat(false).setOnAnimationCompleteListener(newOnAnimationCompleteListener(){publicvoidonAnimationComplete(){//Animationiscom

java - 如何为跨类 Volley 方法调用创建合适的 Volley Listener

我的目标是从另一个类调用Volley,这是一种非常简洁、模块化的方式,即:VolleyListenernewListener=newVolleyListener();VolleySingleton.getsInstance().somePostRequestReturningString(getApplicationContext(),newListener);JSONObjectdata=newListener.getResponse();但是我在让监听器部分工作以便能够从诸如的方法访问结果数据方面遇到了很多麻烦newListener.getResponse();本网站上有几个问题大

android - Cordova 安卓 : An error occurred while listening android targets

我已经阅读了所有关于相同问题的问题,并且尝试了所有方法,但是当我尝试为cordova添加android平台时,没有任何效果。c:\Apps\fapp>cordovaplatformaddandroidCreatingandroidproject...C:\Users\Andrej\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.js:126throwe;^Error:AnerroroccurredwhilelistingAndroidtargetsatC:\Users\Andrej\.cordova\lib\android

android - 为 Android 中的新 "Listen To"操作开发

我正在完成Android应用程序的开发,以便在时间允许的情况下使用DAAP和UPnP以及其他协议(protocol)从您的个人音乐收藏中流式传输音乐。我的问题是:如何让我的应用程序响应Android中新的“收听”语音命令?我找遍了,没弄明白。我假设它是一个广播接收器,但我怎么也找不到是哪个。非常感谢任何帮助。 最佳答案 就像@JoshLee提到的链接解释的那样,您只需要在应用程序的list文件“intent-filters”部分中注册您的应用程序的新Intent,例如:然后确保您:importandroid.app.SearchMa

android - Android系统杀死进程: does the on going notifications are removed too?

我的应用程序正在使用持续通知。我注意到当我通过DDMS终止我的应用程序时,正在进行的通知不会被取消。但是,当我执行Eclipse→运行时,进程被终止并且通知被取消。当Android系统决定终止我的应用程序时会发生什么?通知是否已取消或Android是否只是终止进程而不进行任何清理?编辑:如果完成了一些清理,我如何模拟此行为以测试我的应用程序是否正常运行? 最佳答案 两者是有区别的。在Eclipse中,“kill”会杀死JVM线程,一切都会被销毁。当Android操作系统(或DDMS)决定终止一个应用程序时,killProcess(i

android - 解析 CorodvaPush Ionic : Android doesnt show notifications when app in background

我的插件有问题。当我在应用程序中并使用Parse发送通知时,我会收到一strip有消息的警报(这按预期工作)。但是,当应用程序处于后台时,手机上没有任何显示。以下是我如何使用插件以及如何处理通知:vargmcId="xxxxxxx";varandroidConfig={senderID:gmcId};document.addEventListener("deviceready",function(){$cordovaPush.register(androidConfig).then(function(result){console.log("result:"+result);},fun