Code Monkey home page Code Monkey logo

android-instant-apps's Introduction

Android Instant Apps - Sample code collection

This repo has been migrated to github.com/android/app-bundle. Please check that repo for future updates. Thank you!

android-instant-apps's People

Contributors

codingjeremy avatar dakshj avatar donaldchai avatar keyboardsurfer avatar tjohns avatar udamsaini avatar zavidovych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-instant-apps's Issues

Running the app fails on Android Studio 3.0 Canary 4

Android Studio 3.0 Canary 4
Build #AI-171.4101728, built on June 15, 2017
JRE: 1.8.0_112-release-b736 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.10.5

Tried running multi-feature-module via Android Studio and it complains of having no default activity set. Editing the run configuration to include the default-url (https://multi-feature.instantappsample.com/main) brings up an interesting error:
screen shot 2017-06-21 at 12 44 28

screen shot 2017-06-21 at 12 40 36

Merging the intent filters in the manifest seem to fix the issue:

<data android:host="multi-feature.instantappsample.com"
                      android:pathPrefix="/main"
                      android:scheme="https" />
<data android:host="multi-feature.instantappsample.com"
                      android:pathPrefix="/main"
                      android:scheme="http" />

FWIW, I remember being able to run this sample on Canary 3.

Instant app doesn't build: Invalid dimen

The assembleDebug task fails with the following error message when I try to run the instant module, the installed module starts fine.
I tried creating a new project as well as using the sample project here but both fail.

instant_app

https://pastebin.com/r1LfsLTR

I have Ubuntu 16.04 and just installed Android Studio 3 with the latest tools.

Side loading instant app failed:Failure when trying to read bundle.

Full error logs here,

Side loading instant app failed: Failure when trying to read bundle. Instant App com.example.instantdemo requires an SDK version which is newer than the one installed on device. Please update the SDK on the device.

The development environment same as https://developer.android.com/topic/instant-apps/getting-started/setup.html

Android Studio 3.0 Canary 7
Build #AI-171.4182969, built on July 15, 2017
JRE: 1.8.0_152-release-884-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.5

compileSdkVersion 26
buildToolsVersion "26.0.0"
minSdkVersion 23
targetSdkVersion 26

Google Play services for Instant Apps version is version 1.9-sdk-155682639.

How to solve this issue?

Don't like productFlavors in all feature modules

When having a project that builds multiple flavors you just have to specify productFlavors in app/build.gradle and not in your library. But with instant apps you when have to specify all flavors in all feature modules? Just to set the dimension?
Why should feature "hallo" and "bye" care if the app comes in free and paid variants. It seems as that is very redundant. I guess you could but the productFlavors in a project level gradle file and refer to that with "apply from:" in the feature modules and the instant module, but it still looks ugly I think.
Is this "by design" in the new Android gradle plugin?

java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.job.IJobScheduler.cancel(int)' on a null object reference

Getting NPE in Andorid 7.0 (MI note 4)

12-20 15:08:45.689 17828-17828/? V/FA: Cancelling job. JobID: 1469022989
12-20 15:08:45.690 17828-17828/? D/AndroidRuntime: Shutting down VM
12-20 15:08:45.691 17828-17828/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.instant.analytics, PID: 17828
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.instant.analytics/com.example.android.instant.analytics.feature.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.job.IJobScheduler.cancel(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2696)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2757)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6237)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.job.IJobScheduler.cancel(int)' on a null object reference
at android.app.JobSchedulerImpl.cancel(JobSchedulerImpl.java:60)
at com.google.android.gms.internal.zzcki.zzbam(Unknown Source)
at com.google.android.gms.internal.zzcki.zzaxo(Unknown Source)
at com.google.android.gms.internal.zzcii.initialize(Unknown Source)
at com.google.android.gms.internal.zzchj.(Unknown Source)
at com.google.android.gms.internal.zzchj.zzdu(Unknown Source)
at com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source)
at com.example.android.instant.analytics.feature.MainActivity.onCreate(MainActivity.java:45)
at android.app.Activity.performCreate(Activity.java:6847)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2649)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2757) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:163) 
at android.app.ActivityThread.main(ActivityThread.java:6237) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

