- Download & Install git first
git config —global user.email "<your git email>"git config —global user.name "<your git username OR name>"
| class MainActivity : AppCompatActivity() { | |
| companion object { | |
| const val RC_CODE = 101 | |
| const val TAG = "debug_MainActivity" | |
| const val SENT = "SMS_SENT" | |
| const val DELIVERED = "SMS_DELIVERED" | |
| } | |
| // Views |
| fun main(args: Array<String>) { | |
| print("dilip".lastChar()) | |
| } | |
| fun String.lastChar() = this.get(this.length - 1) |
| package com.reactlibrary; | |
| import android.graphics.Color; | |
| import android.view.View; | |
| import android.widget.TextView; | |
| import android.widget.Toast; | |
| import com.facebook.react.bridge.Callback; | |
| import com.facebook.react.bridge.ReactApplicationContext; | |
| import com.facebook.react.bridge.ReactContextBaseJavaModule; |
| // @flow | |
| import { NativeModules } from 'react-native'; | |
| const { MyLibrary } = NativeModules; | |
| interface ToastOptions { | |
| message: string; | |
| duration?: number; | |
| } | |
| interface IToast { |
| package com.reactlibrary; | |
| import androidx.annotation.NonNull; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import com.facebook.react.ReactPackage; | |
| import com.facebook.react.bridge.NativeModule; |
| { | |
| "compilerOptions": { | |
| /* Basic Options */ | |
| "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, | |
| "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, | |
| "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, | |
| "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, | |
| "lib": ["ES2017", "ES7", "ES6", "DOM"], | |
| "declaration": true, | |
| "outDir": "lib", /* Add tthis only for library project otherwise comment this line */ |
git config —global user.email "<your git email>"git config —global user.name "<your git username OR name>"| import React from 'react'; | |
| import { | |
| StyleSheet, | |
| Text, | |
| View, | |
| StatusBar, | |
| Dimensions, | |
| Image, | |
| Animated, | |
| findNodeHandle, |