Need Help on Android Development App

Big Bang

Member
Joined
Nov 11, 2010
Messages
369
Reaction score
0
Hi guys, i trying to make a apps which consist of FTP server using my phone which Raspberry Pi will act as a FTP cilents to send a JSON file to my FTP server and my app will consist of google map which showing markers of various location by reading the JSON Array object and separate them into different colour marker . As i will be doing on the Android Apps side

May i know which are the recommended build-ready apps for FTP Server to use some research i had done are ES file explorer & any tutorial/resource can i look up about reading files from FTP servers to send as a JSON array object for my Google Map application , as i had some experience doing hardcoding the JSON array to map with google map api on PHP and already know the basic of android like fragment ,intent ,etc .

Thanks for Reading
 

Big Bang

Member
Joined
Nov 11, 2010
Messages
369
Reaction score
0
You should setup a REST/PHP server and pull the JSON from your app, not the other way. FTP is not the prefer choice for this.

You can put a Apache server on the Raspberry.

Hey thx for the reply will look into it , As the Raspberry Pi is used as a dongle device to get the Lat long of individual location and used at outdoor(without monitor) , Am i able to run Apache server and getting the location at same time ? i am new to Raspberry Pi
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
Hey thx for the reply will look into it , As the Raspberry Pi is used as a dongle device to get the Lat long of individual location and used at outdoor(without monitor) , Am i able to run Apache server and getting the location at same time ? i am new to Raspberry Pi

This is the right direction. You wouldn't want to use FTP because it's not suited for your kind of job. It is not a file transfer service you are using. You are looking at a resource request service which today HTTP will serve as the more appropriate conduit.

RaspberryPI is just yet another Linux/UNIX system, albeit a small one. Depending on which distro of OS you are using, you can download from the respective OS repository or 3rd party repository may it be debian based or redhat based.

Debian/Ubuntu etc...
Code:
apt-get install apache2

Redhat/Fedora etc...
Code:
yum install httpd

You can install all the necessary tools as long as they are available from the default distro repository. Otherwise you may use any of the repository externally if they are found elsewhere.

For your purpose, I recommend more compact HTTP server such as LightHTTPd which is more lightweight, or NginX. Apache will be too bloated for an embedded system.

Without further information from your description, it could be having a web server is not what you need. You mentioned you have an app, how is this app going to access the RaspberryPI ? Is it going to be via Internet ? Are you looking at multiple RaspberryPI devices distributed all over the places ? Is your receiving end application a web application which you access using a browser from laptop or mobile devices ?

If so, then how is your raspberryPI going to be connected to the Internet ? I will assume you are using some USB 3G/4G dongle or using a Wireless dongle connecting to a nearby WiFi service with Internet access ?

If so, then all you need is a simple CURL utility which is found in nearly all Unices platform. Just perform a HTTP POST or PUT, upload your file from the RaspberryPI to the receiving web server. You can read one example found at https://ariejan.net/2010/06/07/uploading-files-with-curl/. Also do read the CURL manual to discover a lot more capabilities from it along with encryption during transfer using HTTPS and/or HTTP authentication for protected web end-point receiving the upload file.

If it is just mobile receiving app, you can consider using PaaS services like Parse.com to make your server end more versatile and scalable and have your mobile app just retrieving from Parse.com
 
Last edited:

natnai

Supremacy Member
Joined
Nov 6, 2007
Messages
8,020
Reaction score
1
You should setup a REST/PHP server and pull the JSON from your app, not the other way. FTP is not the prefer choice for this.

You can put a Apache server on the Raspberry.

This. Why would you _ever_ use FTP for this? It's slow and insecure. You should set up a RESTful service on the RPi to receive HTTP requests from your app (client). There are many languages available for this type of purpose. For quick and dirty of course PHP is an option, but I am always going to be a JS evangelist so I say give Node a go. It's fast and easy, and there are many frameworks expressly designed for building RESTful services with it.
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top