📌  相关文章
📜  在谷歌驱动器上打开屏幕 pdf react native expo - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:10.553000             🧑  作者: Mango

代码示例1
import * as FileSystem from 'expo-file-system';
import * as IntentLauncher from 'expo-intent-launcher';

try {

  const cUri = await FileSystem.getContentUriAsync(uri);
             
  await IntentLauncher.startActivityAsync("android.intent.action.VIEW", {
      data: cUri,
      flags: 1,
      type: "application/pdf",
  });
}catch(e){
    console.log(e.message);
}