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.
Related
I understand that Android does not allow you to call an emergency number (911) directly. So I have decided to use Intent.ACTION_DIAL instead to leave the app and have the number pre-dialed, ready to call. However, the app chooser appears when I hit my 'Dial 911' button, adding another unnecessary step to the process (the other option besides the Phone app is to scan the number using Lookout Security).
Is there anyway to bypass the app chooser by pre-defining the app to handle the Intent?
There are many possible dialers. You have no good way of determining a priori which is the "one true dialer" that the user wants to use. Moreover, the user should be able to click "Always" on the chooser and therefore only encounter this once.
If you want, you could allow the user to choose their dialer up front, perhaps as part of configuring your app. You can use PackageManager and queryIntentActivities() to find out what all supports ACTION_DIAL, presenting that to the user to choose from. You would remember the ComponentName of their choice, and add that ComponentName to the ACTION_DIAL Intent that you use "for realz" when the user presses the button in your app.
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.
I have a requirement where I would want to initiate and manage GSM calls (Like the ones we make via Phone)
I will be connecting to a GSM Module/DTMF Module (context: robotics) via this method and would be sending instructions via DTMF tones.
I don't want to open up the phone dialer via an Intent with tel: data, would rather want to manage the telephony myself.
First thought that the system might not allow a third-party app, without a signature matching system's signature, to do telephony stuff, but then I wondered how some of the apps available in the market are doing it. (I'll attach links as soon as I find suitable ones)
EDIT: The apps that I had seen, were launchers and call manager apps, and once installed, had replaced my default phone apps (and thus were making calls instead of the default phone app doing it)
EDIT: I have found this question asking something similar, and also has an answer: Android Dialer application. I'll try this out and post back if I get any success.
Any pointers will be greatly appreciated.
I've looked at a few posts here like this but this doesn't seem to do what I intend (unless I'm just doing it wrong.) The other posts I see are either about replacing the dialer with a custom dialer or passing an input to the dialer.
I don't want to replace the dialer and I don't want to pass the data where the user inputs a number and then sends it to the dialer.
I would just like to bring in the default dialer inside the app. Example:
1) The user opens the app, they see their default dialer but with a different heading (just so they know they're inside my app). They enter the number, press call it calls the number.
2) If the user presses their call button outside of the app, they just do the normal dialer without my app. So the user never uses my app in (2).
I think that's pretty clear but if not just let me know. Since I can't seem to find any tutorials or posts about doing this online, it leads me to wonder if this is against a policy? Or perhaps a concern the users will be confused as to what they're doing? I think with a different heading they can know if they are using my app or not.
I would just like to bring in the default dialer inside the app
Sorry, but that is not possible.
it leads me to wonder if this is against a policy?
If by "against policy" you mean "not possible from a technical standpoint", then yes, it is against policy. You cannot embed the UI from another process in yours, by and large. This is not unique to the dialer, or to your app.
is it possible to press a button and start a call e.x. in skype?(i know that is possible for a telephone call but i would like to see if i can make this stuff with a voip app as skype)
If the user has skype installed, and the user tries to place a call there are two options you can take:
i.e. just try and call skype directly (but this requires knowing the correct intent to launch skype) or you request to make a call and the user will be shown the option to use skype to place the call (unless they've set the default dialer and the primary application).
I think there may be a way to get a list of activities that are registered to handle certain events (i.e. get the list of dialler apps on the device) from this you might be able to find the skype app and get enough information to force the use of that. The problem with this is you are then tied into using skype and only skype rather than let the platform handle it.