显示在接收短信的机器人TOAST [英] display android TOAST on receive of sms

查看:207
本文介绍了显示在接收短信的机器人TOAST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个应用程序,它显示了短信举杯工作是received.i要显示无论是短信内容或短信已收到只是一个通知。
我使用的机器人工作室。并且是新来的吧。请帮助..

i am working on an app which shows a toast on sms is received.i want either sms content to be displayed or just an notification that sms has been received. I am using android studio. and am new to it. please help..


推荐答案

如果您的应用程序在Android版本> 3.0上运行,你必须包括活动用户可以手动启动安装后带来的应用走出了的停止状态的,一个的概念的Andr​​oid 3.1 介绍。该系统将不会播出的停止的应用程序,让你的广播接收器将无法工作,直到应用程序已经被用户明确启动。

If your app is running on an Android version > 3.0, you'll have to include an Activity that the user can start manually after installation to bring the app out of its stopped state, a concept introduced in Android 3.1. The system will not broadcast to stopped apps, so your BroadcastReceiver won't work until the app has been explicitly launched by the user.

除此之外,您的code似乎是正确的。

Apart from that, your code appears to be correct.

这篇关于显示在接收短信的机器人TOAST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