Android - How to transfer file between server and client - android

i want to create client-server apps, where client using Android and Server using Web Apps.
the question is, How to transfer video file from Server to all client ?
at the server, we're doing upload video files and client receive update (files). i assume this, client can download using cloud help, but i dont know what technology can be used at this.

This looks like a use case for Google's Cloud Storage for Firebase:
https://firebase.google.com/products/storage/

Related

How to Upload a file from web to android web server using NanoHttp

I need to use android device as web server and browser as client.
I need to be able to upload file from client to android device, I really don't know how.
I really don't understand anything from Http stuff and nano.

Cordova Local Storage Sync with Server

I have a hybrid app where I use a backend server on the cloud using mongodb and nodejs. I feed my frontend web app and android app using http post and get request.
I was wondering if there is a best way to save the data (from server to android or vise versa) and sync them together. Much like how Trello does their android app.
As far as i know local Storage is not a safe storage, as it can be cleaned as needed by the phone.
I recommend using sqlite for the mobile side.
for quick communication with server, i recommend using sockets (i used it for my chat app)

Android mobile apps retrieve data from cloud

I wish to have an overview on this scenario.
Please be layman term, I am slow learner.
Here is the scenario:
Android mobile apps connect to the cloud, then the cloud will return a website link for me. eg. http://www.example.com/123
Website link to be return can be control by admin on the cloud.
Mobile apps will only request the link from cloud.
The cloud there will only sending the link to the mobile apps when have request.
Problems:
What is cloud? what can be done on cloud?
How to connect the mobile apps to the cloud?
What need to be done on the cloud? host a server?
How the mobile apps connect to a website link? using uri will redirect me to the browser. i wish it can be just connected.
Thank you very much.. ^^
What is cloud?
In the simplest terms, cloud computing means storing and accessing data and programs over the Internet instead of your computer's hard drive. The cloud is just a metaphor for the Internet. In this case it refers to your server. Which you may need to purchase. (Server space + domain name[optional]).
What can be done on cloud?
Accept some requests from the client and return some data.
What need to be done on the cloud? Host a server?
The server has to be configured so that it can receive requests from the clients (mobile app). For this you need to install a Web server application like Apache, tomcat, ngnix, IIS, glassfish...etc (this depends on your server code). Also you need an application where you need to write the logic to handle the requests and return the response (In your case the website link). The application can be wriiten in PHP, Java, Python, javascript, .NET,..etc. The client communicates with this application.
How to connect the mobile apps to the cloud?
How the mobile apps connect to a website link? using uri will redirect me to the browser. I wish it can be just connected.
Basically (on Android) you make a simple URLConnection to the server from your code. Or you can use some libraries like Volley or Retrofit. Make sure your app has INTERNET permission. These are a million (more maybe) tutorials on the internet that can tell you how.
use free hosting or purchase hosting and try to learn about restFUL api..
try these tutorials
Android Volley Post Request Tutorial – User Registration App
Android Studio Volley Tutorial to Create a Login Application

How to send File to offline user in xmpp smack or asmack?

I tried both smack and asmack.I am able to login,register and send message and send file also.but problem is when i am sending file to offline user i am getting (service unavailable 503 ) error.how can i send file to offline user using smack or asmack ...if not possible with smack and asmack then what is alternate way ?
I have encountered the same problem. The only solution I could think of, was to develop an upload service, that allows the user to upload a file and generates an url, where the file can be downloaded.
I run the service on the jabber server and I am using the same credentials for login.
the first app uploads the file, and receives a download url which is the "secret"
it sends the url to the other client using a custom protocoll extension, the other client downloads the file if he chooses to do so
You may customize your protocol to decide when to remove the file of the upload server.
This technique also has the advantage, that you can share or forward downloads without wasting bandwidth on client side.
But I am not really satisified with my solution, as I have to develop an own service. Would be great if is was part of the XMPP and already implemented on a jabber open fire server.

Android App : Sending files to the server using the app

I intend to build a simple app to send files from a mobile phone to a remote server.
File size can vary from 500kb to 10 MB.
Is there any service available from Amazon or Google or any other company that will help with the server end side. I did some research about Google Cloud messenger, Pushbullet but they support only short messages.
Best way is to upload files from Android (or iOS with similar APIs) to respective cloud storage directly (not streaming through your server process, but direct to the storage)
Google Cloud Storage Java Client Library to upload to Google-Cloud-Storage by using
GscService.createOrReplace(GcsFilename, GcsFileOptions)
Amazon S3 Android TransferManager to upload to Amazon-S3 by using
TransferManager.upload(bucketNmae, fileName, file)
Both these services are meant for uploading files from a android app to respective cloud directly, without any server code. Then you can do either of
Make the file available to download with a web URL (as CMS).
Use the file inside the cloud in your application (as File System).

Categories

Resources