Tutorial by Examples: android

Navigate to project's app module and create libs directory. Place your .aar file there. For example myLib.aar. Add the code below to android block of app level's build.gradle file. repositories { flatDir { dirs 'libs' } } This way you defined a new ext...
Copy the database from the emulator/phone to view it. It can be done by using ADB: adb pull /data/data/<packagename>/files/ That command will pull all Realm files created by Realm.getInstance(getContext()) or Realm.getInstance(new RealmConfiguration.Builder(context).build()). The default d...
In your activity layout activity_main.xml specify WebView component as following: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" ...
Install cordova using the following command npm install -g cordova. Use cordova -version to check the cordova version. Set path variables ANDROID_HOME and JAVA_HOME. Example: export ANDROID_HOME = /home/geethu/android-sdk-linux export PATH = $PATH:$ANDROID_HOME/tools:$ANDROID_H...
Sometimes Android's logcat is running infinitely with errors coming from some process not own by you, draining battery or just making it hard to debug your code. A convenient way to fix the problem without restarting the device is to locate and kill the process causing the problem. From Logcat 03...
To be able to run tests Chrome broser should be pre-installed on Android device,
To be able to work with web-application on Android device using Selenium below pre-conditions should be met: Android SDK installed on computer Chrome browser installed on Android device Debugging mode enabled on Android device Start adb and chromedriver server with below commands from cmd/Te...
Android O changes the way to work with fonts. Android O introduces a new feature, called Fonts in XML, which allows you to use fonts as resources. This means, that there is no need to bundle fonts as assets. Fonts are now compiled in an R file and are automatically available in the system as a reso...
Latest Android Studio will create & integrate a Basic Widget to your Application in 2 steps. Right on your Application ==> New ==> Widget ==> App Widget . It will show a Screen like below & fill the fields Its Done. It will create & integrate a basic HelloWorld Widget(I...
TL;DR It basically allows us to simulate real devices and test our apps without a real device. According to Android Developer Documentation, an Android Virtual Device (AVD) definition lets you define the characteristics of an Android Phone, Tablet, Android Wear, or Android TV device that you w...
This example helper class interacts with the finger print manager and performs encryption and decryption of password. Please note that the method used for encryption in this example is AES. This is not the only way to encrypt and other examples exist. In this example the data is encrypted and decryp...
MultiDex is a library in the Android APK that allows the app to have more than 65,536 methods. The Android APKs have Dalvik Executable files (.dex) that contain the generated bytecodes compiled from your Java code. Each .dex file can contain up to 65,536 methods (2^16). Android OS versions before ...
ProGuard is a tool used in the building process to optimize and obfuscate the Java code of your APK, and also remove unused classes. The resulting APK when using ProGuard will have a smaller size and will be harder to reverse-engineer (decompilation). ProGuard can be used too in Xamarin.Android app...
Add repository repositories { maven { url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/" } } Add in Project Gradle for Chat Functionality dependencies { compile("com.quickblox:quickblox-android-sdk-chat:2.6.1&...
One of the central difficulties of writing an Android application using Dagger is that many Android framework classes are instantiated by the OS itself, like Activity and Fragment, but Dagger works best if it can create all the injected objects. Instead, you have to perform members injection in a li...
Gradle Setup : build.gradle(Module: app) compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } jackOptions { enabled true } What is the Stream API ? Stream is a new abstract layer introdu...
Starting with Android 3.1 all applications, upon installation, are placed in a stopped state. While in stopped state, the application will not run for any reason, except by a manual launch of an activity, or an explicit intent that addresses an activity ,service or broadcast. When writing system ap...
Create a new C# script in Unity and replace it's contents with the following using UnityEngine; using System.Collections; public static class UnityAndroidPlugin { }
Create a new Java class in Android Studio and replace it's contents with the following package com.axs.unityandroidplugin; import android.util.Log; import android.widget.Toast; import android.app.ActivityManager; import android.content.Context; public class UnityAndroidNative { } ...
Create a new C# script in Unity and paste these contents using UnityEngine; using System.Collections; public class UnityAndroidPluginGUI : MonoBehaviour { void OnGUI () { } }

Page 6 of 7