我正在尝试将 SoundCloud 共享功能添加到我的应用程序中。假设用户安装了 SoundCloud 应用程序,但仅当他们登录到应用程序时,共享才能与隐式共享方法一起正常工作。是否可以检查他们是否以某种方式登录,或者在 SoundCloud 共享活动弹出时要求他们登录的一些解决方法?
谢谢!
这是分享代码:
File audio = new File(sharePath);
Intent intent = new Intent(Intent.ACTION_SEND).setType("audio/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(audio));
//startActivityForResult(Intent.createChooser(intent, "Share to"),SHARE_SOUND);
startActivity(Intent.createChooser(intent, "Share to"));