tidev / ti.playservices Goto Github PK
View Code? Open in Web Editor NEWTitanium module for Google Play Services
Titanium module for Google Play Services
Do I have to compile this module? I try to install the zip as a module but the module does not appears in the module "add" list button.
Thanks!
Since it looks like all of the play services libraries are included, what is the method to instantiate an instance of a service? For example, play-services-location-11.0.4.aar is included, but how would you create then reference the API calls from that aar?
when compiling my project whit this module i gent the following error:
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ItemListIntents;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/NoteIntents;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ReserveIntents;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/SearchIntents;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/AccountChangeEvent;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/AccountChangeEventsRequest;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/AccountChangeEventsResponse;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthUtil;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
[ERROR] : at com.android.dx.command.dexer.Main.runMultiDex(Main.java:368)
[ERROR] : at com.android.dx.command.dexer.Main.runDx(Main.java:289)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:247)
[ERROR] : at com.android.dx.command.Main.main(Main.java:94)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
[ERROR] : ... 4 more
When I added module Ti.Playservices in Tiapp.xml, the app compiled and opened but crashed at runtime with below error without hitting alloy.js . I have tried on version 17.1.1, 17.3.0 and 17.5.0. In version 16.1.3 compiling failed with error in Ti SDK 10
Tiapp.xml
<modules> <module platform="android">ti.playservices</module> </modules>
Error
[ERROR] TiExceptionHandler: (main) [91,91] ti:/kroll.js:1045 [ERROR] TiExceptionHandler: throw new Error(Requested module not found: ${request}); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node? [ERROR] TiExceptionHandler: ^ [ERROR] TiExceptionHandler: Error: Requested module not found: ti.playservices\ti.playservices.bootstrap [ERROR] TiExceptionHandler: at Module.require (ti:/kroll.js:1045:14) [ERROR] TiExceptionHandler: at Module.global.Module.require (<embedded>:5086:32) [ERROR] TiExceptionHandler: at require (ti:/kroll.js:1315:22) [ERROR] TiExceptionHandler: at global.require (<embedded>:5071:10) [ERROR] TiExceptionHandler: at doLoad (<embedded>:11198:27) [ERROR] TiExceptionHandler: at loadBootstrapScripts (<embedded>:11224:5) [ERROR] TiExceptionHandler: at loadAsync (<embedded>:11229:3) [ERROR] TiExceptionHandler: at _startSnapshot (<embedded>:11246:1) [ERROR] TiExceptionHandler: at /ti.main.js:1:8 [ERROR] TiExceptionHandler: at Module._runScript (ti:/kroll.js:1342:24) [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [ERROR] TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:175) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiApplication.launch(TiApplication.java:868) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:96) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:497) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:177) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:516) [ERROR] TiExceptionHandler: android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453) [ERROR] TiExceptionHandler: android.app.Activity.performResume(Activity.java:7962) [ERROR] TiExceptionHandler: android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195) [ERROR] V8Exception: Exception occurred at ti:/kroll.js:1045: Uncaught Error: Requested module not found: ti.playservices\ti.playservices.bootstrap
Thanks! :-)
Hi guys,
I couldn't find the play-services-ads-lite-17.1.3. Why is it not part of the module? :-)
Thank you!
Can this module transfer card data from my app to the app 'Google play'? For example, the card number, card holder and cvv for subsequent card registration in the Google play. How it can be done?
Need to define and create the target directory
var targetDir = __dirname+'/../android/lib';
console.log(`download to: ${targetDir}`);
fs.mkdirSync(targetDir);
And then use it:
rp(aar).pipe(fs.createWriteStream(targetDir+
/${library}-${version}.aar));
Thanks for putting this together. Is there any examples on how to use this as a dependency within a native module. I see that the Ti.Map uses this as a dependency but I can't figure out how to add the module or it's lib dependencies to my path.
Would be great to have all of the module developers use a common source for Google Play Services. But, need alittle help on how to reference the module from within Eclipse.
Hello my ti.playservices version was 11.0.40 I upgraded it to 16.1.2. After that I am getting error as below I have tried 16.1.0 too result is same. My jira ticket is https://jira.appcelerator.org/browse/AC-6141
02-27 13:00:30.485 12645 12645 E AndroidRuntime: FATAL EXCEPTION: main
02-27 13:00:30.485 12645 12645 E AndroidRuntime: Process: com.sizebiz.just.live.basketball, PID: 12645
02-27 13:00:30.485 12645 12645 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbo;
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source:2)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6414)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5961)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5867)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread.access$1100(ActivityThread.java:200)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6692)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbo" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.sizebiz.just.live.basketball-Rn8Kb-p0JpC_xcova1olLg==/base.apk"],nativeLibraryDirectories=[/data/app/com.sizebiz.just.live.basketball-Rn8Kb-p0JpC_xcova1olLg==/lib/arm64, /data/app/com.sizebiz.just.live.basketball-Rn8Kb-p0JpC_xcova1olLg==/base.apk!/lib/arm64-v8a, /system/lib64]]
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
02-27 13:00:30.485 12645 12645 E AndroidRuntime: ... 12 more
02-27 13:00:30.487 2047 9545 W ActivityManager: Force finishing activity com.sizebiz.just.live.basketball/.JustLiveBasketballActivity
I was following Google official guide on fusedProvider but they define some parameters:
https://developer.android.com/training/location/change-location-settings.html#java
Do this will happen also here?
Play services are currently at version 16.x
Firebase is moving to 17.x
I was testing 16.1.5 today with my FCM test app. It will crash with:
[ERROR] FirebaseApp: Firebase API initialization failure.
[ERROR] FirebaseApp: java.lang.reflect.InvocationTargetException
[ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApis(com.google.firebase:firebase-common@@16.1.0:815)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@16.1.0:785)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:369)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:316)
[ERROR] FirebaseApp: at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.1.0:53)
[ERROR] FirebaseApp: at android.content.ContentProvider.attachInfo(ContentProvider.java:1793)
[ERROR] FirebaseApp: at android.content.ContentProvider.attachInfo(ContentProvider.java:1762)
[ERROR] FirebaseApp: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.1.0:47)
[ERROR] FirebaseApp: at android.app.ActivityThread.installProvider(ActivityThread.java:6141)
[ERROR] FirebaseApp: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5704)
[ERROR] FirebaseApp: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5643)
[ERROR] FirebaseApp: at android.app.ActivityThread.-wrap2(ActivityThread.java)
[ERROR] FirebaseApp: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
[ERROR] FirebaseApp: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] FirebaseApp: at android.os.Looper.loop(Looper.java:173)
[ERROR] FirebaseApp: at android.app.ActivityThread.main(ActivityThread.java:6459)
[ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
[ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
[ERROR] FirebaseApp: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/ArrayMap;
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzcm.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:7)
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzcm.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzla.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:5)
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzky.<init>(com.google.android.gms:play-services-measurement-impl@@17.2.0:6)
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzky.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:11)
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzky.zzb(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.internal.zzap.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:542)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.internal.zzap.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:21)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.internal.zzfx.<init>(com.google.android.gms:play-services-measurement-impl@@17.2.0:8)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.internal.zzfx.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:305)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.internal.zzfx.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:294)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.AppMeasurement.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:9)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.AppMeasurement.getInstance(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp: ... 21 more
[ERROR] FirebaseApp: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.collection.ArrayMap" on path: DexPathList[[zip file "/data/app/com.miga.testfirebase-1/base.apk"],nativeLibraryDirectories=[/data/app/com.miga.testfirebase-1/lib/arm64, /data/app/com.miga.testfirebase-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
[ERROR] FirebaseApp: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
[ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] FirebaseApp: ... 34 more
I'm not sure if I need to recompile FCM modules with newer playservice libs or if there is any androidx component inside the libs of ti.playservice 16.1.5 that are not supported (the error points to ArrayMap). So currently the best version to use is 16.1.4 and remove the ads-lite lib.
16.1.3 was running just fine but once I installed 16.1.4 the app crashes immediately on startup
Update to latest Playservice modules:
Changelog of play-services:
18.0.0: https://developers.google.com/android/guides/releases#december_09_2021
18.0.1: https://developers.google.com/android/guides/releases#december_16_2021
Using 11.8.0 app won't launch and crashes with no error
-- Start application log -----------------------------------------------------
[INFO] : MultiDex: VM with version 2.1.0 has multidex support
[INFO] : MultiDex: Installing application
[INFO] : MultiDex: VM has multidex support, MultiDex support library is disabled.
App then simply crashes
I see, currently the module uses 12451000. Now I like to add an other aar. Which version I have to add?
Hi,
I'm trying using this module but always return "module not found error", I follow the code example but the error still (put in Tiapp and require), I'm use Win 10, SDK Ti 6.2.2.GA (The SDK Ti 6.3.1.GA describe in requirement doc I can't find). I'm donwloaded from here SDK 6.3.0.GA and 7.0.0 but the same problem it occurred.
Is it possible to include in the manifest or other file the version of the Google PlayServices jar?
This would help us module developers in figuring out what version we should link against.
Hey guys.
First I would like to thank you for making this module, was quite anticipated by some of us, since now it frees us from having Google Play Services JAR as direct dependency in modules we write. Never the less, wanted to check this with you. When using your module, I see that following things are being added to the app in dexer phase:
build/android/intermediates/exploded-aar/play-services-ads-lite-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-analytics-impl-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-appinvite-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-auth-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-auth-base-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-awareness-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-base-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-basement-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-cast-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-cast-framework-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-gcm-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-identity-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-iid-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-location-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-maps-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-nearby-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-tasks-11.0.4/classes.jar"
build/android/intermediates/exploded-aar/play-services-wallet-11.0.4/classes.jar"
I might be only interested in adding -basement
module to my plugin and the rest is of no interest to me. By advising client to add your current module, method count will get quite increased and might breach 65K limit for some. With that in mind:
I was wondering if there are any plans to build support for adding separate modules as dependencies?
So something which can be added to user's tiapp.xml
like this:
<module platform="android">ti.playservices.basement</module>
?
Thanks in advance for your reply.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.