Giter Site home page Giter Site logo

google / play-instant-unity-plugin Goto Github PK

View Code? Open in Web Editor NEW
143.0 30.0 39.0 29.18 MB

Google Play Instant Plugin for Unity Beta (Archived)

Home Page: https://developer.android.com/topic/google-play-instant/getting-started/game-unity-plugin

License: Apache License 2.0

C# 100.00%
instant unity android

play-instant-unity-plugin's Introduction

Google Play Instant Plugin for Unity Beta (Archived)

Overview

The code for this project has been migrated to the Google Play Plugins for Unity project, and this GitHub project is now archived.

Refer to the developer documentation for the latest information about the Google Play Instant Plugin for Unity.

Migration details

Some of the files in this archived GitHub project have the same Guid as files in the new GitHub project. This allows projects that are using Play assets, such as the LoadingScreen MonoBehaviour, to still work after migrating.

The new Google Play Plugins for Unity project uses the namespace Google.Play.Instant instead of GooglePlayInstant, so any using GooglePlayInstant; statements will have to be updated.

The new Google Play Plugins for Unity no longer supports the ability to set a custom instant apps URL.

Migration steps

  1. Familiarize yourself with the download and import process for the new plugin, and either download the new .unitypackage file or set up the Game Package Registry for Unity.

  2. Delete the existing Assets/GooglePlayInstant directory (if you previously imported from a .unitypackage file) or the Assets/play-instant-unity-plugin directory (if you previously imported via git clone). Note that at this point there may be errors such as "error CS0103: The name `InstallLauncher' does not exist in the current context" in the project.

  3. Import the .unitypackage obtained from the first step or install the Google Play Instant package in Unity Package Manager.

  4. Change any using GooglePlayInstant; statements to using Google.Play.Instant;.

Known issues

Launching an instant app from the Play Store redirects to the browser

This issue occurs when launching an instant app if the following is true:

  1. Your currently released instant app is launchable via a custom URL.
  2. You have uploaded a version of your instant app that does not specify a custom URL to alpha or internal test.
  3. You are trying to launch this non-production version of your instant app.

The latest plugin no longer supports the ability to set a custom instant apps URL. If your app previously included a custom instant apps URL, uploading an app built with the latest plugin could trigger this issue.

There are two workarounds:

  1. The issue will not occur for an instant app in production, so release the app to production to eliminate the issue.
  2. If you'd prefer to fix the issue in alpha, add the browsable intent filter and default url tags to the UnityPlayerActivity in your app's manifest:
<intent-filter
    android:autoVerify="true">

    <action
        android:name="android.intent.action.VIEW" />

    <category
        android:name="android.intent.category.BROWSABLE" />

    <category
        android:name="android.intent.category.DEFAULT" />

    <data
        android:scheme="http"
        android:host="<url-host>"
        android:pathPrefix="<url-path-prefix>" />

    <data
        android:scheme="https"
        android:host="<url-host>"
        android:pathPrefix="<url-path-prefix>" />
</intent-filter>

<meta-data
    android:name="default-url"
    android:value="<the-default-url-of-your-released-app>" />

play-instant-unity-plugin's People

Contributors

alanklma avatar frenb avatar jamcohen avatar thanwah 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

play-instant-unity-plugin's Issues

Error parsing a meta element's content: ';' is not a valid key-value pair separator.

Hello, I want to work with your plugin but I have some problems. So, I did all about you write in manual and start to build test apk, after that I launch my app and open a browser and go to https(or http)://instant.apps/com.product.name and nothing happens. I start to see logs via adb and find that string:

08-01 10:51:57.391: I/chromium(12647): [INFO:CONSOLE(1)] "Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead.", source: http://instant.apps/com.product.name(1)

Can you help me please?

For tests I create some libraby with empty activity:

<activity android:name="com.product.TestActivity">
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http" />
        <data android:scheme="https" />
        <data android:host="instant.apps" />
        <data android:path="/${applicationId}" />
    </intent-filter>
</activity>

