簡體   English   中英

如何在Android中打開Instagram的相機?

[英]How to open Instagram's camera in Android?

如何在我的應用程序中打開Instagram相機? 不共享。 我已經嘗試過setComponent,但是由於Pemission Denied導致應用程序崩潰。

在Instagram的AndroidManifest中,我想打開MediaCaptureActivity,但是它沒有意圖過濾器。

我已經嘗試過setComponent,但是由於Pemission Denied導致應用程序崩潰。

在Instagram的AndroidManifest中,我想打開MediaCaptureActivity,但是它沒有意圖過濾器。

然后,您將無法啟動它。 該活動未導出,因此第三方應用程序無法啟動它。

嘗試使用以下代碼,希望對您有所幫助...

Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
intent.setComponent(new ComponentName("com.instagram.android", 
   "com.instagram.android.creation.activity.MediaCaptureActivity"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

startActivity(intent);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM