Home > Software engineering >  How to send a request from one app to another?
How to send a request from one app to another?

Time:10-28

I am actually making a UBER colon type app I want to send an ride request to the driver so the he can accept or reject the request how can it be done?

CodePudding user response:

I would recommend you to explore on REST APIs.

You can refer to this article.

CodePudding user response:

You need to download Uber apk file, investigate it's AndroidManifest file first - to understand which type of URL or other data it can accept via Intent. And then, if it can do it - you need to startActivity. And if that app can handle such URL - it will handle that. If not - you have to dig into the code, maby look for some REST API which receive/send orders, and if you can somehow hack it - you can do it like that. But more correct way - is to negotiate with Uber team, that you want to give them more clients - they will add to AndroidManifest separate activity flow for your case - and you'll be able to do that on legal rights. Other way - your business will be shutdown as soon as they'll find out somthing.

Intent queryIntent = new Intent();
        queryIntent.setData(Uri.parse(url));
        queryIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(queryIntent);
  • Related