2015-04-17 48 views
3

我在執行下面的代碼爲Instagram上分享圖片和文字的Instagram應用程序:分享的Instagram的不登錄到Android中

public void ShareInstagram() { 
     Log.e("SHARE", "IN INSTAGRAM"); 
     Intent intent = getActivity().getPackageManager() 
       .getLaunchIntentForPackage("com.instagram.android"); 
     if (intent != null) { 
      String type = "image/*"; 
      Intent share = new Intent(Intent.ACTION_SEND); 
      share.setType(type); 

      share.putExtra(Intent.EXTRA_STREAM, file); 
      share.putExtra(Intent.EXTRA_TEXT, SHARE_NAME); 
      share.setPackage("com.instagram.android"); 
      share.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
      // Broadcast the Intent. 
      startActivity(share); 
     } else { 
      Intent inplay = new Intent(Intent.ACTION_VIEW); 
      inplay.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
      inplay.setData(Uri.parse("market://details?id=" 
        + "com.instagram.android")); 
      startActivity(inplay); 
     } 

    } 

當我從我的Instagram應用程序共享,我不是在Instagram的登錄,然後它打開Instagram應用程序的登錄或註冊屏幕並顯示Toast消息以便必須登錄才能共享。之後當我按下返回按鈕時,我正在移動到我的應用程序與簡歷活動的共享。但我無法訪問屏幕的任何控制。如果我再按一次,那麼只有我可以訪問它。

只有當我沒有登錄到Instagram應用程序時纔會出現此問題。 幫我解決問題。

回答

-1

我也注意到了這個問題。這似乎是一個instagram版本的問題。我正在使用舊的。更新到最新版本後,此問題已解決。

+0

我已經在使用最新版本的instagram。 – Riser