Tutorial by Examples: android

As described in the remarks section the Android build system uses the Android Plugin for Gradle to support building Android applications with Gradle. You can specify the Android Plugin for Gradle version in the top-level build.gradle file. The plugin version applies to all modules built in that And...
For example you want to use surfaceView in ng2-nativescript. As we don't have surfaceView in nativescript we should use placeholder. first we should import the requirements: import {Component} from "@angular/core"; import placeholder = require("ui/placeholder"); let applicat...
app.component.ts: import {Component,OnInit} from "@angular/core"; import placeholder = require("ui/placeholder"); let application= require("application"); @Component({ selector: "my-app", templateUrl: "app.component.html", }) export...
1)First go through Paypal Developer web site and create an application. 2)Now open your manifest file and give the below permissions <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"...
This is a statusbar that you see on top of your screen with icons of battry,clock ... . let frame = require("ui/frame"); Hide: frame.topmost().android.activity.getWindow(). getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_FULLSCREEN); Show: frame.topmost()....
open APP_Resources/values/styles.xml and add the <item name="android:windowTranslucentStatus">true</item> in the <style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar"> </style> section.
Format a date: Date date = new Date(); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); String localizedDate = df.format(date) Format a date and time. Date is in short format, time is in long format: Date date = new Date(); DateFormat df = DateFormat.getDateTimeInstance(DateFor...
Here the steps required to create a Firebase project and to connect with an Android app. Add Firebase to your app Create a Firebase project in the Firebase console and click Create New Project. Click Add Firebase to your Android app and follow the setup steps. When prompted, enter yo...
This is an example how to get the play an audio file which you already have on your pc/laptop .First create a new directory under res and name it as raw like this copy the audio which you want to play into this folder .It may be a .mp3 or .wav file. Now for example on button click you want to pl...
File Structure: pom.xml src/test/java/PlayStoreAutomation.java Launch command: mvn test -Dtest=PlayStoreAutomation PlayStoreAutomation.java import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import io.appium.java_client.android.AndroidDriver; import i...
build.gradle repositories { maven { url 'http://4thline.org/m2' } } dependencies { // Cling compile 'org.fourthline.cling:cling-support:2.1.0' //Other dependencies required by Cling compile 'org.eclipse.jetty:jetty-server:8.1.18.v20150929' compile 'org.eclipse.jetty:jetty-servlet:8....
Complete the Installation and setup to connect your app to Firebase. This will create the project in Firebase. Add the dependency for Firebase Realtime Database to your module-level build.gradle file: compile 'com.google.firebase:firebase-database:9.2.1' Configure Firebase Databa...
Android ButterKnife Zelezny Plugin for generating ButterKnife injections from selected layout XMLs in activities/fragments/adapters. Note : Make sure that you make the right click for your_xml_layou(R.layout.your_xml_layou) else the Generate menu will not contain Butterknife injector option. ...
Using Android Studio 2.2 and higher Native Development Kit (NDK) you can use to compile C and C++ code. You can use NDK by manually downloading NDK and build it or through CMake . Here I will give process flow for manually install NDK and an example code, Based on your System OS you can download ...
How to implement Firebase Real-Time database in Android applications. Setup/Installation: First, install the Firebase SDK (guide) Register your project using the Firebase console After successfuly completing the two steps above, add the following dependency in your application level ...
How to implement FirebaseRealTime database in android application. Following is the steps for do it. First install firebase sdk, If you dont know how to install then following is the URL for help. Install Firebase SDK After thet register your project in firbase console, URL of the firbas...
A frequent reason why your read operation may not work is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the logcat output. But it's e...
This example shows how to take image and display it correctly on the Android device. Firstly we have to create sample application with one button and one imageview. Once user clicks on the button camera is launched and after user selects picture it will be displayed with the proper orientation on ...
Sometimes, it's better to have only three options style="@android:style/TextAppearance.Small" style="@android:style/TextAppearance.Medium" style="@android:style/TextAppearance.Large" Use small and large to differentiate from normal screen size. <TextView ...
Add Firebase to Your Android Project Add Firebase to your app To add Firebase to your app you'll need a Firebase project and a Firebase configuration file for your app. Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google proje...

Page 4 of 7