My goal is setting the URL for the profile picture of an existing user.
I'm using the Google Identity Toolkit Java library on App Engine.
Below is my code:
GitkitUser u = gitkitClient.getUserByLocalId(localId);
u.setPhotoUrl(profilePictureURL);
gitkitClient.updateUser(u);
where gitkitClient' is my GitKit client, already initialized with the right parameters, andlocalId' is the id of the user I'd like to update.
This code causes the following exception:
org.json.JSONException: JSONObject["localId"] not found.
Documentation is hard to find for this library. I'd be glad if someone could suggest me what I'm missing there.
Thanks for reporting the bug. It will be fixed in one or two days.
[UPDATE] It's fixed. I manually tested and verified. Please also use the newest version of java library. You can get it from here or from maven update.
Related
I use android studio with Java language. My problem is that, always when creating a new project, I get an error in build.gradle (: app)
I get "Expecting an element". This problem does not affect my application, it executes everything without problem, it only hinders me when you want to use Google Firebase. Thank you for reading!
enter image description here
Try this:
api "com.google.android.material:material:1.3.0"
I'm using Maven with Java and am trying to parse JSON from Reddit but am getting a response code 492 every time. I need to change the user agent but have no idea how to do this.
I looked at this question: How can the user-agent be changed in Maven? and the link provided in the answer but this doesn't seem to work for me.
Any ideas?
Background
When you publish an app, you can access the financial report via this website that can lead you to this website which leads to :
https://play.google.com/apps/publish/?dev_acc=SOME_NUMBERS#ReportsPlace
where "SOME_NUMBERS" is probably a unique ID for your account or something.
at the bottom, it says :
Financial reports are also available for programmatic access through
Google Cloud Storage and the gsutil tool. Your reports are stored in
this private bucket:
gs://pubsite_prod_rev_SOME_NUMBERS
(same note about SOME_NUMBERS as before)
The problem
After installing both Python requirements (from here) and the gsutil (from here) , I can't find out how to really use what they've written.
Not only that, but for any command I try to run there, I get:
SyntaxError: encoding problem: utf8
I've found some posts here on stackOverflow talking about this error, but since I don't know python, I find it hard to understand how to fix it.
The question
How do you really use the gsUtil?
Is it possible to fix this issue?
Is it possible to access the financial data in any other way? Is there maybe a Java alternative? Maybe even an SDK that has all of the available commands?
I am working on an android project and wanted to integrate FB into it.
Using the FB SDK tutorial, I imported the FB SDK into my workspace along with a sample project. The sample project seems to have no problem with the FB library. But when I try to go to stick the library into my app, my app refuses to generate R.java. If I remove it, the R.java gets generated again.
I did a lot of googling and tried the common tricks like cleaning my project, checking for XML errors, etc.
I am now thinking it might be a problem with having both Facebook and Parse. Parse used to have Facebook SDK integrated, but they changed that recently and they now want you to import the Facebook SDK. I tried both not updating and updating Parse, but either way still not generating R.java.
I have set it so my min SDK is level 8 and the max is level 17. I tried raising and lowering the max, but it made no difference.
I have been working on this for the whole day but cannot figure out what is going on. Anyone having similar issues or have insight into the problem, I would very much appreciate feedback.
Edit: I do get this on the console: WARNING: unable to write jarlist cache file /Users/.../facebook-android-sdk-3.6.0/facebook/bin/jarlist.cache
Edit 2: I think I figured out the reason: http://www.reddit.com/r/androiddev/comments/1xajcp/too_many_methods_for_dalvik_help/
I've been having tremendous problems with connecting my android app to the youtube API. Firstly I tried to go along the route of using the native youtube gdata java client(http://code.google.com/p/gdata-java-client/). I had read that this could then be integrated into an android app easily enough and so I set about doing that but I would stumble every time at the line
YouTubeService ytservice = new YouTubeService("AppName",Dev_Key);
I'd enter the correct details here, even have all the necessary external jars but every time I would be given a NoClassDefFoundError reporting that YouTubeService could not be found and neither could it's superclass, MediaService. (Just so you know, I had gdata-youtube-2.0.jar, gdata-client-1.0.jar, gdata-media-1.0.jar, guava.11.0.2.jar and jsr305.jar)
So then I tried which appeared to support android (http://code.google.com/p/google-api-java-client/wiki/Android). There was even a sample example where google tasks had been integrated so it looked promising. It didn't have an actual YouTube class like it did have a taskService but it did support OAuth 2.0 login which I could work with by just sending off URL requests to the youtube API with OAuth 2.0 authentication. I tried this but when the only key I could get from it in combination with android's AccountManager was an auth key token. Posting this with the URL request to google resulted in an 'authentication required' response from youtube(because i was providing an incorrect access token, it was at least twice the size of a working access token i was comparing it with).
How can I find the access token that I need for the youtube API from the AccountManager? Or even better, how can I get the YouTubeservice to work?
Thanks
rory
Edit
Amad, thanks for the answer but unfortunately that is what i am already doing:
(source: themobilelook.com)
maybe it'll help if i supply my project folder: here it's a barebones setup, literally just to test if the YouTubeService works.
using adt 20, jdk compliance level 1.6
if you manage to create a working version then itnwoild be great if you could share it
The YouTube API library/libraries must be included in the project. By going to the Project Properties > Build Path > Order and Export tab, you can tick the checkbox next to the all YouTube-API-related libraries to ensure that they will be included in the project when you export it. Make sure to clean and rebuild after doing this.
As for the access token... not totally sure. The documentation may help there. This Google Groups thread may help also.
If you get NoClassDefFoundError during Runtime, then I suspect you did not include them to work at runtime. You have to check the checkbox for each .jar like this:
(Of course you have to add them to your java build path first)