snipt

Ctrl+h for KB shortcuts

Text only

get image external

http://stackoverflow.com/questions/10788252/best-practice-adding-your-app-to-the-android-share-menu

Intent intent = getIntent();
if (Intent.ACTION_SEND.equals(intent.getAction()))
{
 Uri uri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
 if (uri != null) {
    fileset = new HashSet();
    fileset.add(getPathfromUri(uri));
     }
 }

Description

Get image external from my app
https://snipt.net/embed/56e09ff9ecc24e68656fe355bad73aa7/
/raw/56e09ff9ecc24e68656fe355bad73aa7/
56e09ff9ecc24e68656fe355bad73aa7
text
Text only
11
2019-06-18T12:39:49
True
False
False
Mar 07, 2016 at 07:52 AM
/api/public/snipt/144612/
get-image-external
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1"> 1</a> <a href="#L-2"> 2</a> <a href="#L-3"> 3</a> <a href="#L-4"> 4</a> <a href="#L-5"> 5</a> <a href="#L-6"> 6</a> <a href="#L-7"> 7</a> <a href="#L-8"> 8</a> <a href="#L-9"> 9</a> <a href="#L-10">10</a> <a href="#L-11">11</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>http://stackoverflow.com/questions/10788252/best-practice-adding-your-app-to-the-android-share-menu </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Intent intent = getIntent(); </span><span id="L-4"><a name="L-4"></a>if (Intent.ACTION_SEND.equals(intent.getAction())) </span><span id="L-5"><a name="L-5"></a>{ </span><span id="L-6"><a name="L-6"></a> Uri uri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM); </span><span id="L-7"><a name="L-7"></a> if (uri != null) { </span><span id="L-8"><a name="L-8"></a> fileset = new HashSet(); </span><span id="L-9"><a name="L-9"></a> fileset.add(getPathfromUri(uri)); </span><span id="L-10"><a name="L-10"></a> } </span><span id="L-11"><a name="L-11"></a> } </span></pre></div> </td></tr></table>
"image external", "share external", image, share
--- 
+++ 
@@ -0,0 +1,11 @@
+http://stackoverflow.com/questions/10788252/best-practice-adding-your-app-to-the-android-share-menu
+
+Intent intent = getIntent();
+if (Intent.ACTION_SEND.equals(intent.getAction()))
+{
+ Uri uri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
+ if (uri != null) {
+    fileset = new HashSet();
+    fileset.add(getPathfromUri(uri));
+     }
+ }