"Try now" button not showing up with hello-java example

Hi, I'm using hello-java example.
I updated Android Manifest with the correct URLs and uploaded both installed and instant app to Google Play Console but the "Try now" button is not showing up in Google Play Store.

If I use adb to trigger the intent on a real device, the device loads the instant app correctly.

adb shell am start -a android.intent.action.VIEW -d "https://xxx/hello"

Any idea?

Thank you

Flavors example not working on 3.0 Canary 5

If I import the flavors project in Android Studio 3.0 Canary 5, I see this in the Build Variants panel:
selection_023

Trying to change for example the base module to freeDebug the selection is back to paidDebug and I see this warning:
selection_024

Warning:Module 'base' has variant 'freeRelease' selected, but the modules ['bye', 'hello'] depend on variant 'paidDebug'
<a href="select.conflict.in.variants.window">Select 'base' in "Build Variants" window</a><br><a href="fix.conflict">Fix problem</a>

I do see in the list of Build Variants for the feature modules this extra varaints:

  • freeDebugFeature
  • freeReleaseFeature
  • paidDebugFeature
  • paidReleaseFeature

Is this expected? I can't figure out how to switch build variants and why they aren't aligned to the app module.

Reading bundle timed out

IDE: Android Studio 3.0.1 Device: Samsung C5 Pro (Google Account Signin, InstantApp turn On)
Log: 01/25 16:43:00: Launching instant
Side loading instant app.
Side loading instant app.
Side loading instant app.
Side loading instant app.
Side loading instant app failed: Reading bundle timed out.
Error while Uploading and registering Instant App

Test Error

Hey, it's ok, I publish develop instant app on play store. error messages:
You must use at least one APK that maps to the "xxxx.com" site via the network "intent-filter" when I publish to preview instant app.
what's problem?

Lifecycle Fragments

It doesn't seem that the LifecycleFragment actually works in feature modules. I don't think I'm the only one with the issue or if this is the right channel to be posting on. :/

Project not Building

Error:failed parsing overlays.
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process C:\Android\Sdk\build-tools\26.0.0-rc2\aapt2.exe with arguments {link -I C:\Android\Sdk\platforms\android-25\android.jar --manifest C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\manifests\full\debug\AndroidManifest.xml -R @C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\incremental\processDebugResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\generated\source\r\debug -o C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\res\debug\resources-debug.ap_ --custom-package com.example.android.unsplash -0 apk --output-text-symbols C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\symbols\debug\R.txt --no-version-vectors}
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\Android\Sdk\build-tools\26.0.0-rc2\aapt2.exe with arguments {link -I C:\Android\Sdk\platforms\android-25\android.jar --manifest C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\manifests\full\debug\AndroidManifest.xml -R @C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\incremental\processDebugResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\generated\source\r\debug -o C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\res\debug\resources-debug.ap_ --custom-package com.example.android.unsplash -0 apk --output-text-symbols C:\Users\ESIDEM jnr\Desktop\android-instant-apps-master\multi-feature-module\installed\build\intermediates\symbols\debug\R.txt --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command 'C:\Android\Sdk\build-tools\26.0.0-rc2\aapt2.exe'' finished with non-zero exit value 1
Error:Execution failed for task ':installed:processDebugResources'.

Failed to execute aapt
screenshot 111

do any of these have unit tests?

if not, can i convert one of these to mvp, add unit tests and submit a pr? only ui tests deprives the student of a full education

multi-feature-module uses api instead of implementation

The Android documentation says feature modules should use "implementation" instead of "api" while adding base module in their dependencies.

"The two individual feature modules use the implementation project expression within their dependencies block"

All samples that have base modules use "implementation" but multi-feature-module sample uses "api" in here and here.

Permission not allowed on Samsung device

I met a crash issue when instant app running on Samsung device, here is the crash log:

  Fatal Exception: java.lang.SecurityException: Setting aod_show_state is not accessible from ephemeral package xx.xx.xx
     at android.os.Parcel.readException(Parcel.java:1958)
     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
     at android.content.ContentProviderProxy.call(ContentProviderNative.java:651)
     at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:1923)
     at android.provider.Settings$System.getStringForUser(Settings.java:2229)
     at android.provider.Settings$System.getIntForUser(Settings.java:2299)
     at android.provider.Settings$System.getInt(Settings.java:2294)
     at android.view.ViewRootImpl$1.toViewScreenState(ViewRootImpl.java:1363)
     at android.view.ViewRootImpl$1.onDisplayChanged(ViewRootImpl.java:1319)
     at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:966)
     at android.os.Handler.dispatchMessage(Handler.java:105)
     at android.os.Looper.loop(Looper.java:164)
     at android.app.ActivityThread.main(ActivityThread.java:6938)
     at java.lang.reflect.Method.invoke(Method.java)
     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Seems like it's trying to access the aod_show_state Settings(which is the specific feature called "Always on Display" on Samsung device), and it requires permission WRITE_SETTINGS/WRITE_SECURE_SETTINGS, and the instant app does not support these two permissions, then app crashed...

