How to show confirmation message before opening the default messaging application? - android

I want user to confirm By selecting yes or no that whether he/she is sure to open the message application or not.
This will be similar to CALL CONFIRM android app which confirms when making a call.
I can also manage if someone let me know a thing like broadcast receiver as in the case of making a call.
Like i would be able to confirm when send button is pressed in message application.
This is my first question on this forum. :)

it can be achieved in more than one way,
create a service and monitor activity stack, if activity matches com.android.mms.* you can show your notification to user
create an application with all the intents for launching the messaging application, you can find out all possible intents from stock messaging application's android manifest file for your ref
http://www.netmite.com/android/mydroid/2.0/packages/apps/Mms/AndroidManifest.xml

Related

Android App Detect Other Activity

I've been trying to look up solution but I just can't seem to find one that suits my need. It could be that I'm not using the correct keyword, so I'm gonna try to explain it the best I can.
Simply saying, I'm building an Android application. The application need to detect some other activities on the phone and show some message.
For example:
User launch MyApplication.
User received some notification from another app. (a phone call, text message, email, whatever)
MyApplication shows a message via toast or dialog, saying that "you just received an notification from another app"
I'm not entirely sure what function I should be looking for here, any help is appreciated.
Thanks!
You will want to look at NotificationListenerService, this will let you receive calls from the system when new notifications are posted or removed, or their ranking changed.
Once you receive a callback from the NotificationListenerService, you will want to create a Toast.
Take a look at this tutorial should help you get started.
To detect when other apps ask the OS to display a Notification, you would need to implement a NotificationListenerService. The user would then not only need to install your app, but also go into Settings and specifically allow you to monitor notifications.

How to trigger android app from my website's button click

I want to make an android app. in this app i want to control all the functionality from my website.t like if i click on a button from my website then it trigger my app and start a service from website.
last few days i spent lots of time to search the answer of my question if anyone can help me then please tell me the process how to do this...
You can do this with GCM
Steps:
Create admin panel with your requirements.
Register your app for GCM.
When certain action is performed then push the GCM.
Your app automatically received this GCM.
You can pass custom keyvalued json with GCM.
So according to this perform operation in your app.
Your app receive GCM even app has been killed so in background.
PS: you can also use FCM.
Link for GCM
Link for FCM
Tell me if you face any probelm in this.
maybe one way is when you click on button some dummy file with specific Extension (like .egn ) downloaded and try to opened. also register your Activity To Open that kind of files.
Register Activity To Open Any File With Certain Extension
I didn't test this solution but logically it is posible.
You will have to make a custom connection from your device to the website and when the button is clicked you have to store this on the server, let the code handling your device connection then check for this data and send it on to the device, which will have to actively process the data coming from the connection you established to the server and then have the App react appropriately.
It will take a lot of custom connection handling to make this possible.

Rich parse messages with push notifications service

I'm using Parse service in an application I'm developing, push notifications are now working, I can send perfectly ...
But I want to implement some actions in determidos cases example: Send url to be opened as soon as the user clicks on the notification, make a call, open the map with a planned route, and more.
I wonder if this is possible, and if we had someone who already knows the way I should go.
Thanks!
You can certainly send additional information to trigger an event inside your app, such as url opens, opening maps, etc.
First, you need to send a payload with your push notification that tells the app what to do. You can learn about that here:
https://parse.com/docs/push_guide#options/Android
Second, you need to create a handler inside your Android app that recognizes your push payload and knows what to do with it. You can find the appropriate start under "Responding with a Custom Activity" here:
https://parse.com/docs/push_guide#receiving-responding/Android

Are there things like an Android trigger

I have never developed something in Android before, but now my company has put me on a project which includes android.
My question is this: Is it possible to write an application that runs in the background and waits for triggers (if that is the correct word for it). For instance lets say I want my application to do something as soon as you open your emails or as soon as you get an email. Is there some API that I can use to interact with other applications such as Mail. The application does not have to have any GUI, it will literally just push some information notifications on the mail just received or opened.
I don't require a to technical answer, but rather just yes or no, and indeed yes, where can I get more info on it. Also if it is not possible, is there some workaround to achieve this. I have googled it, but most of the links are how to send an email from your application.
Thanks
EDIT: So it can even be triggered when a notification is received. Then I just want to look at the notification and determine if it is an email?
You could register BroadCastReceiver for the actions that you need to be caught

Detect when app is opened with a service

I want to be able to detect when an application is opened and notify the user of something at the moment related to that same application but I don't know how to do this.
The user opens my app
I intent the service (background / foreground) and it successfully starts
Whenever the user opens another application I want to "catch it" and present a notification to the user
How can this be made? Are there any event listeners i need to use? Thank you very much.
If you are trying to catch "open app" intents in general, then it depends on how the app defined the intent. If it specified a class (explicit intent) then it will generally not be visible to your app unless the device is rooted, for example.
Implicit intents are broadcast and you simply need to define an intent filter in order to receive them. These are intents that allow Android and/or the user to select the appropriate app target based on data sent with the intent.
There are both useful and malicious motivations to do the kind of thing you are asking about. Read this:
Android Intent Security
And also the posted comment on learning about intents overall.
This is really simple. Here I am trying to figure out the solution. When your app goes on onPause() state then broadcast a message using BroadcastReceiver. On the other hand in another app just register for that broadcast.

Categories

Resources