ADB access denied to data folder?

Update 2023; accessing data is not even through USB (file transfer mode) possible anymore (since a few Android and/or Samsung-device updates ago). Root your device. Original answer; Starting from API level 8 (Android 2.2), for the debuggable application (the one built by Android Studio all the times unless the release build was requested), you can … Read more

YouTube API Android auto start

What you are looking for is the Youtube API’s loadVideo method. From the docs: public abstract void loadVideo (String videoId) Loads and plays the specified video. You can use it like this: @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) { this.player = player; player.loadVideo(video.id); // where video.id is a String of a Youtube … Read more

Rotating image. Animation list or animated rotate? (Android)

Rotate drawable suggested by Praveen won’t give you control of frame count. Let’s assume you want to implement a custom loader which consists from 8 sections: Using animation-list approach, you need to create 8 frames rotated by 45*frameNumber degrees manually. Alternatively, you can use 1st frame and set rotation animation to it: File res/anim/progress_anim.xml: <?xml … Read more

Gradle android build for different processor architectures

As of Android Gradle Plugin version 13 you can now generate seperate APK’s using the new “split” mechanism. You can read about it here. The default file structure for placing your .so files is: src -main -jniLibs -armeabi -arm.so -armeabi-v7a -armv7.so -x86 -x86.so -mips -mips.so Note that the name of the .so file is unimportant … Read more

UserRecoverableAuthException: NeedPermission

Try following the Drive quickstart for Android, it is a step-by-step guide showing how to authorize and upload a file to Drive: https://developers.google.com/drive/quickstart-android To be more specific, it looks like you are not catching the UserRecoverableException and triggering the intent to have the user authorize the app. This is documented in the Google Play Services … Read more

Can I prevent phone from sleep on a webpage

You can use: https://github.com/richtr/NoSleep.js Prevent display sleep and enable wake lock in any Android or iOS web browser. Note that the library has some reliability/performance issues on some platforms/browsers. Users have found solutions that are listed in the issue comments and pull requests, but they have not been added since the repo owner appears not … Read more

Generating iOS and Android icons in Cordova / PhoneGap

I wrote a script that auto generates icons for cordova using ImageMagick: https://github.com/AlexDisler/cordova-icon To use it, create an “icon.png” file and place it in the root folder of your project, then run: cordova-icon and it will generate all the required icons for the platforms your project has. You can also configure it as a hook … Read more