Home > Mobile >  [for] Android development will input your information or print information uploaded to specify the r
[for] Android development will input your information or print information uploaded to specify the r

Time:01-01

problem:
This software is my graduation design project, which USES the SQLite database, registered the account always forget (a lot), but also used together with her classmates,
Recently bought a cheap server, would I want to learn straightly login information uploaded together with students to use! (uploaded files locally retained, not directly to the server)
So I think this way in the android development will directly enter the name of pass or printed out the information such as directly uploaded to specified in the remote server!

thought idea:
Android development will some information such as name pass or printed out directly uploaded to the remote server!
For example, the String name =this. Editname. The getText (), toString ();
System. Out.println (" current input user name: "+ name ). Written to the server in the user_pass. TXT file,
Every time when writing to check on the server for user_pass. TXT file,
If the remote server does not exist the file, the first to create user_pass. TXT file, and then the data written to the file of a single line (a line) an account and password information,
If the remote server has been in existence that file, later will need to specify to print data, write data to a file, append directly written to the file in a row,

for example code:
 
Public void loginAction () {

//1. Get the user input user name and password
String name=this. Editname. GetText (), toString ();
System. The out. Println (" current input user name: "+ name);

//if I want to write to the remote server name user_pass. TXT file, can I call methods directly on the name in the incoming parameters,
//packaging good APP here can be run directly, the information of the name, the user_pass uploaded to the remote server. TXT file,

String pass=this. Editpass. GetText (), toString ();
System. The out. Println (" current input password: "+ pass);

//if I want to pass to remote server user_pass. TXT file, can I call methods directly on the name in the incoming parameters,
//packaging good APP here it can be run directly pass the information on to the remote server user_pass. TXT file,

}


to:
I need a can casually called directly in a particular class, and method, can realize the incoming parameters (as mentioned above), the packaging good APP direct execution to call a method, it can be introduced into the parameter or print information, directly uploaded to the remote server user_pass. TXT file,

I do not know to have said understand, this is my graduation design almost the last step of basic (trouble) for a long time, this make uncertain is stuck in this step, unable to proceed to the next step!
Hope all walks of life each a great god, bosses, grant instruction! The younger brother here thanked first! (I compare food, also hope you give some detail solutions, thank you)

CodePudding user response:

You don't have to understand, let me guess:

1, you bought a cheap server, only provide file storage function, can't deploy the background such as JSP/PHP applications, so you want to use file storage to complete the user login information preservation,

2, but you mentioned the sqllite databases, between the lines to determine not to come out this database is on the phone or on the server side, if be on the server side, and you're ready to use file storage a bit contradictory, if be on the phone, now you don't have any in the scenario described in this area USES,

3, if the file is stored is used to save the user login information, you need to solve the following problems: A) how to save the file to the server, it need to purchase by your server to decide what kind of file upload - it supports? FTP or other? B) how to ensure consistency when writing files, that is because there is no background, unable to synchronize/lock, this is very awkward, your mobile phone, others will conflict of mobile phone and save the file, or data loss, or cover each other,

- PS: I don't know you what is the subject conception, what should be highlighted to solve the problem, you can't understand your thinking,
  • Related