Tutorial by Examples: android

image: jangrewe/gitlab-ci-android before_script: - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 openjdk-8-jdk - echo y | ${ANDROID_HOME}/tools/android --silent update sdk --no-ui --all --filter android-24 - echo y | ${ANDROID_HOME}/too...
Overview Android Studio's built-in update mechanism can be set to receive updates through any one of these four channels: Canary: Bleeding edge, released about weekly. These are early previews released in order to obtain real-world feedback during development. The canary channel will always have...
Implement onMessageReceived that will catch the notification sent from GCM server. @Override public void onMessageReceived(String from, Bundle data) { String message = data.getString("message"); Log.d(TAG, "From: " + from); Log.d(TAG, "Message: "...
Step 1: Go to root directory of project and open command line prompt cordova build --release android This generates an unsigned apk under \platforms\android\build\outputs\apk with the name android-release-unsigned.apk Step 2: Key generation for obtaining signed apk Syntax: keytool -genkey ...
This is literally the only thing you need to start using RxJava on Android. Include RxJava and RxAndroid in your gradle dependencies: // use the last version compile 'io.reactivex.rxjava2:rxjava:2.1.1' compile 'io.reactivex.rxjava2:rxandroid:2.0.1' RxAndroid main addition to RxJava is a Sche...
Set this attribute in your manifest's or element to enable or disable multi-window display: android:resizeableActivity=["true" | "false"] If this attribute is set to true, the activity can be launched in split-screen and freeform modes. If the attribute is set to false, the...
Create a folder in your project folder, and add your fonts to it. Example: Example: Here we added a folder in root called "mystuff", then "fonts", and inside it we placed our fonts: Add the below code in package.json. { ... "rnpm":...
Whitelisting won't disable the doze mode for your app, but you can do that by using network and hold-wake locks. Whitelisting an Android application programmatically can be done as follows: boolean isIgnoringBatteryOptimizations = pm.isIgnoringBatteryOptimizations(getPackageName()); if(!isIgnorin...
From android 6.0 this permission needs to grant dynamically, <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> Throwing below permission denied error on 6.0, Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRoo...
Let say you want to create css/js file specific to a platform. For that you have to create a merges folder in root folder of you cordova porject. In merges folder create directory for each platform (android/ios..). then in specific platform folder create a css/js folder and put your css/js file spec...
Android supports fingerprint api from Android 6.0 (Marshmallow) SDK 23 To use this feature in your app, first add the USE_FINGERPRINT permission in your manifest. <uses-permission android:name="android.permission.USE_FINGERPRINT" /> Here the procedure to follow ...
ORMLite is an Object Relational Mapping package that provides simple and lightweight functionality for persisting Java objects to SQL databases while avoiding the complexity and overhead of more standard ORM packages. Speaking for Android, OrmLite is implemented over the out-of-the-box supported da...
In above examples you understand how to localize resources of application. Following example explain how to change the application locale within application, not from device. In order to change Application locale only, you can use below locale util. import android.app.Application; import android.c...
This is a step by step guide to set up the automated build process using Jenkins CI for your Android projects. The following steps assume that you have new hardware with just any flavor of Linux installed. It is also taken into account that you might have a remote machine. PART I: Initial setup on ...
This example will guide you how to get playlist data using the YouTube Data API on Android. SHA-1 fingerprint First you need to get an SHA-1 fingerprint for your machine. There are various methods for retrieving it. You can choose any method provided in this Q&A. Google API console and YouTub...
Go to File > Settings > Keymap and select the Keymaps option from: Mac OS X Emacs Visual Studio Eclise Netbeans Jbuilder and others, to map the shortcuts to the wanted tool ones.
import android.util.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public class Compress { private static f...
Environment Setup: Download android sdk of API level 17 or more Node.js (https://nodejs.org/) Appium software (http://appium.io/) Selenium jars (http://www.seleniumhq.org/download/) Appium jar (https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.appium%20a%3Ajava-client) .apk file of the appl...
Complete the Installation and setup part to connect your app to Firebase. This will create the project in Firebase. Add the dependency for Firebase Cloud Messaging to your module-level build.gradle file: dependencies { compile 'com.google.firebase:firebase-messaging:10.2.1' } ...
From the Welcome to Android Studio dialogue box, select New Project... to open the Create New Project dialog. In the New Android Application dialog, under Application name, specify an appropriate application name. The remainder of this tutorial uses BasicMapSolution as the application name....

Page 5 of 7