0

Illustration:

MyApp Project

How do I pass data coming from a form in my app to a third-party app?

Also, what are the terms, functions and APIs about doing this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
새벽별
  • 1
  • 2
  • Do you have access to the third party app code? – Nicola Gallazzi Jun 14 '19 at 09:29
  • I will use the program with the right to use the program. I have to enter the data one by one and press the send button. However, I already have data in my program and I want to create a program to make it easier to enter data. I dont know Third-party app code. but I know Third-party app. All I need to do is copy and pass the data to the third-party app's input form. – 새벽별 Jun 14 '19 at 10:13
  • I try to copy and input(paste) the data to the third-party app's input form. – 새벽별 Jun 14 '19 at 10:28
  • Do you mean third party app programming code? No, I don't have the third party app code. – 새벽별 Jun 14 '19 at 19:21

2 Answers2

0

It is possible through Intent and URI.

The app that is receiving your data should support be open to receive URI so that you can fire up the Intent method it will open the app and send data.

You can refer: https://developer.android.com/training/basics/intents/sending.html#java

Racer
  • 152
  • 1
  • 9
  • I want to run two apps at the same time. Is it possible if I do that? "The app that is receiving your data should support be open to receive URI" I do not know the meaning of this sentence. but Thank you. I know It is possible through Intent and URI. – 새벽별 Jun 14 '19 at 09:26
  • Yes, It is possible when you send the data it the receiving app will open and navigate to the activity. If it is already open it will just navigate to the desired activity. – Racer Jun 14 '19 at 09:34
  • I got to know It is possible through Intent and URI. but I know a little it can be used between activities. Is that possible between apps? – 새벽별 Jun 14 '19 at 09:37
  • Yes, it is. You have to create a custom Intent to the app. – Racer Jun 14 '19 at 09:42
  • I know a little it can be used between activities. but Is that possible between apps also? – 새벽별 Jun 14 '19 at 09:47
  • Please refer the documentation, Everything is explained in detail there. Happy Coding. (https://developer.android.com/training/basics/intents/sending.html#java) – Racer Jun 14 '19 at 09:53
  • https://developer.android.com/training/basics/intents/filters >> It turns out that it is possible that the program allows the activity. What if the program does not allow the activity? All I need to do is copy and pass(paste or input) the data to the third-party app's input form. – 새벽별 Jun 14 '19 at 11:29
0

Unfortunately there is not a one-size-fits-all solution to this question, as such you are going to receive a variety of different "solutions" but the truthful answer is, it depends on the implementation of the app built by the other party;

Intents

If the third-party app is open to receiving data through intents, and hopefully the developer of that app has documented this somewhere. This would be the most streamlined approach.

It is important to note with this implementation that if there are specific apps you have in mind to connect to, and your application is going to be publicly available, then the user will need to have those specific third-party apps installed. This is easier if you only have one specific third-party app in mind (you can check the user's device to see if it is installed and inform them), and gets exponentially more cumbersome for every additional application you wish to connect to, not only due to having to instruct the user about yet another required third-party app but also as you will need to make sure you are able to pass all the necessary data to a completely different application.

Have a look at this earlier question to see how this can be achieved.

APIs

Another solution would be to use APIs. Just like intents, this requires the third-party developer to have exposed their application to these specific API calls, which you can then connect to to pass your data. The simplest real-world implementation of this approach would be signing on to an application using a social media account instead of having to create a separate account per application.

This is less streamlined than the intents approach as it would involve additional steps of posting your data to the API and then opening the other app in order to retrieve the data and proceed.

Peter Meadley
  • 509
  • 2
  • 16