Is it possible to discover and run third-party Android Instant Apps on an emulated device?

后端 未结 2 546
梦谈多话
梦谈多话 2021-02-05 15:16

I\'m currently trying to learn about Android instant apps. Since I don\'t own any real devices that support them, I\'m using the emulator (from Android Studio 3.0 Canary 9). I c

2条回答
  •  无人共我
    2021-02-05 15:42

    When you enable Android Instant App from App Link Assistant, your Activity that you want to directly launch (or have information on your website) gets modified as below:

    
                
                    
    
                    
                    
    
                    
                
            
    

    Hence, when you get third-party apps, you must modify AndroidManifest.xml file as above.

    And, to be able to link your instant activity (for eg, AboutActivity), you have to save the generated assetlinks.json inside the .well-known folder of your website root folder as /.well-known/assetlinks.json

    There is a reverse engineering tool that lets you modify AndroidManifest.xml file.

    Note: As you don't need uses-permission tag for Instant apps, you don't need to resign it.

    As you are not handling AppLink intent, you don't need

    // ATTENTION: This was auto-generated to handle app links.
    Intent appLinkIntent = getIntent();
    String appLinkAction = appLinkIntent.getAction();
    Uri appLinkData = appLinkIntent.getData();
    

    So, up to my understanding, it is possible to run third-party Android instant Apps on supported emulator devices. I apologize if I misunderstood your question.

提交回复
热议问题