Is there a possibility of handling the data displayed on call cost dialogue received by prepaid user. I want to save all the balance reduction for along with call duration in my sqlite db.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
As we learn from the already famous blog post
where to start at? the best is to follow this even more famous blog post
First of all, we understand the basics:
IExtendedNetworkService
interface."com.android.ussd.IExtendedNetworkService"
, so it will have the correspondent intent filter in the app manifest.com.android.phone.PhoneUtils
will bind to this service. (If you dont know what binding a service is, refer to here)Let`s get into it.
First, the receiver, this is the easy part. We make a file called BootReceiver.java with this contents.
Now, the service itself. I havent tried it myself, but i have read the code here to find the methods explanation, that i've put in comments. Also i edited some stuff.
As far as i understand, you will receive the actual text in getUserMessage, there you parse the text, and return what you want to be in the popup. If you dont want popup, return null. So, it is also there where you should do any other stuff with that text.
And the last part, the manifest. You have to register the service, and the broadcastreceiver