flickr的,tumblr,Instagram的份额,在Android的意图 [英] flickr, tumblr , instagram share intent in android

查看:167
本文介绍了flickr的,tumblr,Instagram的份额,在Android的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想分享的Flickr图像,tumblr,Instagram的。
我想这些3安装的应用程序要做到这一点..
我发现Instagram的

I want to share image flickr, tumblr, instagram. I want to do this with these 3 installed apps.. I found for instagram

Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("image/*");
shareIntent.putExtra(Intent.EXTRA_TEXT, "" + getShareText());
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "" + getShareText());
shareIntent.putExtra(Intent.EXTRA_STREAM,
                    Uri.parse("file://" + file.getAbsolutePath()));
shareIntent.setPackage("com.instagram.android");

我能有tumblr和Flickr也?是的,我可以通过集成库与OAuth的过程做。但是我想通过特别安装的应用程序共享。

Can I have tumblr and flickr also? Yes, I can do with oauth process by integrating libs. But i want to share via particular installed app.

帮助!谢谢你。

推荐答案

刚刚在设置正确的软件包名称:

Just set the correct package name in :

sendIntent.setPackage(PACKAGE_NAME);


  • 的tumblr: com.tumblr

  • Flickr的: com.yahoo.mobile.client.android.flickr

    • Tumblr : com.tumblr
    • Flickr : com.yahoo.mobile.client.android.flickr
    • 您可以发现在谷歌Play商店的网址的软件包名称:

      You can find the package names in the Google Play Store URLs :

      <一个href=\"https://play.google.com/store/apps/details?id=PACKAGE_NAME\">https://play.google.com/store/apps/details?id=PACKAGE_NAME

      PS:最好是检查是否安装在设备上应用程序:

      PS : it is better to check if the app is installed on the device first :

        try
        {
          getPackageManager().getApplicationInfo(PACKAGE_NAME, 0);
        }
        catch (PackageManager.NameNotFoundException e)
        {
          // Twitter not installed
        }
      

      使用SEND_ACTION不需要在你的应用程序的OAuth

      共享,权威性是在目标应用程序管理的。

      Sharing using SEND_ACTION do not require OAUTH in your app, auth is managed in the targeted app.

      感谢

      这篇关于flickr的,tumblr,Instagram的份额,在Android的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