And also I tried it with/without this:
<meta-data android:name="default-url" android:value="https://instant.apps/${applicationId}" />

Build and Run works perfectly but does not launch on uploading to play console

So 'build and run' works perfectly on my device. I build my project for play console using 'Build for Play console', upload the .zip and get the following log after tapping the 'Try Now' button from my app listing page

01-28 21:09:06.386: I/ActivityManager(890): START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=https://instant.app/... flg=0x10000000 pkg=com.darkwingrace.play cmp=com.android.vending/com.google.android.finsky.instantapps.EphemeralInstallerActivity (has extras)} from uid 10016 pid 10585 01-28 21:09:06.396: D/ActivityTrigger(890): activityStartTrigger: Activity is not Triggerred in full screen ApplicationInfo{41e95ef com.android.vending} 01-28 21:09:06.396: D/ActivityTrigger(890): activityResumeTrigger: Activity is not Triggerred in full screen ApplicationInfo{41e95ef com.android.vending} 01-28 21:09:06.396: D/ActivityTrigger(890): ActivityTrigger activityPauseTrigger 01-28 21:09:06.398: D/RestartProcessManager(890): increase duration : 3911 for com.android.vending 01-28 21:09:06.400: I/AppLifecycleTracker(10585): onActivityPaused: 01-28 21:09:06.400: D/ActivityTrigger(890): activityResumeTrigger: Activity is not Triggerred in full screen ApplicationInfo{41e95ef com.android.vending} 01-28 21:09:06.401: E/ActivityManager(890): applyOptionsLocked: Unknown animationType=0 01-28 21:09:06.401: D/RestartProcessManager(890): Update Total Launch Times :com.android.vending 01-28 21:09:06.401: D/RestartProcessManager(890): updateSelf : com.android.vending, size : 30 01-28 21:09:06.401: D/RestartProcessManager(890): Last Running Package : com.android.vending , start time 1548689946401 01-28 21:09:06.401: W/ActivityThread(10713): handleWindowVisibility: no activity for token android.os.BinderProxy@88c4f2c 01-28 21:09:06.419: I/Finsky:instant_app_inst(10713): [241] com.google.android.finsky.instantappsbackendclient.impl.x.a(76): GetAppSplits cache entry returned 01-28 21:09:06.420: W/Finsky:instant_app_inst(10713): [241] com.google.android.finsky.instantapps.e.ag.a(193): Ephemeral app installed by other installer. Skipping ephemeral install. 01-28 21:09:06.439: D/PhenotypeUpdateService(10713): onCreate called 01-28 21:09:06.441: D/ActivityTrigger(890): ActivityTrigger activityPauseTrigger 01-28 21:09:06.441: D/DecorView(10585): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@933f4b4[AssetBrowserActivity] 01-28 21:09:06.443: I/PlayCommon(10713): [190] com.google.android.play.b.g.d(132): Preparing logs for uploading 01-28 21:09:06.443: D/RestartProcessManager(890): Duration is too short, ignore : 40 in com.android.vending 01-28 21:09:06.443: W/PlayCommon(10713): [190] com.google.android.play.b.g.a(473): No account for auth token provided 01-28 21:09:06.443: I/PlayCommon(10713): [190] com.google.android.play.b.g.a(325): Connecting to server: https://play.googleapis.com/play/log?format=raw&proto_v2=true 01-28 21:09:06.451: D/PhenotypeUpdateService(10713): Registering with Phenotype 01-28 21:09:06.455: D/ActivityTrigger(890): activityResumeTrigger: The activity in ApplicationInfo{734718f com.android.vending} is now in focus and seems to be in full-screen mode 01-28 21:09:06.455: E/ActivityTrigger(890): activityResumeTrigger: not whiteListedcom.android.vending/com.android.vending.AssetBrowserActivity/81303000 01-28 21:09:06.456: D/RestartProcessManager(890): Update Total Launch Times :com.android.vending 01-28 21:09:06.456: D/RestartProcessManager(890): updateSelf : com.android.vending, size : 30 01-28 21:09:06.456: D/RestartProcessManager(890): Last Running Package : com.android.vending , start time 1548689946456 01-28 21:09:06.461: I/AppLifecycleTracker(10585): onActivityResumed: 01-28 21:09:06.487: W/SurfaceFlinger(747): Attempting to destroy on removed layer: AppWindowToken{be232ce token=Token{c36cbc9 ActivityRecord{d688fd0 u0 com.android.vending/com.google.android.finsky.instantapps.EphemeralInstallerActivity t9982}}}#0 01-28 21:09:06.559: I/RecentsModel(2816): onTaskStackChanged# mTaskChangeId=76 01-28 21:09:06.597: I/PlayCommon(10713): [190] com.google.android.play.b.g.a(416): Successfully uploaded logs. 01-28 21:09:07.970: I/Finsky(10585): [172] com.google.android.finsky.bo.an.run(6): Stats for Executor: Db-scheduled_acquisitions.db com.google.android.finsky.bo.ao@e829802[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]

