Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5684] Cannot reference Wallet from Google Play Services

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-03-29T14:13:37.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsHyperloop
Labelsandroid
ReporterSergey Dmitriev
AssigneeShak Hossain
Created2018-03-29T13:15:04.000+0000
Updated2020-10-22T07:25:58.000+0000

Description

Hi all, I'm working on implementing Google Pay in android application using Hyperloop. According to Google Pay example(https://developers.google.com/pay/api/tutorial), the only way to get a PaymentClient is to use static method of Wallet class, which i cannot require/include: mPaymentsClient = Wallet.getPaymentsClient( ... ) (it says Requested module not found: com.google.android.gms.wallet). So i cannot reference static methods in non-existent class. In JS, i can include PaymentClient but not Wallet class. var PaymentsClient = require('com.google.android.gms.wallet.PaymentsClient'); so the following is not working var mPaymentsClient = Wallet.getPaymentsClient( Titanium.Android.currentActivity, {environment:'PRODUCTION'} ); Please help what i have to do or currently doing wrong?

Comments

  1. Sergey Dmitriev 2018-03-29

    please close. It was my typo. var Wallet = require('com.google.android.gms.wallet.Wallet');
  2. Hans Knöchel 2018-03-29

    Nice! And please share it with the community so other people can benefit from your examples as well :-).
  3. Sergey Dmitriev 2018-03-29

    Thanks! How can I do this?
  4. Hans Knöchel 2018-03-29

    In general: * Push it to Github * Add some useful labels (like hyperloop, titanium, appcelerator) * Share your repository with the community via Slack (tislack.org) Or, you can also do a pull request to https://github.com/appcelerator/hyperloop-examples and add your example to the collection of example. I personally would find it very interesting to have it there.
  5. Jason Kneen 2020-10-22

    Did you manage to get this working? Can you share the module?

JSON Source