Can you link from your application to open Android native messaging inbox? - android

We have an application that handles the sending of SMS to a recipient to a lower rate than most operators. However, due to permission restrictions we wont be able to show incoming SMS.
Therefore we had an idea if we easily could link from our application to open the native inbox for relative easy access to the conversation you're in.
Is anyone aware of whether it's possible to link to the Android native inbox, and preferably link it so that pressing "Back" will take the user back to the application? An additional side question, if this is possible then can we also request a toast to show when opening the native inbox to say something along the lines of "Press 'Back' to go back to application"?

You can call the sms box via Intent, but I think that you can do something better. You can get the List off SMS/MMS and do what you want in your own applicaiton. Take a look at this question.

Related

Can I suppress Send SMS option when calling ACTION_DIAL intent

My team is developing an Android app that includes the ability to call and talk to customer support. We are calling an Intent with ACTION_DIAL, which brings up the dialer with the phone number pre-populated, as expected. In the device emulator, we also see links to Create a new Contact and Add to a Contact, which are fine, but we want to suppress the Send SMS link, since there is no way for us to read messages sent to that number. Ideally, I'd like to be able to pass a parameter or change a setting that disables SMS messaging for that one invocation, but I'm open to other solutions. Searches that I've done haven't turned up anything.
Thanks in advance,
Dan
No. There's no way of knowing what dialer is being launched for action dial- OEMs all have the option of using their own, or the user can even download one of their own. There's no way of knowing what options those dialers support, and definitely no way of configuring them. Even if there was, a dialer app could ignore the configuration. You may want to use ACTION_CALL instead, which requires additional permissions but will directly call without bringing up a prefilled dialer.

Disable sending texts on Android

I want to be able to have the user press a button in the app that disables sending texts. In my googling attempts, I've seen that it might be impossible. Does anyone know how to accomplish this? My thoughts are either to disable opening the texting app or just disable the send button in the texting app.
This is not truly disabling it, as other comments have pointed out. However... you could set up a service or some sort of polling period with an alarm. You can check if a SMS app (you'll have to gather SMS packages) is open in the foreground by its package name, and then launch some activity from your application, essentially blocking the SMS app.
Granted, this is horrible UX and is very hacky, but it could work for preventing the sending of SMS by preventing the user from actually using any SMS apps.
It's not possible, because "texting app" is a system application, which have no open API's for it's UI customization. All you can do - just create custom texting application and replace with a system one.
Even if one somehow found a way to disable the texting app, it does not account for the ContentProvider's that expose the SMS and MMS data to any app that asks for it nor the API's that allow any app that asks to do so to send SMS and MMS for you. This is why you can download alternative texting apps (and why hangouts recently turned into a combination sms/chatting app).
Sorry, but you're asking to do something that requires ripping out the guts of the OS, from what I understand.

Android: How to program changes to the standard android sms GUI

I want to write an android app that changes the android standard message sms GUI giving it an extra send button. The one send button should be the usual one and the other should be the one that uses my application to send the message. How do I add this extra button in the android standard sms message GUI? Anyone got an example code on how to do this?
Kind regards
Benjamin
Ok, this you Cannot do for phones which are in the market. You will need to grab hold of the sources and come up with a custom ROM for users to flash.
However, as another option, you can build your own SMS application and let users install so. When users need to send a SMS, they will be asked whether we default/your app needs to be used. This way is a much cleaner approach and more reachable to users.

Android App - Want to fire a function when android sends a text

Thank you for taking the time to help me out. I don't know if this is even possible but I though it would be worth asking seeing as it is vital for my app :/ In simple terms, what I want is for a function in my application (e.g. a Toast text to show or something) to be fired when another application is doing something -- like if I send a text message in the messaging application. (example - I send a text in the text msg app and (my app is running in background as a service or something) a Toast (created by my app) displays "You sent a text!".
Thank you for your feedback!
Sincerely,
Jackson Smith
You can't do it in general for every action, and I don't know if you can do it specifically for texting.
However, for some actions (like screen lock/unlock, wifi up/down etc.) either the android system or the application causing the action will broadcast an intent that you can catch with a BroadcastReceiver (if you have the right permissions to do it). You need to know what intent you want to respond to and what permissions you need to be able to receive it.

How to catch an incoming text message

I want to be able to control incoming text messages. My application is still on a "proof of concept" version and I'm trying to learn Android programming as I go.
First my application need to catch incoming text messages. And if the message is from a known number then deal with it. If not, then send the message as nothing has happened to the default text message application.
I have no doubt it can be done, but I still have some concern and I see some pitfalls at how things are done on Android.
So getting the incomming text message could be fairly easy - except when there are other messaging applications installed and maybe the user wants to have normal text messages to pop up on one of them - and it will, after my application has had a look at it first.
How to be sure my application get first pick of incoming text messages?
And after that I need to send most text messages through to any other text message application the user has chosen so the user can actually read the message my application didn't need.
Since Android uses intents that are relative at best, I don't see how I can enforce my application to get a peek at all incoming text messages, and then stop it or send it through to the default text messaging application.
Espen,
The answer to this is multi-part. Understand first that our company has resolved this problem, but the solution is temporarily proprietary, so I will answer what I can without causing conflict either here or for my company.
1) You can never insure that your App ever gets first pick. What you can do is make your processing "fast enough" that is does not matter.
2) Intents ARE an absolute if you force the issue. Our company uses a concept called intent routing. This insures that the data is sent to the appropriate app. The most basic idea is that when you receive the SMS, you create a New Intent (not the same one) and send it to the class directly. This has some special considerations, but should give you some direction.
Unfortunately, without violating my company's confidence or stackoverflow's policies, I cannot say anymore publicly until the solution is made public (within the next month).
FuzzicalLogic
Retriving all incoming messages is just setting up listener, you can do it easily see here
and after that, its fine if you are at do nothing phase, but in case you want to prevent sms to go into the native messaging app it is not advisable to prevent user.
better you wait for some time and then delete the same from SMS database.

Categories

Resources