Skip to content Skip to sidebar Skip to footer

How To Send Requests From One App To Another App?

I am creating a food ordering app and want to find out how to send orders to restaurants and delivery guys using a dashboard for the restaurants, and an application for a driver or

Solution 1:

You can use deeplink with specific structure

Append blew line manifest

Define ACTION_VIEW intent action so that the intent filter can be reached from Google Search

<action android:name="android.intent.action.VIEW" />

And add BROWSABLE category in order to be accessible from a out off app

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

Add your link structure

<data android:host="order" android:pathPattern=".*" android:scheme="food"/>

Get data with intent

Intent intent = getIntent();
Uri data = intent.getData();

Send data to another app

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("food://order"));
startActivity(launchIntent);

Post a Comment for "How To Send Requests From One App To Another App?"