inkSpace icon indicating copy to clipboard operation
inkSpace copied to clipboard

Wrap Share Intent with Chooser

Open danzeeeman opened this issue 10 years ago • 0 comments

In the java land you're just passing a basic Share Intent which throws up an option to set the default share action. This could cause a user to lock them into sharing with one app.

you could either make changes here https://github.com/ofZach/inkSpace/blob/master/srcJava/cc/openframeworks/inkSpace/OFActivity.java#L100

or here

https://github.com/ofZach/inkSpace/blob/master/srcJava/cc/openframeworks/inkSpace/OFActivity.java#L94

Or I might make the changes and do a PR.

here is some example code for popping up a Chooser

Intent sendIntent = new Intent(Intent.ACTION_SEND); ...

// Always use string resources for UI text. // This says something like "Share this photo with" String title = getResources().getString(R.string.chooser_title); // Create intent to show the chooser dialog Intent chooser = Intent.createChooser(sendIntent, title);

// Verify the original intent will resolve to at least one activity if (sendIntent.resolveActivity(getPackageManager()) != null) { startActivity(chooser); }

danzeeeman avatar Aug 12 '15 21:08 danzeeeman