Any idea why it may be happening ?

Install error building with Unity 2019.3

The buil works ok, but build and run throws this error:

The APK built successfully.

INFO - Analyzing files...

INFO - Checking device...

INFO - Pushing instant app to device...Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.google.android.instantapps.sdk.cli.RunCommand@49993335): com.google.android.instantapps.sdk.lib.AdbCommandException: ADB process exited with code 1: [install-multiple, -r, -t, --ephemeral, /var/folders/3w/3z34tmvj7pn_ty5gq4xvd21r0000gn/T/temp.apk]
Command output:
adb: failed to finalize session
Failure [-116: Instant app package must use targetSandboxVersion 2]

	at picocli.CommandLine.execute(CommandLine.java:837)
	at picocli.CommandLine.access$700(CommandLine.java:111)
	at picocli.CommandLine$RunAll.handleParseResult(CommandLine.java:1024)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:1100)
	at picocli.CommandLine.parseWithHandler(CommandLine.java:1053)
	at com.google.android.instantapps.sdk.cli.Main.aia(Main.java:96)
	at com.google.android.instantapps.sdk.cli.Main.main(Main.java:83)
Caused by: com.google.android.instantapps.sdk.lib.AdbCommandException: ADB process exited with code 1: [install-multiple, -r, -t, --ephemeral, /var/folders/3w/3z34tmvj7pn_ty5gq4xvd21r0000gn/T/temp.apk]
Command output:
adb: failed to finalize session
Failure [-116: Instant app package must use targetSandboxVersion 2]

	at com.google.android.instantapps.sdk.lib.AdbHelper$AdbTarget.adbRead(AdbHelper.java:527)
	at com.google.android.instantapps.sdk.lib.AdbHelper$AdbTarget.installMultiple(AdbHelper.java:277)
	at com.google.android.instantapps.sdk.lib.RunHandlerImpl.loadAppOPlus(RunHandlerImpl.java:639)
	at com.google.android.instantapps.sdk.lib.RunHandlerImpl.doRun(RunHandlerImpl.java:456)
	at com.google.android.instantapps.sdk.lib.RunHandlerImpl.runApks(RunHandlerImpl.java:207)
	at com.google.android.instantapps.sdk.cli.RunCommand.call(RunCommand.java:83)
	at com.google.android.instantapps.sdk.cli.RunCommand.call(RunCommand.java:16)
	at picocli.CommandLine.execute(CommandLine.java:830)
	... 6 more

Zip creation errors when path has spaces in it

Zip creation failed: Failed to run '/Library/Java/JavaVirtualMachines/default/Contents/Home/bin/jar cvf /Users/bfrenkel/Documents/InstantGames/Google Play Instant Sample/SphereBlastPCV1.zip -C /var/folders/js/zwj26yx53j1bw9ywks160ryr00772k/T/ base.apk'
stdout:
added manifest
adding: base.apk(in = 16531357) (out= 15605940)(deflated 5%)

stderr:
Play : no such file or directory
Instant : no such file or directory
Sample/SphereBlastPCV1.zip : no such file or directory

exit code: 1

