Trying to pass information from 4 fields in an Android app to a String in java for testing connection prior to saving the information -


I am programming an Android app that connects to a MySQL server, so far I am sure that the user Can enter the IP, database name, username and password and store it on the phone. Before trying to save .txt files, I am trying to create a string of information entered by the user to test the connection. I know that this is right in front of my face but after a day of this day I am stuck, please help !! The problem is located in 'TestButtonListener'

  Expands public class AppInfo activity {public static final string DEBUGTAG = "this is broke"; Public static final string DATABASEPASSWORD = "pinfo.txt"; Public static final string server = "sinfo.txt"; Public static final string databaseAsser = "ninfo.txt"; Public static final string database = "dinfo.txt"; Public static final string FILESAVED = "files saved"; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_app_info); AddTestButtonListener (); /// Test Connection Private Zero addTestButtonListener () {button test = (button) findViewById (R.id.testcon); Test.setOnClickListener (New View.OnClickListener () {@Override Click Public Zero (see V)) / R.IderServar, R.id.database, R.id.name, R.id. Pword /// and enter it into the string server as IP, database, name, paging. /// try {///} I have tried everything here, the name of the text file exited, /// or memory address, but the value is not typed in.} String server connect = new string (" Jdbc: mysql: // "+ serverIp +" / "+ dataBase +", "+ name +", "+ pword)"; Toast.makeText AppInfo.this, server connect, toast.lNGTH_LONG) Show ();} Do not worry, I came to know how to fix it. Gettext () .to string () and which come to find Android then z Does not work with the CBBC connector. 


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -