One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
First of all, set up a server like Tomcat or Glassfish. Then install it seeing from any popular website like #Digital_Ocean or #ID_Root.net | |
Here is an example- | |
wget http://download.java.net/glassfish/4.1.1/release/glassfish-4.1.1.zip | |
unzip glassfish-4.1.1.zip | |
glassfish4/bin/asadmin start-domain | |
But we can start the server another way like glassfish4/bin/.asadmin start-domain. | |
And stop the server with glassfish4/bin/.asadmin stop-domain. | |
We can see the running project with glassfish4/bin/.asadmin list-applications |
#!/bin/bash | |
# NB: First install nscd with sudo apt-get install nscd | |
# run this command to flush dns cache: | |
sudo /etc/init.d/dns-clean restart | |
# or use: | |
sudo /etc/init.d/networking force-reload | |
# Flush nscd dns cache: | |
sudo /etc/init.d/nscd restart |
scp /home/Desktop/my.cnf user@remotemachine:/app/MySQL/my.cnf use this | |
or you can navigate to the project folder of your pc and type scp /file_name root@remote_machine_ip:/root | |
(/root or any folder you want to navigate) |
If a database like MySQL is on remote PC like Digital Ocean or another, then it will not allow you to connect from your home PC. | |
So, you need to get permission from the remote PC. For that, first type "nano /etc/mysql/my.cnf". If you are in Ubuntu 16.04, | |
then type nano /etc/mysql/mysql.conf.d/mysqld.cnf. There you will find blind address which is set to 127.0.0.1 by default. | |
Set it with '0.0.0.0'. Then restart your mysql server typing "sudo service mysql restart". | |
After that, log in into your mysql typing "server mysql -u root -p" and give the mysql password if need to. | |
Then type "GRANT ALL PRIVILEGES ON *.* TO 'mysql-user-name'@'ip-address' IDENTIFIED BY 'mysql-password' WITH GRANT OPTION;" | |
( Don't forget to give ';' at last. Otherwise it will not work.). If you want to get access for only one ip address then, | |
replace 'ip-address' part with that like '115.127.96.190'. But if you want to get all ip-address in the world get access to your database, then | |
replace 'ip-address' part with '%'. % is a wildcard - yo |
Hello (<-- two spaces)
World
Hello
World
Here is the demo file of strings.xml. | |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="app_name">NKG Brazil</string> | |
<!-- Nav Drawer Menu Items --> | |
<string-array name="nav_drawer_items"> | |
<item>Farmer</item> | |
<item>Training</item> | |
<item>Support requests</item> |
You need to give two apks for testing on Firebase Test Lab. One is - 'main apk', another is 'test apk'. You can generate it easily but there are some other things you need to know. You can run the inidividual test file but can't make individual test apk for individual test files. All the test files under 'androidTest' folder make just one test apk. So, you need to remove all test files that you think, will fail before making 'test apk'. Then if you're sure about all the test files on the androidTest folder will pass, then you should check it on your local machine to test like on Test lab. Uninstall the older apk from your phone because on Test Lab, apk will be installed newly every time we run on that. Right click on 'androidTest' folder, then click on 'Run tests in ....'. It will run all the tests this folder has, thoroughly like Test lab. If it is passed, then you can prepare the apks for Test Lab. Here is the interesting part. For every test file you run (individual or folder selection), test apk is always |
// Construct a request for phone numbers and show the picker | |
private void requestHint() { | |
HintRequest hintRequest = new HintRequest.Builder() | |
.setPhoneNumberIdentifierSupported(true) | |
.build(); | |
GoogleApiClient apiClient= new GoogleApiClient.Builder(this) | |
.addConnectionCallbacks(this) // implement the callbacks | |
.enableAutoManage(this, this) | |
.addApi(Auth.CREDENTIALS_API) | |
.build(); |
private void requestHint() { | |
HintRequest hintRequest = new HintRequest.Builder() | |
.setPhoneNumberIdentifierSupported(true) | |
.build(); | |
PendingIntent intent = Credentials.getClient(this).getHintPickerIntent(hintRequest); | |
try { | |
startIntentSenderForResult(intent.getIntentSender(), |