Build error with Unity 2018.4 and IL2CPP

In Unity 2018.4.4f1, when building with IL2CPP enabled, throws this error (Mono works fine)

`Failed running /Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/valeria/Desktop/projects/fenix-instant-app-3/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Users/valeria/Library/Android/android-ndk-r16b" --map-file-parser="/Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/Il2Cpp/il2cppOutput"

stdout:
Building libil2cpp.so with AndroidToolChain
Output directory: /Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a
Cache directory: /Users/valeria/Desktop/projects/fenix-instant-app-3/Library/il2cpp_android_armeabi-v7a/il2cpp_cache
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:

Invocation was: Executable: /Users/valeria/Library/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Users/valeria/Library/Android/android-ndk-r16b/sysroot" -gcc-toolchain "/Users/valeria/Library/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Users/valeria/Library/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/valeria/Desktop/projects/fenix-instant-app-3/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/21516E1ED2CEE254E4E4ACA5569B6107.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException:

Invocation was: Executable: /Users/valeria/Library/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.4f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Users/valeria/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Users/valeria/Library/Android/android-ndk-r16b/sysroot" -gcc-toolchain "/Users/valeria/Library/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Users/valeria/Library/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/valeria/Desktop/projects/fenix-instant-app-3/Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/valeria/Desktop/projects/fenix-instant-app-3/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/21516E1ED2CEE254E4E4ACA5569B6107.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
at Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:366) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349) UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
GooglePlayInstant.Editor.PlayInstantBuilder:Build(BuildPlayerOptions) (at Assets/GooglePlayInstant/Editor/PlayInstantBuilder.cs:224)
GooglePlayInstant.Editor.PlayInstantBuilder:BuildAndSign(BuildPlayerOptions) (at Assets/GooglePlayInstant/Editor/PlayInstantBuilder.cs:173)
GooglePlayInstant.Editor.PlayInstantPublisher:Build() (at Assets/GooglePlayInstant/Editor/PlayInstantPublisher.cs:53)
GooglePlayInstant.Editor.PlayInstantEditorMenu:BuildForPlayConsole() (at Assets/GooglePlayInstant/Editor/PlayInstantEditorMenu.cs:101)
`

Here is a Screnshot of Player Settings of my project

Unity 2018.3 - link.xml doesn't work when build for console

Hi

Recently I had set the Strip Engine Code to true and also Managed Stripping Level to Medium in Unity3d 2018.3. I manage to build an APK that is playable from my phone but when i try to build an ZIP file from the Build for console and test from my phone through the "TRY NOW" button, It doesn't work as it tells me the class has been stripped down.

Is there any way for me to strip the engine code with the link.xml?

THank you.

Is it only build and run on Device??

I want to instant app build upload to Play Store.
but this package support only run on device?

How can I get build for instant app? (make by .zip)

Support for Asset Bundle manifest in Build and Run

Hi, I think it would be helpful for users to be able to specify the assetBundleManifestPath in BuildPlayerOptions for the Build And Run function if they use asset bundles for their Instant App (to prevent stuff used in asset bundles from getting stripped).

Cheers

CookieApi reference generating errors

