1

Sorry if this question sound foolish .I am new to android and I am studying data storage option in android . My question is how to store data on cloud or server and retrieve it when i want.

If it is possible . I to want study and practice it. Is there any option to do practice like free cloud space or server space on which i can store my data and retrieve it for practise.

Data can be image,text,structured data etc.

Please guide me . I have completed topics sharedPreference,InternalStorage,ExternalStorage and Sqlite. And right now looking for storing data on cloud or server

FaisalAhmed
  • 3,469
  • 7
  • 46
  • 76

4 Answers4

0
Url url=new Url("server address");
HttpURLConnection httpURLConnection =(HttpURLConnection)url.openConnection();
        httpURLConnection.setConnectTimeout(3000);   
        httpURLConnection.setDoInput(true); 
        httpURLConnection.setDoOutput(true);  
        httpURLConnection.setRequestMethod("POST");      
        httpURLConnection.setUseCaches(false);               

        OutputStream outputStream = httpURLConnection.getOutputStream();
        outputStream.write(data);
Cgx
  • 753
  • 3
  • 6
0

You can practice with Google Drive for example. There is Google Drive API. Upload some files and implement API module in your application. There is a very good library for android that let you write very nice API module. Check this .

thealeksandr
  • 1,686
  • 12
  • 17
0

Check for firebase. You van set it up by selecting an option in android studio. This is the Best for the start.

grimface
  • 16
  • 2
0

If you want to store data on server then you will required backend programming for connectivity with Android.. you can prefer this tutorial.. http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/

BPatel
  • 11
  • 4