Pregunta

I have a program that needs to share data with a PC program. I'm not writing the PC program, but the program uses a file format (ADIF, if anyone cares). This will be done from the user perspective, and probably done with a group that isn't highly technical, so I don't want anything too complex ideally. Also, I don't want to assume anything about the user (Ie, has Google Drive account).

A few things I've thought of include:

  1. Emailing a copy to the user- Would work, but seems clunky.
  2. Some kind of share intent, to let the user share as desired- Not quite sure how to do this, but it sounds nice, especially if it includes an email option.

Any suggestions?

¿Fue útil?

Solución

Providing that your app is developed on Android, I feel that Google Drive would be the best option. For a user to have an Android device, they are required to have a Gmail account and this is also merged with Google Drive. Google Drive is actually made for storing files, unlike other ways of doing this, like asking the user to email the file to themselves where the file is actually only saved as an attachment.

I'd then use a sharing Intent like so:

Intent shareIntent = new Intent(Intent.ACTION_SEND);

You could even map this straight to launching Google Drive by using the Google Drive's app package name. If you do choose to use share Intents and want to specifically map the user to only using Google Drive to upload the file instead of letting them choose, for reference, here's the package name for Google Drive:

com.google.android.apps.docs
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top