[IITCm] new feature: share a screenshot of the current view

This commit is contained in:
fkloft
2014-03-01 13:07:40 +01:00
parent 13893546a4
commit b30c1e4aa3
6 changed files with 103 additions and 29 deletions

View File

@ -140,8 +140,8 @@ public class IntentGenerator {
final Intent intent = new Intent(Intent.ACTION_SEND)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET)
.setType("text/plain")
.putExtra(Intent.EXTRA_TEXT, text)
.putExtra(Intent.EXTRA_SUBJECT, title);
.putExtra(Intent.EXTRA_SUBJECT, title)
.putExtra(Intent.EXTRA_TEXT, text);
final ArrayList<Intent> targets = resolveTargets(intent);
@ -154,4 +154,12 @@ public class IntentGenerator {
return targets;
}
public ArrayList<Intent> getShareIntents(final String title, final Uri uri, final String type) {
return resolveTargets(new Intent(Intent.ACTION_SEND)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET)
.setType(type)
.putExtra(Intent.EXTRA_SUBJECT, title)
.putExtra(Intent.EXTRA_STREAM, uri));
}
}