0

server will send SMS to mobile with some link/action/predefined string. on clicking of that link the call back directly I need to get into my application to perform an action. Is there any possible way to achieve this ?

User needs to tap that link then only I can perform any action. So I cannot register read SMS receiver to proceed once SMS receives. Thanks in advance..

Gopi Krishna
  • 176
  • 1
  • 8
  • You could write your app with an `` on a component for the `http` scheme with a `host` domain that you own, if you have one. This would display an app chooser, though, at least the first time. I think that's about as good as you can do with a simple SMS message. – Mike M. Jan 27 '16 at 11:07
  • Thanks mike, Is there any filters can we register to identify that sms received from my server instead of reading all messages. – Gopi Krishna Jan 27 '16 at 11:15
  • I'm not following you. I read your question as saying that the message would be received in the user's SMS app, and the link clicked there would open your app. Your app wouldn't necessarily need to read any SMS messages directly, in this case. You could get any additional info from the Uri data on the Intent that opens your app. – Mike M. Jan 27 '16 at 11:24
  • Yes mike, instead of opening app i need to download some content in background from server when user clicked on link., Is there any way to achieve this..? – Gopi Krishna Jan 27 '16 at 11:38
  • It would be great mike if you provide any sample snippet..or any reference link... – Gopi Krishna Jan 27 '16 at 11:51
  • 1
    Yeah, following the example in [that post](http://stackoverflow.com/q/3469908), it'll have to open an Activity, but you can use a `NoDisplay` theme for it, and just start your downloading Service in `onCreate()`. In my tests, however, it causes the UI to hang momentarily, so you may just want to show the Activity anyway, possibly with a `Dialog` theme, and OK/Cancel Buttons, for example. – Mike M. Jan 27 '16 at 13:30
  • Thank you very much mike for your help, so its not possible to get the callback from message application with out bringing application to foreground. so we are bringing application to foreground and performing download with user action. – Gopi Krishna Jan 28 '16 at 06:10

0 Answers0