Is there any way to solve this problem?

Side loading instant app failed: Reading bundle timed out

After updating Android Studio 3.0 (Canary-4 > Canary-5) & Emulator system image from revision (20 > 21). I'm unable to run the instant App through emulator. Always I'm getting the error message saying

"Side loading instant app failed: Reading bundle timed out."

Posted my issue in SO here; but no solution yet.

Can not use WiFi related features?

Caused by: java.lang.SecurityException: Broadcast android.net.wifi.supplicant.STATE_CHANGE not available to instant apps

Caused by: java.lang.SecurityException: Broadcast android.net.wifi.WIFI_STATE_CHANGED not available to instant apps

MethodInvocationProxy : Exception while calling method public abstract android.os.Messenger android.net.wifi.IWifiManager.getWifiServiceMessenger() throws android.os.RemoteException
                                            java.lang.SecurityException: Method class android.net.wifi.IWifiManager$Stub$Proxy.getWifiServiceMessenger not available to instant apps

register:
IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
IntentFilter(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);

Unable to connect to Google Play Service.

Unable to connect to Google Play Service. ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}  token=59b25c9c-8c78-4340-8292-f920d9a4273f

06/05 17:11:54: Launching instantapp
Uploading Instant App to pre O device.
Starting / refreshing Instant App services
DevMan error: Unable to connect to Google Play Service. ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}  
$ adb shell pm uninstall com.dolphinwifi.myapplication
Unknown failure (at android.os.Binder.execTransact(Binder.java:565))
Error while Uploading and registering Instant App

nexus 5x Android 7.1.2
gps 11.0.38
gps for instant apps 1.9
instant apps dev manager 1.0.155672963

Non-upgradable to installed app

Hello,
I know that this error is not related to this repository, but I'm confused with some situation.
A few days ago I wrote a post on stackoverflow but I didn't receive an answer. Link
I'm trying to upload my instant app apks, but when Itry to rollout, I see this:

Non-upgradable to installed app
PROBLEM
Some users of this Instant App APKs will not be eligible for any of the APKs in your installed app.
RESOLUTION
Ensure that the targeting of your Instant App APKs matches the targeting of your APKs.

