Page 1 of 1
Including Google Play API Client for Python in android build
Posted: Thu Feb 25, 2016 11:06 am
by octacon100
Anyone out there have any luck adding the Python google play client services library to their android builds?
https://developers.google.com/api-clien ... s/v1?hl=en
I'm hoping I can just put the files needed into the rapt/libs folder, but I'm not sure if that will work. Anyone out there have any luck?
Thanks,
Nathan
Re: Including Google Play API Client for Python in android b
Posted: Fri Feb 26, 2016 1:26 am
by PyTom
Isn't this a server side thing?
Re: Including Google Play API Client for Python in android b
Posted: Fri Feb 26, 2016 10:40 am
by octacon100
I'm not sure. Looks like setting up the achievements and all that are server side, but calling the unlock() method to unlock the achievement still seems to be a client side thing:
https://developers.google.com/resources ... ments.html
So my guess is I can include the python files in the game folder and include those in the install, and I guess it will work. Going to see if I can try that soon.
If that doens't work it seems like there's some app manifest stuff to set up as well:
https://developers.google.com/android/guides/setup
Can't exactly find where that is. I'm guessing its the android manifest file?
After trying to set it up on the developer console, it looks like these are next steps:
Step 3: Modify your code
[
To run the game, you need to configure the application ID as a resource in your Android project. You will also need to add games metadata in the AndroidManifest.xml.
Open res/values/ids.xml and replace the placeholder IDs. If you are creating an Android game from scratch, you will need to create this file first.
Specify your application ID in the app_id resource.
Specify each achievement ID that you created earlier in the corresponding achievement_* resource.
Specify each leaderboard ID that you created earlier in the corresponding leaderboard_* resource.
Open AndroidManifest.xml and enter your package name in the package attribute of the <manifest> element. If you are creating an Android game from scratch, make sure that you also add the following code inside the <application> element:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
Re: Including Google Play API Client for Python in android b
Posted: Tue Mar 01, 2016 6:27 pm
by octacon100
Ok, so it looks like the python api is for 3.0 only, but there is something out there that has some open source code for setting achievements with python and java autoclass.
https://github.com/tito/2048/blob/master/gs_android.py
Looks like it uses some Renpy "PythonActivity" class as well. Maybe this opensource project might be able to help?
Re: Including Google Play API Client for Python in android b
Posted: Thu Mar 17, 2016 4:21 am
by emilkun
I've tried it too but can't seem to make it work with my limited knowledge. It would be awesome if we could make it work in any way, though!
Re: Including Google Play API Client for Python in android build
Posted: Thu Sep 07, 2017 12:08 pm
by qirien
Has anyone figured this out? I see that there is an
Achievements module in Ren'Py, but is this just for Steam?