flamman Posted December 28, 2014 Report Share Posted December 28, 2014 (edited) Syncing an image works fine on my Android smartphone, when from inside the Sync app I add and select a file. I'd prefer if I could do the same from inside my Gallery. So when I look at a picture I want to sync, I do not need to remember the filename, but I can tap the little "share" icon and Sync is included in the list of apps, alongside Twitter, Facebook, Gmail or Whatsapp. Edited December 28, 2014 by flamman Quote Link to comment Share on other sites More sharing options...
MajorZ Posted December 30, 2014 Report Share Posted December 30, 2014 (edited) i totally agree with you.. Edited December 30, 2014 by MajorZ Quote Link to comment Share on other sites More sharing options...
flamman Posted January 29, 2015 Author Report Share Posted January 29, 2015 It doesn't need much work..Something like this already does it:#In a ("NameOfMyActivity") Activity file:Intent intent = getIntent();Bundle extras = intent.getExtras();String action = intent.getAction();if (Intent.ACTION_SEND.equals(action)) { if (extras.containsKey(Intent.EXTRA_STREAM)) { Uri uri = (Uri) extras.getParcelable(Intent.EXTRA_STREAM); #do something with it (in this case print the path of the file to be shared to the screen) Toast.makeText(this, "Selected File :" + uri.toString(), Toast.LENGTH_LONG).show(); }}#In the AndoidManifest:<activity android:name="NameOfMyActivity"> <intent-filter> <action android:name="android.intent.action.SEND"></action> <data android:mimeType="*/*"></data> <category android:name="android.intent.category.DEFAULT"></category> </intent-filter></activity> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.