How to detect the SIM card change in android phone? - android

Its very much frustrating situation now in project. I am stuck up at one point. I want do a simple task as follows
When someone change the SIM, detect this event and check if this new SIM is different from previous SIM and take action accordingly.
I don't want to check the SIM_STATE periodically by timer or anything..
Do android notify the state change of SIM? If yes please let me know I can detect the SIM change?
I have asked this question before also but no solid answer I got. It seems a very important API and no one care about it. Please provide me some code snippet if you have please...
I am stuck up here and in the android telephony service documentation I don't able to understand anything... It will very helpful if anyone can provide some code for the above.

Yes, You can do only when application restart, at boot time receiver, so we have to register boot time receiver in our application. and when user change it we can analyse it .

Related

how to detect user is inside car without using Awarness API in android?

Please help me how to detect driver is inside car or not, means vehicle is moving or not? even if application kill( A kind of Broadcast receiver which Broadcast even app terminate )
I have tried with Activity recognition but here I need to open activity, if I will terminate app, will not get any call back.
Please help me or suggest me any solution for this for Android.
thank you

How to make full screen caller id in android?

I Want to develop Full Screen caller application with Caller details and accept call and ignore button how to achieve this? .I searched a lot but i'm not able to find solution or any reference, so anyone can lead or help me or any reference it would be helpful for me, thanks in advance happy coding.
I'm not going to give you ready-made code even though I could probably dig into my own and do it. You said you searched a lot but if this were true, you'd have found many references to articles and docs such as these.
Get contact data from number
Take control of calls programmatically
Detect incoming calls
Interesting considerations for incoming calls
That should get you started. But it should go someting like this: Register that you want to be notified when incoming calls are received. On that notification you receive launch your own activity that takes control of the calls programmatically (button to dismiss, button to accept?). That screen can show whatever you want, beit the contact information you retrieved from the phone number, a photo, etc.

Control android by sms

I'm doing my fyp in Android app and I'm still learning the whole deal, and I'm welling to learn it, my question is how can you make an Android based device to respond to predefined SMS codes to do a specific function?
I would appreciate any related info whether task related or programming related.
Have read few books so far but didn't find any info regarding controlling the phone with SMS.
You will have to listen for SMS and and execute accordingly. This article may help you get started.

how to get sequence of user interaction with android device?

After many sites searched and googling,
I can't find anything for my problem.
I want to capture the sequence of user interactions on android device. Starting from when the device is powered ON. And one more thing is that I'm not talking about the user event on UI of any application. It's for whole device UI interactions. And if any tools are available then please let me know about it. I didn't get anything about this. Any help or suggestion is well appreciate.
This is not possible, except perhaps via modified firmware, for obvious security and privacy reasons.
I am not sure at what extent it will help you to achive your goal but the best way I know is that:
You need to implement Broadcastreceiver for every action like action android:name="android.intent.action.BOOT_COMPLETED" when your device starts, similarly you need to use all the action which will notify you in your receiver.
You can run a service where you can check which app is running for your record. For this you need to fetch installed app list.

How detect a program starts on android?

I want to detect a program starts on android.
I know i should code a service and broadcast receiver.the problem is i do not know what intent filter should i use?
EDIT1 :
for example i want to know if user wants to start contact manager.
thanks and regards
I don't think this is possible directly through Intents and service/broadcast receivers as this would constitute a major security issue. Take a look at these other proposed solutions. The best one would be to replace the launcher if the user allows it.

Categories

Resources