CookieApiException: Failed to verify the signature of Google Play Services. at GooglePlayInstant.CookieApi.VerifyContentProvider () [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity : at GooglePlayInstant.CookieApi.CallMethod (System.String methodName, UnityEngine.AndroidJavaObject extrasBundle) [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity : at GooglePlayInstant.CookieApi.GetInstantAppCookieBytes () [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity : at GooglePlayInstant.CookieApi.GetInstantAppCookie () [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity : at BaseGame.ReadGameStateFromCookie () [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity : at BaseGame.Start () [0x00000] in :0
08-15 00:36:48.113 28194 28218 E Unity :
08-15 00:36:48.113 28194 28218 E Unity : (Filename: currently not available on il2cpp Line: -1)

Invalid value for the 'android:targetSandboxVersion' attribute in the AndroidManifest.

I cant upload my apk to the google developer console because of the above error. I have checked the AndroidManifest file generated by the plugin at Temp\gradleOut\unityLibrary\src\main and it indeed has android:targetSandboxVersion = "2". However, when I inspect the apk in android studio, the final manifest no longer has this property and I am guessing this is why I am getting the error. Is there a solution to this? I am using Unity 2019.3

Thanks

Infinite spinning when deployed to device

Hi,

When I deploy the Instant App via Build and Run it deploys but I'm left with a spinning circle that doesn't seem to end. I'm not seeing anything particularly obvious in the logcat - do you have any suggestions?
device-2018-08-15-182501

Specifying asset bundle manifest may not be working

It looks like specifying the asset bundle manifest may not be working, or I am specifying the path incorrectly.

When engine stripping is active and the manifest path is specified I was getting missing class errors. Turning engine stripping off resolved the class not found errors. Might be user error on my part, but worth taking a look.

I upgraded to 0.8 and engine stripping appears to break my build still.

Failed to locate ia.jar

Hi, I was trying the plugin, but when I hit Build and Run (from PlayInstant menu) I'm getting this error

Build and Run failed to locate ia.jar file at: C:/Users/Fabricio/AppData/Local/Android/sdk\extras/google/instantapps/tools/ia.jar

One other thing that I've noticed is that the folder tools under extras/google/instantapps does not exist,
so I tried to install the SDK again, and that was what I got

PlayInstantSdkInstaller: The Instant Apps Development SDK package is already installed at the latest available version (1.3.0)

Is that a bug or am I doing something wrong?

sdkmanager.bat --list

UPDATE :)

Well, I've done a little bit more research here and I "fixed" the problem now, but I did it totally by hand (I mean that was not the plugin) and I still think this is a valid issue. What I did was to open SDK manager and check for the packages listed here, the Instant Apps Development SDK was not really installed, then, but after the installation the build was still failing with the same error, I checked again the folder (extras/google/instantapps) and the tools folder was still missing, alright, fine, so I've gone the the "root" sdk folder and I noticed another folder called andriod-sdk (not sdk.) it has a similar structure to the sdk folder and there was the folder extras/google/instantapps/tools, but only this folder (with the ai.jar and other files) them I copied this folder to sdk/extras/google/instantapps and voila, it worked. \o/

Above I was just describing what I did. is not too relevant, the problem I see is that the plugin is not installing the sdk properly nor the SDK manager.

Error Build & Run on Unity 5.6.6f2

I tried to build & run an instant app version of my sample project, and I get the following error:

FO - Analyzing files...

INFO - Checking device...

INFO - Pushing instant app to device...

stderr:
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.google.android.instantapps.sdk.cli.RunCommand@28864e92): com.google.android.instantapps.sdk.lib.AdbHelper$AdbCommandException: ADB process exited with code 1: [install-multiple, -r, -t, --ephemeral, /var/folders/js/zwj26yx53j1bw9ywks160ryr00772k/T/temp.apk]
Command output:
adb: failed to finalize session
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: No APK Signature Scheme v2 signature in ephemeral package /data/app/vmdl575792848.tmp/4_temp.apk: No APK Signing Block before ZIP Central Directory]

    at picocli.CommandLine.execute(CommandLine.java:458)
at picocli.CommandLine.access$300(CommandLine.java:134)
at picocli.CommandLine$RunAll.handleParseResult(CommandLine.java:566)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:656)
at picocli.CommandLine.parseWithHandler(CommandLine.java:609)
at com.google.android.instantapps.sdk.cli.Main.aia(Main.java:61)
at com.google.android.instantapps.sdk.cli.Main.main(Main.java:53)

Caused by: com.google.android.instantapps.sdk.lib.AdbHelper$AdbCommandException: ADB process exited with code 1: [install-multiple, -r, -t, --ephemeral, /var/folders/js/zwj26yx53j1bw9ywks160ryr00772k/T/temp.apk]
Command output:
adb: failed to finalize session
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: No APK Signature Scheme v2 signature in ephemeral package /data/app/vmdl575792848.tmp/4_temp.apk: No APK Signing Block before ZIP Central Directory]

    at com.google.android.instantapps.sdk.lib.AdbHelper.adbRead(AdbHelper.java:463)