My project structure is:
zrzut ekranu 2017-09-04 o 17 16 42
Where:

  • blogspace-base is base feature with:
    application project(':blogspace-apk')
    feature project(':blogspace-item-details')
    api project(':shared')
    api project(':rxfirebase')
  • blogspace-ui is feature with:
    api project(':blogspace-base')
    implementation project(':shared')
    implementation project(':customcomponents')
    implementation project(':materialsearchbar')
    implementation project(':admobadapter')
    implementation project(':base64thumbs')
    implementation project(':blogspace-chrome')
    implementation project(':rxfirebase')
  • blogspace-item-details is feature module with:
    api project(':blogspace-base')
    implementation 'com.google.android.instantapps:instantapps:1.0.0'
  • blogspace-apk is apk module with:
    implementation project(':blogspace-ui')
    implementation project(':blogspace-item-details')
  • blogspace-instant is instant app module with:
    implementation project(':blogspace-base')
    implementation project(':blogspace-item-details')

Others module's are libraries. (Note that module blogspace-ui is not included in instant app).
All modules has: minSdkVersion 18, targetSdkVersion 26, compileSdkVersion 26.
Correct me if I'm wrong, but instant apps targeting matches one to one targeting of installable app. So, all users of instant app should be able to download and install installable app.

Is the error which I see is due to configuration / code errors? Or because of errors in the Google Play console?

Please help.

Not a big deal, but this block is probably not required. And another question on dependencies.

As title. I commented out this block and everything still goes fine. (Android Studio 3.0 Beta 2)

https://github.com/googlesamples/android-instant-apps/blob/39b51376a71b3c3485dd3fb547f587c70bc180f9/hello-feature-module/features/hello/build.gradle#L37-L43


And actually I'm facing that problem in my own project:

Android dependency 'com.android.support:support-v4' has different version for the compile (21.0.3) and runtime (26.0.1) classpath. You should manually set the same version via DependencyResolution

What I'm trying is to refactor my app to an instant app. In my base-feature module, since I'm using data binding, which the 21.0.3 comes from, the sync error pasted above will occur if I add support-v4 dependency explicitly:
implementation 'com.android.support:support-v4:26.0.1'

If I don't do so and exclude the support-v4 module from other dependencies, there will be no sync error but those methods later than support-v4:21.0.3 cannot be resolved.

So one possible solution I'm considering currently is to exclude the support-v4 module from data binding itself, but I have no idea how to do that.
It would be greatly appreciated if anyone could help me out of this trouble. Many thanks.

How i can test install api?

I need test restoring state after installing aplication. How i can do it without publishing new version in market?

cannot switch to debug variant

i'd like to change the both modules to debug variant, but i encount an issue~~~
issue10098
as the pic above, i can not switch the module named GluttonyGame to debug variant even though i select 'debug' option showed in the pic thousands of times(PS: ide refuse to change to debug, refuse my request)~~~but i can switch the module libcocos2d to debug variant, then it shows this:
issue10099
i don't know what is happening!!!

Android Studio 3.0
Build #AI-171.4408382, built on October 21, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Instant app crashing in Samsung device

I have deployed Instant app in playstore. When i press Try Now it launches activity as usual, but after some time it is crashing. From the log listed below, It seems Sensor permission is missing, If it is so why the same error is not coming in other branded android devices Or is there any separate fix for this issue in samsung device

