Open app while specific phone number calls - android

I want to open or maximize app working in background while specific phone number calls. Is that possible?
Where can I find more info?

Use a broadcast receiver for reading the Phone state when you receive a call.Then if the phone number which you have received is specific then start an activity

Related

Making an app which can track the time when user unlocks his phone

I want to create an android app which will tell me when I have unlocked my phone in past day also track the location where I have unlocked the phone using GPS. Is there a way to achieve this?
You have to use broadcast receiver for receiving system messages. For checking when the device is unlocked you can use ACTION_USER_PRESENT intent filter for you receiver. Start a service when your receiver receives broadcast from system and log your current location data.
This might help in the way - A way to get unlock event in android?

Android hidden service

Could someone please help me figurate how to make an app that has no icon and starts at the startup?
I want it to start in every startup and keep running all the time, because I want to Toast the name of the sender each time there's an incoming SMS.
I'm not sure what you mean by "hidden" as the O/S generally tries to avoid allowing you to hide behavior from the user. What you want to do is discussed in this question Trying to start a service on boot on Android. That will enable you to launch a service and then by watching for the appropriate intents related to SMS messages you can create the toasts you desire.

Android NFC Proof of Concept

I have an idea for an android NFC application but am not entirely sure how to implement it.
I want to be able to have an application that is always on (starts on bootup) and the user cannot exit out of the application. I want two have two phones with NFC enabled. One phone is set up as a listener, the other phone is set up as a sender. Both of these devices will have a code. Sender inputs a code (1234), and the listener has a code (123). If the sender puts the phone up to the listener, and the code is incorrect (1234 instead of 123). The device will lock. The only way the device can unlock is if the sender has the same code as the listener.
I don't want code samples.. I just want an explanation of how you would go about doing this.. and if it is possible.
Basically you need your app to start a service after the phone has booted, use BroadCastReceiver which takes action with the BOOT_COMPLETED intent. When that broadcast receiver has been notified of the boot completion you'll start the service which will handle your nfc jobs.

android.intent.action.BOOT_COMPLETED - do not receive broadcast if boot completed by a phone call

I am using a broadcast receiver in my app, to display a photo on BOOT_COMPLETED. However, I noticed that if I receive a phone call on my phone, the photo is displayed in front of incoming phone call activity, so I can's see who is calling me and what is worse - can't answer the phone.
What is the best way to override this behavior?
you could add another mechanism for listening to phone calls events, and if you detect that the phone is ringing (or the call was answered), you won't show the activity...
in any case, please don't show such things. no user likes popups go out of nowhere.
instead, use notifications to tell the user something has happened.

Putting of default SMS notification

What I am trying to do is developing an SMS notification system for our own application, whenever the sms is received from a specified number the application gets invoked but the problem is that whenever the sms arrives from any other number then also the application gets invoked and that is undesirable. I would be grateful to hear from u all .
Read this question and answers: how to stop the application from opening in android
Basically you need to extract the number from the message and if it is a number you are interested in, then you start your application, otherwise not.

Categories

Resources