android-instant-apps

What dependencies should one be putting in each module of an instant app?

五迷三道 提交于 2019-12-05 11:52:00
I'm in the process of writing an instant app for others to learn how to write an instant app and hoping to get some ideas on how to best structure the app for dependencies. Now reading the Android developer docs on project structure and referencing the diagram below: I'm wondering with the new gradle 3.0 dependency configurations , what libraries should live in which modules? Base Feature I was thinking pretty much anything in the base feature module should be using the api gradle configuration since the base feature module essentially compiles down to an AAR library file. One question I might

Instant Apps Camera Intent

拈花ヽ惹草 提交于 2019-12-05 11:38:18
I developed and Instant App which one I would like to take a picture with the camera. Everything work if I launch the Installed App . But with Instant App , I get the following error : java.lang.SecurityException: Not allowed to start activity Intent { act=android.media.action.IMAGE_CAPTURE launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } Here my code : AndroidManifest.xml <uses-permission android:name="android.permission.CAMERA" /> Activity : private static int CAMERA_REQUEST = 1234; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)

Is there an Android build flag to check for APK versus Instant App version of an App

谁说我不能喝 提交于 2019-12-05 08:46:30
Just like BuildConfig.FLAVOR and BuildConfig.DEBUG is there a build flag to check at runtime for the APK version or the Instant App version of an Android application ? Or is there another way to get the information ? Guillaume Add to the module build.gradle the dependency : implementation 'com.google.android.instantapps:instantapps:1.0.0' then you will be able to use the function InstantApps.isInstantApp(this) . Please note that you must use Maven Google by changing your repositories in the project build.gradle : buildscript { repositories { maven { url 'https://maven.google.com' } jcenter() }

Instant Apps: “You should have at least one active APK that is mapped to site 'sample.com' via a web 'intent-filter' ” when pushing to production

不打扰是莪最后的温柔 提交于 2019-12-04 19:32:13
I'm getting the error message when releasing instant-app to production. I've read this post here: You should have at least one active APK that is mapped to site 'sample.com' via a web 'intent-filter' and this is a bit more specific. The answer in the above link states: Upload installable APK in alpha, beta or production with same HOST web 'intent-filter'. I uploaded an installable apk w/ the intent-filter to alpha and that the error message went away when releasing my instant-app to pre-release, but when releasing instant-app to production I'm getting the same error. You should have at least

Android Production Instant App not showing “Try Now” button in google playstore

落花浮王杯 提交于 2019-12-04 12:42:22
I have uploaded an installable app and added an instant app in playstore. Everything went smooth. No errors. And moved both of that to production. But try now button is not enabled. Only thing I can able to see is Install button. Also my app link url is also leading to web not instant app. Can some one please help me out. Playstore will take nearly a day to reflect "try now" button in the play store for your instant app. Probably it's because it needs to index your url to all Google search engine servers. 来源: https://stackoverflow.com/questions/49397810/android-production-instant-app-not

Instant Apps with NFC

北战南征 提交于 2019-12-04 10:13:18
问题 I'm trying to get an instant app to be opened via NFC. I have something like the below in my AndroidManifest.xml <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <action android:name="android.nfc.action.NDEF_DISCOVERED" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" /> <data android:scheme="http" /> <data android:host="example-refresh

Android Emulator is not running on Android Studio 3.0

时光怂恿深爱的人放手 提交于 2019-12-04 06:02:59
I am trying to create a demo instant app which was demonstrated at Google IO 2017. I see, this needs Android Studio 3.0 and latest build tools and only few devices are white-listed to use this newly introduced concept. Here, you can see that I have created an avd machine named Nexus 5X , I captured details of created machine, here you can see: Name: Nexus_5X_API_25 CPU/ABI: Google APIs Intel Atom (x86) Path: C:\Users\williams\.android\avd\Nexus_5X_API_25.avd Target: google_apis [Google APIs] (API level 25) Skin: nexus_5x SD Card: C:\Users\williams\.android\avd\Nexus_5X_API_25.avd\sdcard.img hw

Android Instant App not being installed correctly(Behaves like a normal app)

孤街浪徒 提交于 2019-12-04 01:54:49
问题 I am trying to launch an instant app to the mobile using the following steps: Generate signed apk of Instant App in Android Studio, which would produce a zip file containing Base apk file and feature apk files. Unzip the generated file. Use command adb install-multiple -r -t *.apk to install the app. I was told to use adb install-multiple -r -t --instantapp *.apk but --instantapp tag would give me a following error: Exception occurred while dumping: java.lang.IllegalArgumentException: Unknown

Android InstantApp: Foreground service

瘦欲@ 提交于 2019-12-03 21:08:21
Unable to use foreground service inside InstantApp feature module. Getting below runtime security exception. java.lang.RuntimeException: Unable to start activity ComponentInfo{ . .XYZActivity}: java.lang.SecurityException: Method class android.app.ActivityManagerProxy.getServices not available to instant apps Android document says, Restricted features: Run on the device without users being aware. Foreground services are available. Instant apps can only be started through activities that support App Links, so services, content providers or broadcast receivers won't be able to start your app.

Building an Android Instant App with Application Component from Dagger

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 09:52:27
I'm currently experimenting with InstantApps and would like to include dagger into my project. I'm facing an issue setting up an application AppComponent. My application component includes all the feature dagger modules of my app. I basically have: One Base app module containing my Application class Multiple features with each a dagger Module per Activity, all with Base as a dependency. One app module and instant module both importing all the features and the base app module. I'm trying to figure out the setup before adding the Instant App module. From InstantApps documentation and project