2

I would like to send a file to the installed Dropbox app by launching an intent from my app. How do I determine what the intent is.

For example, when I go to my Astro Files, and long press a file, I get a "Send" option. Pressing Send shows me a list of applications including Dropbox.

How can I get that same "sharing" list from my app?

1 Answer 1

1

Assuming that the user has the app installed on their phone, you can find a list of apps capable of "catching" the broadcast. (Using this method...) After that you can either try to send the intent using the dropbox app, or decide not to (as, if the user doesn't have the app installed you'll get an exception thrown from the system)..

Sign up to request clarification or add additional context in comments.

6 Comments

I am not clear on this response - how can I find out the name of the Intent to use
You can try it experimentally by querying those providers and looking through them in the debugger to see the name of the app, but probably it's just the dropbox app's package name with the SEND intent. If they don't have an intent available, there's no way to add one, but you said you'd already seen one.
The interesting thing is that when the Drop Box app is displayed in the intent list, many other apps are displayed as well - dropbox, email, skype, Wifi, bluetooth, so it must be a standard Intent category
Yes, that's right. And moreover, different apps could handle the intents differently. It's up to the app to determine what the SEND intent means.
Sorry to be blonde, but I am not getting this. The method queryBroadcastReceivers accepts an Intent. But I am trying to determine the Intent - chicken and egg. How exactly can I figure out which intent is firing when I press the send button? (Hint - it is not the SEND intent, I tried that!)
|

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.