SAMSUNG
07-11 11:27:28.562 14316-14422/? E/Isotope: UID: [10159] PID: [14316] MethodInvocationStub : Exception while calling method isAccessoryKeyboard
java.lang.SecurityException: Method class com.android.internal.view.IInputMethodManager$Stub$Proxy.isAccessoryKeyboard[] not available to instant apps
at com.google.android.instantapps.supervisor.ipc.common.SandboxEnforcer.enforceUnsupportedPolicy(SandboxEnforcer.java:265)
at com.google.android.instantapps.supervisor.ipc.common.SandboxEnforcer.enforceUnsupportedMethodPolicy(SandboxEnforcer.java:82)
at com.google.android.instantapps.supervisor.ipc.ProxyMethodHandler.handleMethod(ProxyMethodHandler.java:181)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationStub.onTransact(MethodInvocationStub.java:175)
at android.os.Binder.execTransact(Binder.java:573)
07-11 11:27:28.564 14904-14904/? E/Isotope: UID: [99003] PID: [14904] MethodInvocationProxy : Exception while calling method public abstract int com.android.internal.view.IInputMethodManager.isAccessoryKeyboard() throws android.os.RemoteException
java.lang.SecurityException: Method class com.android.internal.view.IInputMethodManager$Stub$Proxy.isAccessoryKeyboard[] not available to instant apps
at android.os.Parcel.readException(Parcel.java:1693)
at android.os.Parcel.readException(Parcel.java:1646)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(MethodInvocationProxy.java:238)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(MethodInvocationProxy.java:472)
at java.lang.reflect.Proxy.invoke(Proxy.java:813)
at $Proxy36.isAccessoryKeyboard(Unknown Source)
at android.view.inputmethod.InputMethodManager.isAccessoryKeyboardState(InputMethodManager.java:3140)
at android.widget.SearchView$SearchAutoComplete.onWindowFocusChanged(SearchView.java:2140)
at android.view.View.dispatchWindowFocusChanged(View.java:11022)
at android.widget.EditText.dispatchWindowFocusChanged(EditText.java:265)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4131)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
07-11 11:27:28.606 1025-2397/? E/SensorService: getSensorList a sensor (Sensor Diagnostic Monitor) without holding its required permission: com.samsung.permission.SSENSOR
07-11 11:27:28.862 14904-14904/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: xxx.yyy.zzz, PID: 14904
java.lang.SecurityException: Method class com.android.internal.view.IInputMethodManager$Stub$Proxy.isAccessoryKeyboard[] not available to instant apps
at android.os.Parcel.readException(Parcel.java:1693)
at android.os.Parcel.readException(Parcel.java:1646)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(MethodInvocationProxy.java:238)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(MethodInvocationProxy.java:472)
at java.lang.reflect.Proxy.invoke(Proxy.java:813)
at $Proxy36.isAccessoryKeyboard(Unknown Source)
at android.view.inputmethod.InputMethodManager.isAccessoryKeyboardState(InputMethodManager.java:3140)
at android.widget.SearchView$SearchAutoComplete.onWindowFocusChanged(SearchView.java:2140)
at android.view.View.dispatchWindowFocusChanged(View.java:11022)
at android.widget.EditText.dispatchWindowFocusChanged(EditText.java:265)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4131)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
07-11 11:27:28.877 14316-14327/? E/Isotope: UID: [10159] PID: [14316] IActivityManagerProxy : Instant app: xxx.yyy.zzz crashed: java.lang.SecurityException: Method class com.android.internal.view.IInputMethodManager$Stub$Proxy.isAccessoryKeyboard[] not available to instant apps
at android.os.Parcel.readException(Parcel.java:1693)
at android.os.Parcel.readException(Parcel.java:1646)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(MethodInvocationProxy.java:238)
at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(MethodInvocationProxy.java:472)
at java.lang.reflect.Proxy.invoke(Proxy.java:813)
at $Proxy36.isAccessoryKeyboard(Unknown Source)
at android.view.inputmethod.InputMethodManager.isAccessoryKeyboardState(InputMethodManager.java:3140)
at android.widget.SearchView$SearchAutoComplete.onWindowFocusChanged(SearchView.java:2140)
at android.view.View.dispatchWindowFocusChanged(View.java:11022)
at android.widget.EditText.dispatchWindowFocusChanged(EditText.java:265)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4131)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
07-11 11:27:28.920 14316-14316/? E/Isotope: UID: [10159] PID: [14316] IsolatedConnection : Isolated service: 'ComponentInfo{com.google.android.instantapps.supervisor/com.google.android.instantapps.supervisor.isolatedservice.IsolatedService15}' abnormally disconnected.
07-11 11:27:40.927 1025-1723/? E/Watchdog: !@sync 103 [2018-07-11 11:27:40.927]

gradle sync error on 3.0 canary 5

whenever i try to sync one of the example projects i am getting the following error:

