Mobile Sound Tracker Application Architecture - java

I have an assignment, but I can't seem to get my head around it. I've been tasked to create a mobile app on Android Studio using the microphone sensor to record audio (Parameters: Duration & frequency). The data/sample is then stored locally, perhaps using SQLite to store the id, date, time, location and sample. Let's say after 10 samples (this is where it starts to get confusing for me), the samples are bundled up and sent to the communication server which I believe OkHttp client is used in this case. The data gets sent to a local server (Apache?) and a website (Springboot) is used to retrieve the information and show the samples on Google Maps.
https://imgur.com/a/3cXzCQl
Link to application architecture is above. I have no doubt it is wrong, but would love some insight on it please. Also, I very new to all of this so I'm sure there are a lot of gaps in my message above. If you have any questions please feel free to ask!
Technologies I've been recommended to use:
Local Server: Apache
Website: SpringBoot
Communication tool: OkHttp
Android application: Android Studio

Related

How to access directly internet on WearOS app

I am looking for My data on wear OS app to send to my external apache server with php and mysql.
Ultimately I need watch sensor data in MySQL database, So i created a POST request page using php. How do I send POST request?
Note: I am not using mobile phone between WearOS app and My server. WearOS is connected to internet via WiFI
Please if you know any solution help me
FYI: I tried basic things given at https://developer.android.com/training/wearables
Using Smart Watch with API level 23
Regards
Unfortunately your watch system version is too old. I strongly recommend you to buy a new watch or try update to Wear OS 2.x (API25) if your device is still under maintain.
If you insist on using current device the only way to access the Internet is via mobile phone. You can not send HTTP requests directly.
But the old version system should not be able to connect the WiFi. Please confirm your version at first. If your API level equal or larger than 25, you can access the Internet as same as phone using OkHttp or others you like.

What is the established way to request data from an android device

I currently have an small application that I have been using to learn java/android programming. Right now I have a setup were the app on one phone sends a request (via sms) to another phone running the same app. The remote phone receives the request and sends back some info. Next I would like to try this from the web. Is there an established "best" way to to this?
I was thinking I would have a web server send requests to the device via google cloud messaging and then have the device return the data directly to the web server. (Not that I really know how to do any of that just yet).
I see that there is a google cloud messaging return path (send messages from the device to the google cloud server, but it seems very new, do I need something like that? The main thing I want is to be able to ask the phone to do something when I want, not have it poll to see if there is a request, or just periodically update some status.
UPDATE:
Thanks to the answers below for confirming to me that I was on the right track.
I now have some basic functionality.
I started out using this gcm android demo code
https://code.google.com/p/gcm/source/browse/#git%2Fgcm-client%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fgcm%2Fdemo%2Fapp%253Fstate%253Dclosed
and this ruby gem
https://github.com/spacialdb/gcm/blob/master/README.md
between the above two I was able to send a message to my phone pretty easily.
To get the round trip working, I setup a very simple rails app on heroku.
I included a modified version of the sample code in the gcm gem in a controller and then used
HttpPatch (needed for rails 4) to send a post/patch from my phone to my web app, the controller then echoes the message back to my phone.
I guess it would be nice to get the two way gcm stuff to work, but I am not sure there are any gems that handle that, and I am not qualified to handle a task like that :)
I would say it's the right call: Google Cloud Messaging for Android
From the site Android Developer:
This could be a lightweight message telling your app there is new data
to be fetched from the server (for instance, a movie uploaded by a
friend), or it could be a message containing up to 4kb of payload data
(so apps like instant messaging can consume the message directly).
In this case you don't want to fetch data from the server but you want to send them.
You can send them in different ways. I would suggest, since you are learning, to try a RESTful solution using one of the implementation of JAX-RS.
As a short and direct answer for beginner : GCM (Google Cloud Messaging) would solve your issue. However, if your app turned out to be something bigger, other more technical and complicated solutions are present too.
see this link.

Using Android license verification serverside

I've been thinking about implementing of Google Play licence check on my Java server. Is that even possible? I haven't been able to find anything on this matter. I know Android LVL is written in Java, but I'm not sure if it can run outside of dalvik machine. Is there a posibillty of checking Google account name or some kind of device ID against Google Play to check whether an app has been bought in a Java server application?
The answer above is simply verifying response data (returned by google LVL on android device) on app server.
I think the question is asking if it's possible to call some google web API to do Google Play license check on its app server. But it seems like google doesn't open the web API interface to its licensing server, all LVL calls need to be done using its google play service framework on android device.
Yes it's possible, the java sources are out there and could be downloaded (and afaik, the jar is not dexed until you compile your application) - see some kind of manual over there at developers.android.com to read about how to get the sources
I've heard about a PHP project trying to attempt it, but using java should be no problem at all - you do the same things on the server, the manuals state for the client - and let the client sends the encrypted response from the market directly to the server via SSL (e.g. byte[] post)
You should get a UID from ResponseData.userId
Read some more in this blog post and more info and links in another SO answer

Android PowerPoint remote

I want to write an Android remote to PowerPoint. It means we can control the slides by using phone.
Where can I start from? Give me some hints please. I've just read the Android basics.
I think RemoteDroid will work pretty well for this purpose and it's a fairly complicated job to replicate.
http://remotedroid.net/
what I did was:
I use a .NET #C Client on the Windows Side and
A Java Servlet and XMLRPC Web App running on a Tomcat ("in the middle").
And of course a Android Client as the controler
My C# Client creates a persistent HTTP Connection to a Servlet. And the Android App is sending short HTTP GET Requests to the TomCat, stuff like goto3 or next (the request has also a kind of a Presentation ID as parameter). The Comands from the Android Device are dispatched to the previously opened Persistent HTTP Connection from the .NET Client.
In The .NET Client I use a local installed PowerPoint as an ActiveX/OLE Control. You can do pretty much everything programatically in over c# that is possible to do "by hand". Open a .ppt(x), start the SlideShow, control the Slideshow and of course it is also possible to edit the slides content. You can find a lot of examples by googling for Microsoft.Office.Interop.PowerPoint
I pair the .NET Client with the Android Phone by using a Generated QR Code. That QR Code I show in a generated PowerPoint Slide. All Work around the QR Code (C# and Android) is done by using code from the ZXing (Zebra Crossing) Project.
You can try it out, Instructions and Downloads are here. The App is called FonPrompt and can be found in Google Play.

Syncing Android and Server

I don't know what this is called, but it is something like syncing android application and a Web server. Examples are RSS Feeds and Weather Forecast
Does anyone know the concept behind developing application? I mean how do you sync the Android phone with a web server. Is there any programming needed in the server side and the client side(Android)
Are there any programming books that tackles this subject? Thanks.
What should I do to connect to Server from eclipse - Android?
check the whole conversation here
The server should make the data available in a meaningfull parsable format (for machines). For example RSS/XML feeds, etc. Your application should poll frequently and updates the status/screen.

Categories