0

I have a WebView App that point on my site (it's for a service for tech support and PC repair) Users can see their status by compiling the form (http://service-lab.com/ServicePointHelpDesk/index.php#cerca) with mobile number

The request is send with a GET form, so the query result is

http://service-lab.com/ServicePointHelpDesk/cerca.php?tel=3316282871

Ok, for now it's all ok and working..Automatically when the status change, the customer is notified with a mail, and i want that the link open the app with the result query.

http://service-lab.com/ServicePointHelpDesk/cerca.php?tel=3316282871

I've set up a CustomURL with this way:

<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="servicepoint"></data>
</intent-filter>

If i go to servicepoint:// the app starts correctly, but how can i process the PHP query? Like servicepoint://tel=0000000000?

Thanks in advance!

1 Answer 1

1
getIntent().getData() 

returns the URI which it is called with in the activity, which is opened. So you could basically do something like:

URI uri = getIntent.getData();
if (uri != null){
  String telephoneNumber = uri.getQueryParameter("tel");
  ...
}
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks i 'll check this soon.. But The main page is index.php.. And The query is on find.php ho Can i define this page?
Still open my app on homepage and not in the find.php?tel=xxxxx page =(
So that's the problem. Use android:pathPattern in your manifest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.