<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trying to implement the Share Intent in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482420#M3324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: andrewb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm just guessing that this has do with MapView when you serialize/deserialize it as a bitmap at the bytecode level. Did you try any patterns similar to this link: &lt;A href="http://www.brighthub.com/mobile/google-android/articles/30676.aspx?"&gt;http://www.brighthub.com/mobile/google-android/articles/30676.aspx?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Andy&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried, and wasn't successful.&amp;nbsp; honestly, I had a hard time following the article.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions?&amp;nbsp; Seems like no matter what I try (and I've tried a lot of patterns), all I get is a black image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2012 12:53:11 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-05-25T12:53:11Z</dc:date>
    <item>
      <title>Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482416#M3320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to implement the Android Share Intent in order to share out a screen shot of my map via email, facebook, twitter, etc.&amp;nbsp; My thought was to export out the View as a jpg, then attach it.&amp;nbsp; I'm able to export out the view, but the map shows up as black.&amp;nbsp; Every other view element shows up - except for the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;View content = findViewById(R.id.mainlayout);&amp;nbsp;&amp;nbsp; content.setDrawingCacheEnabled(true);
&amp;nbsp;&amp;nbsp; Bitmap b = content.getDrawingCache();
&amp;nbsp;&amp;nbsp; File sdCard = Environment.getExternalStorageDirectory();
&amp;nbsp;&amp;nbsp; File file = new File(sdCard,"zzImage.jpg");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(file.exists()){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file.delete();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; try {
&amp;nbsp;&amp;nbsp;&amp;nbsp; b.compress(CompressFormat.JPEG, 100, new FileOutputStream(file));
&amp;nbsp;&amp;nbsp; } catch (FileNotFoundException e) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO Auto-generated catch block
&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();
&amp;nbsp;&amp;nbsp; } &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also attached two images.&amp;nbsp; One of what it's supposed to look like, and one of the results from the above code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14605[/ATTACH][ATTACH=CONFIG]14606[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482416#M3320</guid>
      <dc:creator>deleted-user-ATjHIWsdQYmT</dc:creator>
      <dc:date>2021-12-11T21:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482417#M3321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Andrew, sorry I can't help with that. Serializing screen captures on any client is tricky because issues related to Class reflection. The usual best practice is to create a URL to an external web map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 16:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482417#M3321</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2012-05-24T16:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482418#M3322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: andrewb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Too bad.&amp;nbsp; I'd really like to try to find a workaround for this. I was hoping to "cheat" by just attaching a screen shot.&amp;nbsp; that way it'll share exactly what the end user is viewing.&amp;nbsp; It's odd how everything BUT the map gets exported.&amp;nbsp; I tried writing out just the map to a bitmap as opposed to the entire layout. that came out just black too.&amp;nbsp; Could it have something to do with the implementation of OpenGL as part of the MapView?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 17:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482418#M3322</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-05-24T17:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482419#M3323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm just guessing that this has do with MapView when you serialize/deserialize it as a bitmap at the bytecode level. Did you try any patterns similar to this link: &lt;/SPAN&gt;&lt;A href="http://www.brighthub.com/mobile/google-android/articles/30676.aspx?"&gt;http://www.brighthub.com/mobile/google-android/articles/30676.aspx?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 19:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482419#M3323</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2012-05-24T19:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482420#M3324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: andrewb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm just guessing that this has do with MapView when you serialize/deserialize it as a bitmap at the bytecode level. Did you try any patterns similar to this link: &lt;A href="http://www.brighthub.com/mobile/google-android/articles/30676.aspx?"&gt;http://www.brighthub.com/mobile/google-android/articles/30676.aspx?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Andy&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried, and wasn't successful.&amp;nbsp; honestly, I had a hard time following the article.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions?&amp;nbsp; Seems like no matter what I try (and I've tried a lot of patterns), all I get is a black image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 12:53:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482420#M3324</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-05-25T12:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482421#M3325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another thought is that your drawing cache may be defaulting to a width/height of 0,0. According to the Android docs you may be missing a call to createBitmap(). And, that method calls for a width, height and Bitmap.Config.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a code snippet that will hopefully re-point you down the right track:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;View map = findViewById(R.id.map);
bitmap = Bitmap.createBitmap(map.getWidth(), map.getHeight(), Bitmap.Config.RGB_565);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you already tried this, can you list out what patterns you've tried?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482421#M3325</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2021-12-11T21:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482422#M3326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: andrewb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Another thought is that your drawing cache may be defaulting to a width/height of 0,0. According to the Android docs you may be missing a call to createBitmap(). And, that method calls for a width, height and Bitmap.Config.&lt;BR /&gt;&lt;BR /&gt;Here's a code snippet that will hopefully re-point you down the right track:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;View map = findViewById(R.id.map);
bitmap = Bitmap.createBitmap(map.getWidth(), map.getHeight(), Bitmap.Config.RGB_565);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;If you already tried this, can you list out what patterns you've tried?&lt;BR /&gt;&lt;BR /&gt;-Andy&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Same Result - black image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried exporting out just the mapView as a bitmap, the entire layout as a bitmap, using different bitmap configurations, using different output image types (jpg, png), moving the view onto a canvas.&amp;nbsp; None seem to be working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My current workaround is to get the minx/y, max x/y map extent and pass it to the REST endpoint and return an image.&amp;nbsp; Downside to this is I don't have the graphicslayer overlaid, or the callout.&amp;nbsp; I'm trying to figure out a way to write the callout to a separate bitmap as well as the graphicslayer(if possible) and overlay them all. Its a ton of work just to do a simple screen shot, but as of now at least I have a map.&amp;nbsp; callout and graphicslayer is hopefully the next step.&amp;nbsp; Downside is this requires another round trip to the server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482422#M3326</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T21:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482423#M3327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After a little digging, It looks like I'm not the only one with this issue.&amp;nbsp; I found this thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/46792-mapview.getMapDrawingCache()-returns-null"&gt;http://forums.arcgis.com/threads/46792-mapview.getMapDrawingCache()-returns-null&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has this been confirmed as a bug?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 May 2012 12:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482423#M3327</guid>
      <dc:creator>deleted-user-ATjHIWsdQYmT</dc:creator>
      <dc:date>2012-05-26T12:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482424#M3328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: andygup&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it's been confirmed there is a bug. Please refer to Archana's comment here that includes a potential workaround: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/46792-mapview.getMapDrawingCache()-returns-null?p=202231#post202231"&gt;http://forums.arcgis.com/threads/46792-mapview.getMapDrawingCache()-returns-null?p=202231#post202231&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 20:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482424#M3328</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-05-29T20:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to implement the Share Intent</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482425#M3329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For those who this bug applies to it has been logged under NIM081315.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 16:12:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/trying-to-implement-the-share-intent/m-p/482425#M3329</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2012-05-31T16:12:51Z</dc:date>
    </item>
  </channel>
</rss>

