Android 在Instagram中使用共享意图。如何知道用户实际共享了还是取消了共享活动?

Android 在Instagram中使用共享意图。如何知道用户实际共享了还是取消了共享活动?,android,instagram,instagram-api,Android,Instagram,Instagram Api,下面是代码 Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("image/*"); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + finalFile.getAbsolutePath())); shareIntent.setPackage("com.instagram.andro

下面是代码

 Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
 shareIntent.setType("image/*");
 shareIntent.putExtra(Intent.EXTRA_STREAM,  Uri.parse("file://" + finalFile.getAbsolutePath()));
 shareIntent.setPackage("com.instagram.android");
 startActivityForResult(Intent.createChooser(shareIntent, "Share your Photo"),INSTA);
下面的
onActivityResult
不工作

if (requestCode==INSTA)
    {
        if (resultCode == Activity.RESULT_OK) {
            // Here you do what you have to do.
            Toast.makeText(getApplicationContext(),"share successful...",Toast.LENGTH_LONG).show();
        }else 
        {
            Toast.makeText(getApplicationContext(),"share unsuccessful...",Toast.LENGTH_LONG).show();
        }

    }

你不能。

如果您提供的代码无效,则表示Instagram在共享图片后不会返回任何结果。但是,即使他们会返回一个结果(例如,
result\u OK
也并不意味着图片实际上是共享的)

获取此信息的唯一方法是调用instagram api并检查用户是否在(例如1-2分钟)内发布了新照片,但我认为在不了解用户的情况下是不可能的:)