- First install node.js from https://nodejs.org/en/download/
- Install python 2.7+ from https://www.python.org/downloads/release/python-2715/
- Ensure JDK installed
- Create an environment variable: my Computer->Properties->Advanced System settings->Environment variable->new
- Set variable ANDROID_HOME and set your sdk path. Typically sdk found
c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
- Now run command:
npm install -g react-native-cli
- After completing download run:
react-native init YourProjectName
- Then
cd YourProjectName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void registerProcess() { | |
StringRequest stringRequest=new StringRequest(Request.Method.POST, registerrequesturl, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
try { | |
JSONObject jsonObject=new JSONObject(response); | |
String result=jsonObject.getString("result"); | |
if(result.equals("Success")){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class account{ | |
int totalBalance = 0; | |
// then call data from DB | |
// show all data | |
int row = totalrow; | |
if(row>0){ | |
//take last row | |
totalBalance = lastrowBalance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String readName(String cnt[]) { | |
String sd = ""; | |
Span sp[] = nameFinderME.find(cnt); | |
String a[] = Span.spansToStrings(sp, cnt); | |
StringBuilder fd = new StringBuilder(); | |
int l = a.length; | |
for (int j = 0; j < l; j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void readToken(String tokens) { | |
Tokens = tokenizer.tokenize(tokens); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void openTokenzition() { | |
InputStream is; | |
TokenizerModel tm; | |
try { | |
is = getAssets().open("en-token.bin"); | |
tm = new TokenizerModel(is); | |
tokenizer = new TokenizerME(tm); | |
} catch (IOException e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Tokenizer tokenizer; | |
private NameFinderME nameFinderME; | |
public String Tokens[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DatabaseHelper extends SQLiteOpenHelper { | |
private Context dbContext; | |
private static String DB_NAME = "appData.db"; | |
private String DB_PATH = ""; | |
private static final int DB_VERSION = 1; | |
private SQLiteDatabase mDatabase; |