Merge remote-tracking branch 'g1o/android_share_intent' into qml_app_ui_aesthetic

This commit is contained in:
Angela Mazzurco 2017-07-09 13:18:12 +02:00
commit 02d4790890
62 changed files with 2294 additions and 1438 deletions

View file

@ -65,6 +65,17 @@ public class RetroShareQmlActivity extends QtActivity
if (uri != null) NativeCalls.notifyIntentUri(uri);
}
@UsedByNativeCode @SuppressWarnings("unused")
public void shareUrl(String urlStr)
{
Intent shareIntent = new Intent()
.setAction(Intent.ACTION_SEND)
.putExtra(Intent.EXTRA_TEXT, urlStr)
.setType("text/plain");
startActivity(Intent.createChooser(shareIntent,"")); // TODO: Need proper title?
}
private boolean isMyServiceRunning(Class<?> serviceClass)
{
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);