I am just wondering if a toast activity could print out a text taken from an online database (google spreadsheet or google doc) at random? using JSON maybe?
Here is my code and right now it's just displaying random text but from the bank which I have provided in the code...
String[] toastMessages = new String[] {"text1", "text 2", "text 3", "text 4"};
int randomMsgIndex = randomnize.nextInt(toastMessages.length);
Toast.makeText(getApplicationContext(), toastMessages[randomMsgIndex], Toast.LENGTH_LONG).show();
}
Many Thanks!