Yes.I am the programmer here and it is my own app. The devices that I am 
testing on have Play store installed. I assume that the correct intent has 
to be created with 

  Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
 sharingIntent.setType("text/plain");

It has to be started with 

  startActivity(Intent.createChooser(sharingIntent, "Share via"));

The problem is how to set the information in the intent(the code between 
creating the intent and starting it).I used this code before and it started 
the web page for the app without problems:

  sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Product 
name");
  sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, 
"https://play.google.com/store/apps/details?id=example.package";);

I try to replace this with the following code, which should start Google 
play:

  sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Product 
name");
  sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, 
Uri.parse("market://details?id=example.package"));


This results in that the link to the appstore is not included when I try to 
share the link from Facebook. I test with 2 different devices, which both 
have Google play. I also try with 

  sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Product 
name");
sharingIntent.setData(Uri.parse("market://details?id=example.package"));

This resulted in the error message "can not find the application to perform 
this action". Do you know how I can solve this problem? I have replaced the 
package name of my app with an example package in this thread, but I am 
using the correct package name when I am testing.




On Sunday, January 12, 2014 6:40:17 PM UTC+1, TreKing wrote:
>
>
> On Sun, Jan 12, 2014 at 5:48 AM, MobileVisuals 
> <[email protected]<javascript:>
> > wrote:
>
>> I tried to implement according to their advice, but the link to the 
>> appstore is not included when the user tries to share the link now. I 
>> tested from a Facebook test account. Do you know how I can fix this?
>
>
> I'm not entirely sure what you're referring to. Aren't you writing code 
> for your own app? So you control the code? You just have to create the 
> correct intent and start it, the system will do the rest (assuming the 
> device has the Play store installed, of course).
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to