fluttercommunity / community

Flutter Community - A central place for community made Flutter content.
1.56k stars 121 forks source link

Discussion: PlatformException error, No Activity found to handle Intent #114

Closed portal305 closed 1 year ago

portal305 commented 1 year ago

Discussion: PlatformException error, No Activity found to handle Intent

Hi everyone, I need help for my app. I'm trying to open the RetroArch Emulator via Intent. This is the code:

try{
      AndroidIntent intent = const AndroidIntent(
        action: 'action_view',
        data: 'com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture',
        flags: [Flag.FLAG_ACTIVITY_NEW_TASK, Flag.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED],
        arguments: {'ROM': '/storage/emulated/0/Roms/GB/<Rom Name>','LIBRETRO': '/data/user/0/com.retroarch.aarch64/cores/sameboy_libretro_android.so', 'CONFIGFILE': '/storage/emulated/0/Android/data/com.retroarch.aarch64/files/retroarch.cfg'},
      );
      await intent.launch();
}catch(e){
   log(e.toString());
}

I get this error even if I have the app installed:

PlatformException(error, No Activity found to handle Intent { act=android.intent.action.VIEW dat=com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture flg=0x10200000 (has extras) }, null, android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=com.retroarch.aarch64/com.retroarch.browser.retroactivity.RetroActivityFuture flg=0x10200000 (has extras) }

Can somebody help me please!