added possibility to share strings from javascript to iitc share activity (see #482)

This commit is contained in:
Philipp Schaefer
2013-08-13 17:03:30 +02:00
parent 0ee98355bd
commit d822d56377
3 changed files with 31 additions and 11 deletions

View File

@ -51,6 +51,15 @@ public class IITC_JSInterface {
mContext.startActivity(intent);
}
// share a string to the IITC share activity. only uses the share tab.
@JavascriptInterface
public void shareString(String str) {
Intent intent = new Intent(mContext, ShareActivity.class);
intent.putExtra("shareString", str);
intent.putExtra("onlyShare", true);
mContext.startActivity(intent);
}
// disable javascript injection while spinner is enabled
// prevent the spinner from closing automatically
@JavascriptInterface