Google Wallet Console - Class ID - android

I am trying to integrate google wallet loyalty cards into my application.
I succesfully tested using the ids from the demo project .
Now I want to prepare for production. I received access for google wallet but I do not know how to complete "class id" . Did not find in any documentation .
Thanks all for your time

You may enter whatever id you want (I didn't find the field restrictions)
and then you use it to set the classId with your issuerId, like this:
objectPayload.classId = `${issuerId}.${classId}`

Related

Android - Google Pay API - Insert a Pass to the Google Wallet without using server side

is it possible to insert a pass to Google Wallet without calling a custom API? I want to insert a membership card (EAN code with some informations)
I found this:
https://developers.google.com/wallet/generic/android
There is a method:
walletClient.savePasses(newObjectJson, this, addToGoogleWalletRequestCode)
But I'm not sure how to get newObjectJson.
Also before that there is
"id": "ISSUER_ID.OBJECT_ID",
"classId": "CLASS_ID",
"iss": "OWNER_EMAIL_ADDRESS",
But I don't where I can get OBJECT_ID. It should be somewhere in Google Wallet API (https://pay.google.com/business/console/) right? A see there Issuer ID and Class ID (its name of the class that I created in that console). And what should exactly be OWNER_EMAIL_ADDRESS?
Is there a full example of that JSON which I can pass to savePasses() method? Or some good tutorial about it?
Or I have to build a custom API for that?

Android Google plus friend list

I having some confusion on google plus friends list ,
Before following (google plus - people method deprecated)
https://developers.google.com/+/web/api/rest/latest/people/list
We used following method for getting google plus friend list,
loadVisiblePeople(...)
but now a day it is deprecated.
So any one tell me , now in a new method of google plus , how to exactly get google friends list and which step follow for the same , and any other gradle file/compile library required for it ?
I study google plus document well but still having same confusion ,
So any one please remove my this confusion.

screenName confusion in Google Analytics SDK v4 for Android

I have learnt integrating Google Analytics in my Android app from here. But, I am unable to understand the priorities of the screen name mentioned in xml and mentioned programatically via setScreenName. If both are mentioned which one will I see in the reports? Should I use any one approach instead of both? I am not providing code because it's available in the above-mentioned page.
You can find the answer for yourself by logging the screen name to the console after you set it:
// log which screen name Google Analytics is associated with right now
String screenName = tracker.get("&cd");
Log.d("GA Screen Name", screenName == null ? "(not set)" : screenName);

Google Play Game Service - Cannot unlock Achievements

I have implemented Google Play Game Service into my game by referring to the quick start given by Google.
I have added the achievement ids in my 'id.xml' file. My game has around 10 achievements. The code to unlock my achievements is as follows:
Games.Achievements.unlock(getApiClient(), "achievement_1_0");
where 'achievement_1_0' is the string name of one of my achievements.
My issue is that non of my achievements are getting unlocked, even when the conditions are correct. After viewing my log, I got this E/AchievementAgent(13528): Couldn't find local achievement to update for achievement ID achievement_1_0 from the session filter com.google.android.gms(Session Filter)
Any thoughts on what might have gone wrong? or is it a bug ..???
The code for unlocking an achievement is as follows:
Games.Achievements.unlock(getApiClient(), "your_achievement_id");
Here the achievement id is the id you get while creating achievement in Google Game Services.
That is in Google developer Console->Game Services->Your Application->Achievement
Hope this will help you..
#Anu is 100% correct. You are indeed using an incorrect ID for your achievements. However, using the codes from the Game services console is a very bad way to refer to your achievements (and it is very error prone).
The better way to refer to an achievement is to export your achievement IDs by using the Get resources link at the bottom of the Achievements screen in the Game services console. These are then placed inside a xml file in your apps resources. It seems like this is what you are referring to in your question (the id.xml file), so you may have already completed this step.
Once the xml file is in place you can then refer to your achievements using the descriptive IDs that were exported from the console. Do that as follows:
activity.getBaseContext().getString( R.string.achievement_1_0 );
Use your main Activity for activity and change the achievement_1_0 to the achievement's name attribute from the xml file. NOTE: achievement_1_0 must NOT be a string (i.e. not in quotes as in your current code), since it is referring to a string resource.
Always use this method to refer to your achievements - do not hardcode either the strings or the codes from the console as it will make your code much harder to maintain.
Im get this error debugging an app not in release.
I fix the problem adding my account/email as a new tester.
Google play console > Game Services > Testing > Add tester

How to use tracking id of google analytics in android app?

I am trying to integrate google analytics with my android app. I followed the steps in the following link:
https://developers.google.com/analytics/devguides/collection/android/v3/#manifest
Then i tried the look at the statistic of my app, but it seems like analytics is not working, i must have done something wrong. The problem is, in those steps we do not make use of the tracking id, and in google analytic's web site, it says that
Download the Google Analytics SDK for Android or iOS and implement the tracking code,
including this tracking ID.
What does it mean to "implement the tracking id"? What should i do about this can anyone help me?
Thanks
Use this:
Tracker tracker = GoogleAnalytics.getInstance(context).getTracker(ga_trakingId);
Then you can SET some variables, that will be send to GoogleAnalytics:
tracker.set(Fields.APP_NAME, "Best Android Application");
tracker.set(Fields.APP_VERSION, "1.0");
To SEND some info, events:
tracker.send(MapBuilder.createEvent("UX", "App Launch", null, null).build());
You must watch Behind the Code: The Google Analytics v3 Mobile SDKs, all info from there.
Update 1
Google Analytics API v4 you should create google-services.json file from here and then you can use:
public Tracker getTracker() {
return GoogleAnalytics.getInstance(this).newTracker(R.xml.global_tracker);
}
And then you canuse it like this way:
getTracker().setScreenName("SomeScreenOrActivityName");
getTracker().send(new HitBuilders.ScreenViewBuilder().build()); // send screen name
The new process generates a file by Google which is called GoogleService-Info.plist.
This file contains (key, string) and one of them is:
<key>TRACKING_ID</key>
<string>*YOUR TRACKING ID*</string> // Auto generated by GAI
Just open the file and confirm that this is your tracking ID.

Categories

Resources