mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 12:32:37 -04:00
Qml App: better Android interaction on URL export
Clipboard usage is uncommon in Android so export the URL via Intent too that is the common pattern on Android
This commit is contained in:
parent
a97ba803d8
commit
dafaa568b8
10 changed files with 205 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue