I am taking a drive into GTFS (and only a couple months into learning Android coding). I signed up as a Developer for my transit system and received a key for their GTFS data download.
However, they require that you download the GTFS data to your own servers rather than pointing your Android App directly to their servers to get the feed. Basically, I need to accomplish the below.
Their Servers ---Data---> My Server ---Data---> My App
My app will have all the tools to read/manipulate the data so the My Server part should do nothing to change the data.
I've looked into services like Amazon Web Services which has a free tier but not sure if that is what I need. Also, if it is what I need, then unsure of how to tell it to get/store the data from the transit system's servers.
Appreciate any help!
One of the easiest ways to get started, if you want to host your own server, is to use node-gtfs. However it is not the only way.
The shortest learning curve would be to use one of the two services that host transit data and provide APIs that you can use to build your own app:
Transitland
TransitFeeds.com
There are also a number of other libraries/tools/servers in other programming languages (depending on what you are comfortable with and what your goals are). OneBusAway is probably the most robust but unlikely to run on the AWS free tier. A good list of the others can be found here.
Related
I need to develop an Android app which is basically a geolocator, allowing people to reach each other via Google maps. All being said, I don't know how do I accomplish such thing since I don't know how it does work and if I need a server or database on the way. I'd be grateful if anyone could shed some light on this topic.
As you said you will need Android application and Server through which Android clients will communicate.
Android Application
will be getting data of other Android devices from server and then showing those data on the screen
will be periodically sending own location to the server
Server
is responsible for storing geolocation of Android clients, data can be stored in some database or memory of the server, depends on the use case, how long you need to have those data, how important they are, etc.
is responsible for sending stored geolocation data to Android clients
you have various options, you can write your own server in whatever technology you wish - it can be PHP server, NodeJS server, Java server... or you will use some serverless solution. Check for example
https://firebase.google.com
has to be hosted somewhere, you have many options:
there are "traditional" hosting providers, where you are usually limited by technologies you can use, for example you can just use PHP or you will use products from Heroku or Amazon AWS.. there is more, Microsoft has Microsoft Azure or Redhat has Openshift.. There are differences in prices, services, etc., it is up to you to look and decide what is the best for you.
I for sure missed lot of things. It is not in my power to describe every possible corner case because the question is too broad but rather provide you with higher overview of the problem and possibly point you where to go next. I suggest to you to read more about problematic and then get back with more specific issues to solve.
Currently I'm in the planning/research phase for a final year college project I will be starting soon.
I want to make an android application focused on GPS/Tracking. The aim is to group together users on different devices. One user can generate a password which then can be used by other users which will then create a group. Anyone in this group can then see each others locations on google maps.
My question is what would be needed to create such an app? I have no experience in android development, I have a basic enough understanding of Java and Python.
From my own understanding I believe I would need Google Maps API, a server and a database.
Any articles/tutorials or advice would be greatly appreciated.
From Android side:
For acquiring GPS location you may want to use GoogleApiClient. This will give you good location results even if GPS won't be available in certain location because it also uses Wi-Fi for localizing and it has some other cool options.
Check out this tutorial:
http://www.androidhive.info/2015/02/android-location-api-using-google-play-services/
To handle connection to the server you may be interested in using Retrofit or at least Unirest. These are libraries which are helpful in making requests to your server.
For map displaying you can use Google Maps or OpenStreetMap.
From both sides:
In order to send something to the server and receive the response you may want to use some serialization tool. Consider communicating using JSON and using for example, GSON for that purpose. There are many tutorials for using this on the web. For example: http://www.javacreed.com/simple-gson-example/
From server side:
Check out Spring Boot Framework. It's really powerful framework. It may be too much for starters but it's good to know it anyway. It will give you a possibility to make server with easy to maintenance code. You can just make a method and annotate it with #RequestMapping("/players").
jOOQ will give you possibility to build type safe SQL queries. Although, it's not necessary to have it, it will make things easier.
Although it'll probably be small application, you may be interested in using some database connection pool. For example: HikariCP
Database: You have to choose your database engine. I'd recommend using PostgreSQL with PostGIS plugin because by using them you can for example, easily calculate distance from one person to another. It will handle the curvature of the earth for you. Generally, it's useful for storing location data.
You can make everything alive on your computer or you can use one of the cloud computing service providers. For example, Amazon Web Services provides EC2 instances and relational databases like PostgreSQL and they give you free tier, so you can use their services for free with limited usage and for limited time. They also are friendly to students. Check out GitHub Student Developer Pack.
I am trying to create an android application in which an user will pretty save some data in database-like user data, photos and also be able to retrieve.
But I am clueless how to set up a server, connect to some database etc.
Can somebody help me point to right resources for end-to-end installation of server, database, and its interaction with the android application
Just set up a basic server that works over HTTP, and use HTTP libraries for android to make requests and handle results in the device. There are plenty of technologies with which you could make the server, just google building REST API with PHP/.net/java (whichever language you are comfortable with).
If you are mobile app developer and want to create server-client app then better use any back-end service rather than implementing new by own. Some most advanced and simple to use services are Parse and Firebase , BaasBox also there are many more.
And the plus point is this services free of cost until you have very large users.
I am planing to implement an app and I have come to a point where I don't know what is the best approach.
Scenario:
I have an app where I am making a todo list and I am adding 3 items. I use my phone for this.
Then I take my tablet and want to continue adding another task. Then after a while I take my wife's phone and want to add 2 new tasks.
Basically I want to have a very simple way of storing the tasks online and be able to sync it with the app.
I am seeing two possible ways:
have a web server with a database + web service calls. This has the disadvantage of having a host paid, learn some extra mysql + web service techniques.
store somehow the data on cloud and allow the app by login to access an account which stores the file. I am thinking here at something like Google Drive / Dropbox. But I don't know how I would be able to sync only the updated values, not the whole file. Because I am thinking, if I store all the tasks into one file, each time I update the file, I'll need to upload it fully, which is not the best approach.
I am open to any advices. What approach would you recommend ?
There's also Google Drive's "Application Data" folder.
https://developers.google.com/drive/android/appfolder
This has the advantage of using the user's storage space.
I would look into either Google App Engine or Amazon Web Services. They both give you free allotment of usage per month and if you go over then you start paying, chances are you wont get past the free tier for a while.
AWS is a bit more mature than GAE currently and seemed to be a bit easier to implement that GAE was when I was researching them
Take a look at the new training class for sync adapters:
http://developer.android.com/training/sync-adapters/index.html for the basics of sending data from your device to a server.
On the Android device, I suggest you store your tasks in a content provider. This helps you keep track of updates since the last time you synced. You can then query the provider during your sync, send only the data that's been updated, and store the data on the server.
You should probably store the last update time on the device, so you can tell if the server contains data that isn't yet on the device. Remember that you'll have to download tasks as well if you want all devices to be in sync.
You can try Google's Firebase. Firebase provides SDK for Android and iOS devices. And also, firebase supports offline and syncing. Firebase also provides object storage service. It easier to create firebase app than you think. Have look at this firebase's firestore service.
You can take a look at our Rethync framework (freeware with source) . Using it you can simplify the task of detecting modifications and sync only updated data. Next, Rethync provides both client- and server-side API so you can create your own service (and host it on the web side) or you can write your own transport for the cloud service of your choice (we will provide some transports in future, they are under development now).
I have an Android game and I want it to store data - say a high score for example - against each user on a server backend.
Here's a list of outrageously demanding requirements! It's unlikely any solution can meet all these demands, so I've changed/prioritised them:
Minimum/very easy server and client code
Free/cheap
Automatically scalable and no/little server maintenance
As secure as possible with minimum code
Seamless - no user action required to authorise/choose anything
I know about Parse, and that seems the easiest option but I'm concerned about the future cost and would prefer more control so I'd like some alternatives.
AWS seems a lot of effort, although it handles secure anonymous authentication fairly easily and well.
App Engine would be great if there was an easy way to secure requests without requiring the user to login or authorise app engine.
So... I want the seamlessness of Parse, the security of AWS, and the auto-scaling of App Engine. Also the ease of use/coding of Parse. Fingers Crossed. :)
Thanks
My advice: use Parse, but create enough abstraction/encapsulation in your models so that swapping Parse out for another service won't be so painful. But seriously, I don't think Parse will get expensive (or even not-free) until your app is seeing very high demand. Furthermore, the Parse guys seems pretty committed to openness: you can export your data as a CSV and they have a REST API so any type of program you write can access the data.
If you're determined to roll your own, I'd recommend creating a Rails back-end with Heroku. Piggyback SSL is free, HTTP Basic Auth is really easy in Rails, and the entire stack will play nicely with whatever db you'd want to use (I'm assuming NoSQL since you want flexibility).
Any PaaS that supports SSL and a dataabse will probably do. Estimate your traffic, data storage and processing needs and pick one that is cheap enough to get started. App Engine is going out of beta soon, and the pricing model will be changed, so if you want autoscaling you'll have to pay for it.
What exactly is 'secure anonymous authentication' and how does AWS support it?