at com.google.android.instantapps.sdk.lib.AdbHelper.installMultiple(AdbHelper.java:239)
at com.google.android.instantapps.sdk.lib.RunHandlerImpl.loadAppOPlus(RunHandlerImpl.java:399)
at com.google.android.instantapps.sdk.lib.RunHandlerImpl.doRun(RunHandlerImpl.java:280)
at com.google.android.instantapps.sdk.lib.RunHandlerImpl.runInstantApp(RunHandlerImpl.java:107)
at com.google.android.instantapps.sdk.cli.RunCommand.call(RunCommand.java:40)
at com.google.android.instantapps.sdk.cli.RunCommand.call(RunCommand.java:13)
at picocli.CommandLine.execute(CommandLine.java:456)
... 6 more

exit code: 1

UnityEngine.Debug:LogError(Object)
GooglePlayInstant.Editor.GooglePlayServices.Logger:Log(String, LogLevel) (at Assets/GooglePlayInstant/Editor/GooglePlayServices/Logger.cs:91)
GooglePlayInstant.Editor.GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at Assets/GooglePlayInstant/Editor/GooglePlayServices/PlayServicesResolver.cs:37)
GooglePlayInstant.Editor.GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at Assets/GooglePlayInstant/Editor/GooglePlayServices/CommandLineDialog.cs:94)
GooglePlayInstant.Editor.GooglePlayServices.c__AnonStorey0:<>m__0() (at Assets/GooglePlayInstant/Editor/GooglePlayServices/CommandLine.cs:130)

Few questions about this plugin

Hi,
I'm following this repository because I'm interested into convert my existing Unity game into an Instant Game.
I have 2 main questions:

  1. I remember the same plugin was published the same day it was announced on Google I/O and after few hours it was removed. Is this the same plugin or a new one? It seems you are writing it from scratch.
  2. How is possible to keep the apk size under 10MB if an empty project in Unity 2017 is already over 10MB? I tried using Mono and it's over 10MB and I tried with IL2CPP and it's 7MB but as soon as you add any code it grow very quickly to over 10MB? What am I doing wrong?

Best Regards

Is AndroidManifest necessary and "ShowInstallPrompt" can only work after upload to google play?

Hi, I'm trying to convert my existing Unity game into an Instant Game , and I Create an empty project by u3d 2018.2.5 , and create a loading scene to download assetbundle that contains my app's core game-play,
And I found that while I Change Android Build Type By 【PlayInstant/BuildSetting】and leave all blank default then Click Save, the Unity Console show the info "Saving Play Instant build settings..." and had a warning message say "Assets/GooglePlayInstant/InstallLauncher.cs(82,13): warning CS0162: Unreachable code detected " , and it did not say message like "Successfully updated Assets/Plugins/Android/AndroidManifest.xml" ,And I wanna know Is the file AndroidManifest necessary In folder Plugins/Android ? If its yes , What are the minimum requirements for file content?
Another thing confuse me is when I build The zip to upload to GooglePlay , I get apk and a mete-inf ,
and I install the apk in my device and click a button that call the method "InstallLauncher.ShowInstallPrompt();" but nothing happened , its meats that this method can only work after upload to GooglePlay?
I'll appreciate it very much if you could help me!

Upload Fail

We got a problem when we try to upload .zip file to Google Play developer Console
this is message:

Your Instant App APKs do not declare a valid 'android:targetSandboxVersion' attribute in their AndroidManifest. Using the 'com.android.feature' Gradle plugin to build your Instant App would add this attribute automatically.

Did we miss something?

how to make the game size reduce to 10MB limit

My game has many resources. I remove many unused resource in the project. I built the game in PlayInstant-> Build for Play Console. I built a 135MB zip file. I create a new project only import the google instant apps plugin and build it. I built a 15.1MB zip file.
So I don't know how to make the game size reduce to 10MB limit

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.