Tutorial by Examples: android

Open index.ios.js or index.android.js and delete everything between the <View> </View>. After that, write <Text> Hello World! </Text> and run the emulator. You should see Hello World! written on the screen! Congrats! You've successfully written your first Hello World!
Add below dependencies to your build.gradle // Facebook login compile 'com.facebook.android:facebook-android-sdk:4.21.1' Add below helper class to your utility package: /** * Created by Andy * An utility for Facebook */ public class FacebookSignInHelper { private static final...
A Cordova application runs as a website on a WebView component within the native mobile platform. Debugging a cordova application can therefore be done by utilizing your favourite browsers development tools. The following steps are needed to hook the application, running on the device, to the Chrome...
Enable and configure the experimental Gradle plugin to improve AndroidStudio's NDK support. Check that you fulfill the following requirements: Gradle 2.10 (for this example) Android NDK r10 or later Android SDK with build tools v19.0.0 or later Configure MyApp/build.gradle file Edit the dep...
A lot of the value from local JVM unit tests comes from the way you design your application. You have to design it in such a way where you can decouple your business logic from your Android Components. Here is an example of such a way using the Model-View-Presenter pattern. Lets practice this out by...
Paste your fonts file inside android/app/src/main/assets/fonts/font_name.ttf Recompile the Android app by running react-native run-android Now, You can use fontFamily: 'font_name' in your React Native Styles
The example below will collect the Device's OS version number and the the version of the application (which is defined in each projects' properties) that is entered into Version name on Android and Version on iOS. First make an interface in your PCL project: public interface INativeHelper { /...
You have to create a different strings.xml file for every new language. Right-click on the res folder Choose New → Values resource file Select a locale from the available qualifiers Click on the Next button (>>) Select a language Name the file strings.xml strings.xml <resources&...
ndk-build NDK_PROJECT_PATH=PROJECT_PATH APP_BUILD_SCRIPT=MyAndroid.mk
public class ShakeDetector implements SensorEventListener { private static final float SHAKE_THRESHOLD_GRAVITY = 2.7F; private static final int SHAKE_SLOP_TIME_MS = 500; private static final int SHAKE_COUNT_RESET_TIME_MS = 3000; private OnShakeListener mListener; pri...
Open Android Monitor Tab Click on Screen Capture Button
Open Android Device Monitor ( ie C:<ANDROID_SDK_LOCATION>\tools\monitor.bat) Select your device Click on Screen Capture Button
To setup for using Android Gradle Plugin you need many things: java gradle the Android project folder structure an Android Manifest initial plugin setup The easiest way to get all of them is to follow these steps: Donwload and Install Java OpenJDK version 6 or 7 (you can use 8 with addi...
@Override public void onMessageReceived(RemoteMessage remoteMessage) { // ... // TODO(developer): Handle FCM messages here. Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) ...
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. The first stage of creating the Android portion of our application is to set up a basic layout and handle responses that come back from the server that we'll set up in Node....
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. At this point the PayPal future payments button has been clicked, we have an auth code and metadata ID from the PayPal SDK, and we need to pass those on to our server to com...
The complete sample code for this application (Android + Node server) is available in the PayPal Developer Github repository. From step 2, an async request has been made to our server at the /fpstore endpoint, passing along the auth code and metadata ID. We now need to exchange those for a token in...
The following are some of the more common/useful shortcuts. These are based on the default IntelliJ shortcut map. You can switch to other common IDE shortcut maps via File -> Settings -> Keymap -> <Choose Eclipse/Visual Studio/etc from Keymaps dropdown> ActionShortcutFormat codeCTRL...
Enable Offline Work: Click File -> Settings. Search for "gradle" and click in Offline work box. Go to Compiler (in same settings dialog just below Gradle) and add --offline to Command-line Options text box. Improve Gradle Performance Add following two line of code in your gradle...

Page 2 of 7