Folks, I'm trying to see if my plan realistic at all. I'm ne to
Android platform but not new to software development. This is my first
post here as well :)
We want (in our company) to create Android software to compliment our
truck management software. Basically, it will do couple very specific
tasks.
a. Send GPS updates to server.
b. Receive trip information.
c. Send pickup/delivery confirmation to server.
After evaluationg i. platform and Windows phone 7 platform we came to
conclusion that only Android has multitasking that works for us. So,
Android it is but I have some specific questions.
Data plan we want to use will be very limited. Probably 5M/mo and
no voice/text. I figured 5x1024x1024 = 5242280 bytes will give me 1k
per transmission every 15 minutes (3000 transmissions per mo). It will
leave 2M for other stuff that will happens every couple of days. Does
my math look OK or there is lot of "waste" traffic? Our server going
to be XML SOAP and messages sent will be just Lon/Lat in XML package.
1K will be OK? If I just calculate bytes it will be even less but I
wonder if there is "minimum" packet size, etc. Any insight on this
data limitation appreciated.
Because of #1 we need to "lock" device somehow so there is no other
software that uses network. Possible? If so, what do I need to look
for? I found already created app - firewall and it says phone has to
be rooted for that.
Receiving trip information. What's the best way to accomplish that
given my situation? Should I run some kind of listener? Will my phone
have IP address or something? Or should I get small text plan and use
that for this specific functionality? Can I receive text message in my
own application?
So, as you see we trying to shrink $80/mo service to $15/mo service
that will do big savings to our company but not sure if it's all
possible with constraints we have. Also, we may just give discounts to
drivers who have Android phone and will install our app but we don't
count on that.
Thank you in advance for any help on this subject.
UPDATE:
Now that I think about it - limited data plan present challenges initially but actually helps us do it "right" to make sure we don't overload server with constant polls. What I really like to see is some real-worls experience with data usage. Problem is, to us to even come up with test app - will require considerable effort. Would be much better to rule this out right now if it won't work. For example, if I knew that message size 2k no matter how big of a message itslef - then I would know immediately that it won't work for us..
If you have a very limited kind of data that you are transferring, the overhead of xml might be unnecessary. Instead, pass .csv data to different endpoints dependent upon the data that your are transfering (one endpoint for lat/lon, another for pickup/delivery confirmation)
You do have an ip address on each device, but you're not necessarily going to know that information - it's not constant, or consistent (it can change as the phone moves around). Instead, do a timed polling of the server (that would make your 3rd endpoint) See other mentioned solution of triggering on SMS.
As far as locking the device, I'm not sure about this, but it certainly seems feasible (though it's not consistent with your 'discounts to drivers who have Android phone'. I understand why, but if the phone has no voice/text capability, it's not likely that the phone will be used by the drivers for much besides it's expected purpose.
You are not going to achieve this with a default Android ROM in other words you have to create your own customized ROM from scratch and deactivate quite some stuff in order to get your devices not to use up the 5M/Month.
You can checkout the developers site on the Android source code to check out if that would be an option for you. Giving discounts to drivers owning an Android phone sounds nice and all but I'm quite certain that this is not going to get the desired results which I guess are that you equip all your trucks with such a device and track all of them.
In my opinion it is not going to work with a data plan of 5M/Month but on the other hand I don't know the data consumption numbers without testing.
UPDATE: Also I would not go with XML but with JSON due to overhead.
When you upload a GPS update, have the server reply with any of the trip data you need to push down to the phone at that time.
I think that for the data traffic (the other topics that you asked about are already solved in the other answers) using a bitmask-like solution will be the best option, first bits are for lat, the next for lon, and then some bitmask for the flags, and sending text data only if it is necessary.
Related
I'm trying to program an app using android studio that receives data (blood sugar levels) from the app tomato (which calculates blood sugar levels automatically every 5 mins or so). The tomato app already exists and is made by a company.
So I was wondering if doing this is possible. if so, how?
I saw this post: Is it possible for an Android app to use data from another app? which is very similar to what im trying to do but i didnt find an exact solution/answer to this.
Any opinions and help are very much needed and welcomed.
You would first need to know how the app is storing the data, you could check your phone's storage using the Device File Explorer in Android Studio. If they have exposed the data then you are able to check and read the files that the app has exposed. However, I have a feeling that they would not be leaving them in plain text for you to take.
Upon some further reading, it seems they read from a device called a MiaoMiao Transmitter. You could ask the producer of this product for a developer kit and see what they say. This would come with documentation as to how you can get data from the product. However, if they do not provide you with any help, you will need to do some investigation as to how the device functions.
Perhaps it sends android broadcasts when it is taking a reading? This is just speculation of course. This is very niche and I believe that is a reason there are only a few apps that use the device - they are trying to lock out "non-verified" developers. However, when there is a will, there is always a way! ;)
Best of luck!
I have been able to avoid database, webserver setting 20 years, but now I face it. I found so much information that I rather ask before messing all around with a broken system.
So, I need to host about 10 discussions that have about 25 messages each, older I want to remove. So this is really light weighted. My first idea is to have data in JSON format only because I have some experience on that. Data will be accessed from android application.
Now I have been boiling my brains with, mongodb, micro_httpd, libmicrohttpd, json-server, nginx, nosql, nodes, mariadb, mongodb... and it is time to make decisions.
While data is accessed from android application I wonder do I even need any webserver, actually, I dont necessary want that people can browse to host and read everything from browser. Idea is to use example Get to get sender, subject, message into android textviews and same to opposite direction. Thats why I started to think some api or database that can be connected from internet, but webserver is also ok, if stuff can be hided.
This is not a tutorial place, but if someone with experience could propose some setup for me and directions? I have googled pretty much all tutorials. In first setup I would be happy just to receive and send messages to database/api/webserver/webservice, but later on it would also be nice to have some authentication, and one important, somepoint there will be spam coming anyway and I read something about putting sender ip address five minutes to halt. Captcha would be very appreciated, I guess I could open one in android webview. And from our team leader, apache is not an option while it can leak some information (though I didnt see that dangerous). And to remind, this seems something really light.
I think Firebase is the best solution for you: easy to use, no server database complications, easy to implement. Watch some up-to-date videos from the web and you are set.
I've been programming for over 20 years, but mostly in the VB and SQL. As a side job, I host game shows at local bars and restaurants (Trivia, name that tune, etc.) and I'd like to develop an android app that I can install on mobile devices to give to customers to interact with the game.
I'm trying to make the game shows more interactive than just pen and paper (and time-consuming, manual scoring). I can get Kindle Fires for $40 each, so I thought it would be cool to create an app that will allow the user to do 3 things:
Choose an answer from a list (Multiple choice), and everyone can answer
Buzz in (blocking other users out)
type in an answer
I'd like the tablets to send the responses to a central "hub" or application that will record the answers so it can automatically do the scoring for me. If possible, I'd prefer to be able to have everything connect through an ad hoc wifi network that I would set up on site (that part I know how to do, too).
I'm not looking to have the questions appear on the phone at this point; I have an office-based application that automates a powerpoint presentation based on questions/answers and other parameters imported from a database/spreadsheet. (VBA is nice and easy for me.)
Ideally, the quiz questions would work like this:
I project the answer where everyone can see it.
After announcing the questions, the tablet apps are "activated" and
the user can then select their A, B, C or D answer (or buzz in, or
type an answer depending the type of questions/quiz).
My hub application would then receive the following information:
team/player name, answer choice, time it took to answer the question
(because I'm thinking of using a points tier that gives faster
players get more points, either based on time ).
The catch is, I don't even know where to begin from an android development standpoint, as I have no experience in that realm. In most programming cases, I know keywords to search on, but I'm totally flying blind here.
Does this seem like a feasibly application? There are systems online that I can buy, but the buzzers are expensive and the software has some significant limitations that prevent me from spending the money. I'd rather develop something myself and spend $40 per client unit and load it up with my software.
(Then, of course, license the whole kit and kaboodle and make a mint and retire in 5 years, living the good life off of my pub quiz empire...)
So, if you have any suggestions on starting points, or specific methods and processes to being fiddling with, an IDE...any help would be greatly appreciated. Once I'm up and running, I will reward you with extra points if you ever come to one of my events.
Go full kotlin !
Android works well with Kotlin and you can have a server quickly setup with : https://start.spring.io/#!language=kotlin
https://kotlinlang.org/docs/tutorials/kotlin-android.html
A good client for Android is provided here :
https://github.com/square/retrofit
You will probably have hard time to get started. Using same language for every part of the system will make things easier.
Also, Kotlin is less verbose than Java and will prevent you to make the usual mistakes found in Java world.
Also, if you create an open source project out of it, you may be eligible for IntelliJ.
Your very first stop is : http://try.kotlinlang.org/#/Examples/Hello,%20world!/Simplest%20version/Simplest%20version.kt
Get to know the language by trying it out. When you are in ease with it, start looking at Anko (https://github.com/Kotlin/anko).
To do the project in an easy way, break it down in milestones.
Simple app which shows 4 buttons (choices) and shows a message for each button. (Eg. you clicked "1")
Small server with spring boot. It should display whatever you post to it. (An "echo" server)
Improvement of the simple app to POST something to the server and display the answer in a dialog.
At that point, you application is practically done! You would have understood enough to complete it. The hardest thing would be behind.
Don't think your are smarter than the flock. Do these milestones, at least. You will be thankful to yourself.
This post may seems unrelated, but I explain how good Kotlin can be in such projects : https://www.linkedin.com/pulse/why-do-android-projects-cost-less-than-ios-christian-baune
I'm seeking more an advice on where to go next, rather than how to do it.
I'm developing an augmented reality Android game as a student project, and I've stumbled upon a problem. Four phones have to know each other's position and show it on a map with time steps (it should not be really realtime, for the sake of the game). Besides that, the players should be notified when one of the phones/players gets to some location, or does something.
I wanted to do it with a PHP service, where each phone would check in a couple of seconds for the positions of the rest (all by JSON), send it's position and that's it. Quite simple, but I'm afraid that there will be a lot of desynchronisation and unconsitent data as the game progresses. Since the phones don't start at the same second as everyone signs in. Also, I'm not sure how to do the events this way (for example, one of the players can cloak and his position should not be updated anymore in the next x seconds), or get to a location, or what items are still on the map (players can "pick up" items). Someone will know earlier than the others.
This really calls for a push-like solution, but I'm not really familiar with C2DM, and it seems to me that using it is a real overhead in development, and I need a C#/Java or similar server as PHP certanly can't push to the cloud (or can it?). I know C# and Java, but it takes more time as I need to solve threading and so on. Can C2DM even be used for this?
Basically, I'm seeking thoughts of more experienced developers, what is the best solution here for sync? Is there any way to remedy the problems with PHP and periodic checking the server or should I continue with the cloud service and a more complicated server?
Sorry for the long explanation :) .
Sorry that this isn't simpler but I've encountered pretty much the exact same problem in my own app and there is no way to avoid this, you need;
a server with a REST API to manage and distribute data
a way to set up friends / groups
a way to push data
Google Cloud Messaging really isn't that much trouble.
Check out the Google IO 2012 code, they've made use of it there with not much code.
http://code.google.com/p/iosched/source/browse/
What you really need to build is a rest api with quite a few functions for being able to identify devices and set up these groups of friends. I would suggest using Facebook integration for establishing a friend network.
https://developers.facebook.com/
And there are infinite ways to set up the REST API, but the fastest I've seen was released this year at google IO and thats Google AppEngine EndPoints.
http://devthots.blogspot.com/2012/07/building-awesome-android-apps-with.html
Give Comet a try, it's all about http requests
Im writing up a business plan and im having some trouble with the finance part. I put an estimate on the cost of developers, web designers and everything but server costs. Im not a programmer so I dont know all the details. But how much would you think servers are going to cost for a complex app. I cant get into too many details but it keeps track of user preferences, stores data about the user and there is quite alot of back-end to it.
As i said in my response to your comment to #mark; this is a tough question as we don't know enough to make good predictions. To help you make your own predictions
As its only a business plan (i.e. not set in stone) think of a number of users that you want to run on a given piece of hardware - for the data / web servers.
Be aggressive but in the real world as the developers will have to code to make this target and make that part of the spec for the software - 200 concurrent users on a web server for example and that 10 web servers needs a dual core xeon database server or whatever the app needs.
Then you can plot a graph of expansion as it goes; they tend not to be linear so have a lying weasel factor to handle that that rolls the graph off as you go.
Then don't forget about backup, load balancers, firewalls, content managers, caching proxies and all the other network kit you will need.
You will also need to budget for someone to run it all... If its a web app probably 3 to handle it in shifts. Either that or make sure your IT people are the most dedicated so that the servers get restarted in the night when it all goes wrong.
Finally ... Does the system need DR? if so that will need to be included.
It really depends upon the complexity of the app, how much traffic you expect and what platform you need. The real cost is in the time managing the thing.
I would consider amazon aws (http://aws.amazon.com/ec2/pricing/). There's even a free level to get started.
They have system images prebuilt, free and purchasable, that might have the configuration you'll need. You can use one to build an image of your own and deploy it to many servers quite easily if your app takes off.
This heavily depends on the numbers of users that concurrently use your service and of course how much traffic you will have. Without more details it is not possible to estimate any costs.
Edit:
Possibly it is the best if you sit down with a developer, explain her/him what you want to do. There is a good calculation program from amazon webservices (cloud).
You can find it here: http://calculator.s3.amazonaws.com/calc5.html
For example if you would need 5 Linux CPU medium instances for one year + Load Balancers (they will spread the load to the instances) + Traffic (50000GB out + 500GB in) (per user out 1GB/month + in 100MB/month)
This would be all together a One-Time payment $2275 and monthly $7101
http://calculator.s3.amazonaws.com/calc5.html?key=calc-DE0DC116-63C1-440E-BE15-213263DC4E2B
But this is a too complex question to rely only on guesses. The advantage of Amazon AWS is, that you can grow with the application. Perhaps it would be the best to start small and see what you will need.
Take a look at the Dell, IBM or HP sites, say, and see if they quote rough figures. Compare with the cost for services like Amazon's EC2, or Microsoft's Azure. It's impossible to tell you what you need, without knowing what you're actually doing.