当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Launch Google Drive App from another app at certain path

问题描述:

Can anyone tell me if it is possible to open Google Drive App at certain path? I know that Google Drive APi allow to list all files for every folder, but i prefer use Google Drive app if is possible.

Thank you.

网友答案:

Try with this excelent answer

With this, you can open Google Drive native app from another app.

网友答案:

You can easily do that by firing an Intent but it requires you to know the name of the app which i think you can figure out. Happy coding

  Intent intent = new Intent("android.intent.action.MAIN");
  intent.setComponent(ComponentName.unflattenFromString
  ("com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks"));
  intent.addCategory("android.intent.category.LAUNCHER");
  intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  startActivity(intent);
分享给朋友:
您可能感兴趣的文章:
随机阅读: