Is it possible to transfer POST data to Android activity using a special URL scheme?

I am developing an Android application that uses a custom scheme, as in the link below:

<activity android:name="com.example.library.activities.CustomSchemeActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="custom" android:host="custom.example.com" android:path="/custom" /> </intent-filter> </activity> 

When the user clicks on the link, let's say custom://custom.example.com/custom?parameter=abcd , CustomSchemeActivity starts as expected.

Now I need to send data to this operation. I can already send it via URL parameters. I'm curious though, if I set the POST data to Intent, could I read the contents? Is it possible to receive POST data from the server to the phone?

+4
source share
1 answer

You can add additional data:

<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

Taken from: https://developers.google.com/chrome/mobile/docs/intents?hl=es

0
source

Source: https://habr.com/ru/post/1481201/


All Articles