Error:Android Gradle plugin 3.0.0-alpha5 must not be applied to project ...../AndroidStudioProjects/android-instant-apps/multi-feature-module/base since version 3.0.0-alpha5 was already applied to this project

screen shot 2017-07-04 at 11 11 57

Is there any work around?

Instant app on Android Wear

Hello, everyone!

Is it possible to open an instant app on an Android Wear device? Or to develop an instant app that could be specifically opened only on an Android Wear ex. watch?

sorry, I'm not opening an actual issue, but I don't know where to ask :)
Thank you!

IsInstantApp is always false

Hi,
InstantApps.isInstantApp(this) always return false even when running instant app. Do you have any idea why?

Regards,

won't build -> Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidUnitTest.setTestClassesDirs(Lorg/gradle/api/file/FileCollection;)V'.

I am trying to build multi-feature-module on android studio 3 canary 4
I had to change the build gradle, because it was not able to find gradle:3.0.0-alpha1
But i am getting an error when i press gradle sync button. I cleared cache, deleted and recloned the project. I won't work. Also the error does not make sense at all.

Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidUnitTest.setTestClassesDirs(Lorg/gradle/api/file/FileCollection;)V'.

`ext {
buildTools = "26.0.0"
compileSdk = 25
targetSdk = 25
minSdk = 23
versionCode = 1
versionName = "1.0"
supportLib = "25.3.1"
glide = "3.7.0"
retrofit = "1.9.0"
keystoreProperties = new Properties()

}

def keystorePropertiesFile = rootProject.file("keystore.properties")
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
}
}`

Session 'instant': Error Launching URL

Hope get response as soon as possible, thanks a lot! >_<

I didn't change any thing of the sample project.

The picture following is the instant APP run configuration.

image

Failed to load instant app in release build

Everything works fine in debug build, but when I switch to release build, error messages look like this:

10/19 14:02:10: Launching instant
Side loading instant app.
Side loading instant app.
Side loading instant app.
Side loading instant app.
Side loading instant app failed: Failure when trying to read bundle. Failed to parse app: /data/local/tmp/aia/instant-release.zip 
Error while Uploading and registering Instant App

I have tried these combinations:
modules: hello-feature-module, hello-java, hello-kotlin, and my own project
actions: rebuild, clear cache, clear data and uninstall "Instant Apps Dev Manager"
environment: Android Studio 3.0.0 RC1, 3.0.0 beta7

Thank you for your help!

Project failed to parse error

Hi,

I'm trying to run my instant app module but I've got the error DevMan error: Failed to parse app: /data/local/tmp/aia/...

However, when I run the command adb install -r -t my-base-debug.apk it gives success.

"Missing google_app_id. Firebase Analytics disabled." when running installed app of Analytics sample.

Hi,

I'm facing the problem as I wrote in the title, with the latest version of Firebase.
The instant app works fine and I can find myself immediately being tracked on StreamView. However when running the installed one, the error came out and of course nothing appears on StreamView.

03-26 10:00:29.308 13498-13514/com.example.android.instant.analytics E/FA: GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id.
03-26 10:00:29.318 13498-13514/com.example.android.instant.analytics E/FA: Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
03-26 10:00:29.324 13498-13514/com.example.android.instant.analytics E/FA: Uploading is not possible. App measurement disabled

Anyone has ideas?

Android Architecture Components ( Android Jetpack ) breaks Instant Apps

I have an android project that supports instant apps.
So, I have these in the base feature

api 'androidx.appcompat:appcompat:1.0.0-alpha1'
api 'androidx.constraintlayout:constraintlayout:1.1.0'
api "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"

when I have these the installable app doesn't launch with the following error Default activity not found

When I remove api "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"
the installable app doesn't give errors, but of course I'm missing a direct dependency here, so it doesn't build.

I have tried every version of the support library alongside every version and module of the new architecture components, I even tried using implementation instead of api, but nothing works.

It appears as if the architecture components break instant apps.

Also there are no conflicts.

