So I am having some confusion implementing the YouTube Data Api v3. I tried looking up tutorials and copy pasting the sample code to learn from it (after setting everything up of course) but I run into an error where:
import com.google.api.services.samples.youtube.cmdline.Auth; doesnt exist and hence the whole sample doesn't work. I haven't found a fix online. I hate just copying code and putting on Android and making it run without understanding what it does. I couldn't find a solution to this problem!
What was my solution?
I scraped (using Java) links such as:
https://www.googleapis.com/youtube/v3/channels?part=id%2Csnippet%2Cstatistics%2CcontentDetails%2CtopicDetails&forUsername=&key=
where all I have to do is input my browser key and the youtuber's username in order to retrieve the data that I needed. I am wondering if this is legal to do? These are their JSON sites that the API itself uses. The reason I am worried is because I recently got into scraping and read a lot about it's legal issues.
Thank you!
PS: I am using my browser key, and if I plan to release an app which utilizes this method is it a problem since the key will be used by multiple people?
First, You have to open SDK Manager. Install Google Play Services if you haven't.
Then, You open the build.gradle and add the library to it. (Replace ? with the correct version)
compile 'com.google.android.gms:play-services:?.?.?'
After syncing your gradle, then you should be able to import the library.
Edit:
If you find https://www.googleapis.com/youtube/v3 is useful, then you can use it because it belongs to the official API.
Related
I have developed an app using Rhomobile, which is a cross-platform native mobile applications using web-technologies: HTML, CSS, JavaScript and Ruby, but unfortunately now I don't have the source code as I've lost it, but I have the apk that I built at the time. several readings shows it is possible to recover it by reversing the apk which I did but then in the assets\apps\app I got YARV-bytecode which definitely requires to be restored to the ruby source. I saw some tools like reversal which advertised as YARV to Ruby but didn't worked for me. in the examples reversal given YARV-bytecode appeared there are somehow different to those I found from the apk I pulled from.
Mine is a shown below:
How can I recover it?
Please help this.
No it is not possible to recover the code.
I want to build an Android Application in which the user gives permission to my server-side script to read their files.
Seems pretty straight-forward, I've made an app where the application can access the user's files.
However, giving access to the server is a lot harder, thanks to OAuth2.0 which has me confused as hell.
Is it even possible to build what I want, and if so, how can I achieve this? Links to tutorials are also accepted.
This is the library I used at a previous job and it saved me a lot of the hassle in dealing with the Google API directly. Just be sure to follow the authentication part carefully as you need the .ovpn file in order to access your drive.
Okay, here's where I'm at. I used Eclipse to import the code for the SMS/MMS app that is on Android devices. The code on GitHub is at https://github.com/android/platform_packages_apps_mms.git. I used the Import -> Git in Eclipse. Got the code into the environment. Had to manually paste the AndroidManifest.xml file into the project, and also copy over source and resource directories.
Basically, I want to get the Eclipse project to a point where I can run it on my device and it behaves JUST like the built-in app. THEN, I can modify it for my specific needs hopefully. I don't want to have to write all the SMS/MMS functionality from scratch if I can avoid it.
NOW, the problem is: A LOT of unresolveds. I keep reading various places where people are saying that some of the packages aren't REALLY in the SDK and are internal... Why the heck call it an "open source platform" when the source isn't available for the built-in apps that Google provides?! (If this is in fact the case). Further, why would they provide the code on GitHub for the MMS app if in fact not all the code is available and you can't compile it? Seems a little ridiculous to me.
I have read some answers to previous posts where I was just sticking my "toes into the water" so to speak, and people are saying that a lot of these packages are part of the firmware? Seems like there should be some base code for a texting/mms app out there somewhere.
Anyone know of any? (Open source, free, SMS/MMS Android code that I can easily obtain and that don't suck, if in fact I can't use Google's code?)
Thanks,
John
Mms as well as other system apps use private or hidden APIs that are not available through the SDK.
This has nothing to do with not being an open source platform, as you mentioned, but with the fact that you are trying to build the application in a way that is not supported and nobody says it was.
If you want to modify and build Mms, do it as part of the firmware build, using make, not importing the project to be built by the SDK in Eclipse.
The stock MMS app built into a device's original firmware, signed with a private key, and is able to use some private API.
Third party apps can't use the private API for various reasons, one being security. All the source is open if you wish to view it.
You can definitely build your own firmware, or ROM, as some call it, and run your own modified MMS app on it.
I don't know if you can make and install your own MMS app. You can find out by looking through the Play Store for similar apps or looking at the Android developer documentation to see what permissions and API are provided to third party apps.
I've spent hours trying to work out how to use SDK. It seems so long winded and has about 20 dependencies but absolutely no examples of usage.
Does anyone know where I could find some examples to learn from. Dropbox was just a case of downloading the SDK and using it. Google drive only seems to have javadoc which is only helpful as a reference if you already know what you are doing.
I'm trying to do what I consider to be the most simple operations. upload, download, delete, create.
I had the same problems originally, finding a SDK that actually worked for Google Docs.
In the end I ended up implementing it on my own using raw HTTP requests, as also suggested in the other answer linked to by Alain. My implementation only handle file transfers and file management, but it is quite straightforward to implement, and works perfectly for Google Drive files also. I basically just implemented what I needed from the Google Documents List API version 3.0 found here: https://developers.google.com/google-apps/documents-list/
It took a little time, but was well worth it, and much more lightweight since I didn't have to include on all the dependencies of the various Google API's.
Google has now a tutorial called Quickstart: Run a Drive App on Android.
The Drive API are at https://developers.google.com/drive/v2/reference/
If your goal is to let users open files directly from the Drive app for Android using your app, see Integrate with the Android Drive App.
it seems that I'm not the first one, but I don't find anything that helps. I'm new to Android and would like to develop a real simple photo sharing app (three tabs: camera, gallery and upload to Picasa) to start off. Unfortunately the Google Data APIs for Java, don't run on Android and I didn't find a good tutorial for the newer Google Data API. I also couldn't get the Android Picasa sample to run: Eclipse complains about a buildpath error, but doesn't show what exactly is wrong.
I'm looking for an easy tutorial how to use Picasa with Android. Anyone has some kind of "middleware classes" between the old and the new API which one can use. How do I fix the buildpatj problem to run the sample or how in general can I import external JARs to my Android project.
Thanks for reporting the problem, Daniel. I actually fixed this bug recently on 9/13/2010. Please try the sample again and let me know if you encounter any problems.