+--- androidx.appcompat:appcompat:1.0.0-alpha1 | +--- androidx.annotation:annotation:1.0.0-alpha1 | +--- androidx.core:core:1.0.0-alpha1 | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.collection:collection:1.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 | | +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.arch.core:core-common:2.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | \--- androidx.annotation:annotation:1.0.0-alpha1 | +--- androidx.collection:collection:1.0.0-alpha1 (*) | +--- androidx.cursoradapter:cursoradapter:1.0.0-alpha1 | | \--- androidx.annotation:annotation:1.0.0-alpha1 | +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1 | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.core:core:1.0.0-alpha1 (*) | | +--- androidx.documentfile:documentfile:1.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.loader:loader:1.0.0-alpha1 | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-alpha1 | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1 (*) | | | | +--- androidx.arch.core:core-common:2.0.0-alpha1 (*) | | | | \--- androidx.arch.core:core-runtime:2.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | \--- androidx.arch.core:core-common:2.0.0-alpha1 (*) | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-alpha1 | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | \--- androidx.print:print:1.0.0-alpha1 | | \--- androidx.annotation:annotation:1.0.0-alpha1 | +--- androidx.fragment:fragment:1.0.0-alpha1 | | +--- androidx.core:core:1.0.0-alpha1 (*) | | +--- androidx.legacy:legacy-support-core-ui:1.0.0-alpha1 | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1 (*) | | | +--- androidx.customview:customview:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | \--- androidx.core:core:1.0.0-alpha1 (*) | | | +--- androidx.viewpager:viewpager:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | | \--- androidx.customview:customview:1.0.0-alpha1 (*) | | | +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | | \--- androidx.customview:customview:1.0.0-alpha1 (*) | | | +--- androidx.drawerlayout:drawerlayout:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | | \--- androidx.customview:customview:1.0.0-alpha1 (*) | | | +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | | \--- androidx.customview:customview:1.0.0-alpha1 (*) | | | +--- androidx.interpolator:interpolator:1.0.0-alpha1 | | | | \--- androidx.annotation:annotation:1.0.0-alpha1 | | | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | +--- androidx.core:core:1.0.0-alpha1 (*) | | | | \--- androidx.interpolator:interpolator:1.0.0-alpha1 (*) | | | +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0-alpha1 | | | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | | | \--- androidx.core:core:1.0.0-alpha1 (*) | | | \--- androidx.cursoradapter:cursoradapter:1.0.0-alpha1 (*) | | +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1 (*) | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | +--- androidx.loader:loader:1.0.0-alpha1 (*) | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1 (*) | +--- androidx.vectordrawable:vectordrawable:1.0.0-alpha1 | | +--- androidx.annotation:annotation:1.0.0-alpha1 | | \--- androidx.core:core:1.0.0-alpha1 (*) | \--- androidx.vectordrawable:vectordrawable-animated:1.0.0-alpha1 | +--- androidx.vectordrawable:vectordrawable:1.0.0-alpha1 (*) | \--- androidx.legacy:legacy-support-core-ui:1.0.0-alpha1 (*) +--- androidx.constraintlayout:constraintlayout:1.1.0 | \--- androidx.constraintlayout:constraintlayout-solver:1.1.0 \--- androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1 +--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*) +--- androidx.arch.core:core-common:2.0.0-alpha1 (*) +--- androidx.arch.core:core-runtime:2.0.0-alpha1 (*) +--- androidx.fragment:fragment:1.0.0-alpha1 (*) +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1 (*) +--- androidx.lifecycle:lifecycle-livedata:2.0.0-alpha1 | +--- androidx.arch.core:core-runtime:2.0.0-alpha1 (*) | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-alpha1 (*) | \--- androidx.arch.core:core-common:2.0.0-alpha1 (*) +--- androidx.lifecycle:lifecycle-process:2.0.0-alpha1 | \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*) +--- androidx.lifecycle:lifecycle-service:2.0.0-alpha1 | \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*) \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1 (*)

I don't know where else to report this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.