Implementation of data flow between devices? - android

A similar question was asked How to send data from one android device to another?
However their scope of data pass is between android devices.
And so to extend that question, I wanted to know ways of connecting two completely separate devices like ECG device to apps (Android or IOS).
For example, AliveCor allows to send reading of external device to their mobile app.
So what ways do we have apart from Bluetooth or TCP/IP?

You have essentially listed all reasonable means that are used nowadays. You can either transfer data via bluetooth, using your own/3rd party hosted webservices like firebase or direct tcp/ip connection. TCP/IP probably being the hardest, bluetooth being 2nd hardest and webservice being the easiest but yet requiring both devices to be online. The implementation is however totally your responsibility (with web you would either add user registration and sync user data to all signed in devices, or if sync is one time thing, you could upload data to your server, issue a expiring token, which if entered in other device allow it to download that data).

Another way is NFC(Near field communication). You can transmit data when phone(with NFC) is near to another device (with NFC). Also,
For example, AliveCor allows to send reading of external device to their mobile app.
this app use NFC for transmitting data.
From permissions ( google play AliveCor Kardia app)
Also read the information about this system on https://www.alivecor.com/faq/
https://books.google.com.ua/books?id=H-JRAwAAQBAJ&lpg=PA41&ots=EV9Qy61sjY&dq=nfc%20data%20transfer%20ECG&hl=uk&pg=PA41#v=onepage&q=nfc%20data%20transfer%20ECG&f=false

Related

best way to connect android app with desktop app?

I want to develop a system in which data is being shared between DESKTOP app and Android app.
After searching I have found that I need a server in between them. But I can't figure out what the server is? How do I create it? And how will it help me connect my two platform devices?
Desktop App will receive data from android app. And manage data. It will also be used to send notifications/messages to android apps.
Android App will be used to input data and send it to desktop app. It will receive updates/notifications from desktop app.
Now how do I connect these two? I basically need a common database for real-time data sharing and notifications.
Edit: I am building the desktop app using C# and android app using Java.
Edit2: Maybe I can host the database on CPANEL or 000webhost using PHP. And then connect it with both android and C#. Is this the correct way to do it? Is it possible to connect it with C#? I know it can be connected with Android, not sure about C#.
You don't necessarily need a database. You need a common network protocol between two applications.
All network communication is done via sockets. You need a library that allows you send data over sockets. For example, here's an Android guide that is about sockets.
A socket binds to a specific port of a computer, essentially making it a "server". Much like how web servers all expose port 80, and communicate over a protocol called HTTP. Which is important because it is up to you to decide what protocol your applications communicate between each other, because the socket just sends bytes - it doesn't care what you send or how, as long as it travels to a port on a particular server. It also won't parse the data for you, that's up to your application to handle. For example, how would your desktop app know the Android device sent it a text message, or some image to be displayed, or an address to show a map?
All in all, your reason for wanting a desktop application rather than a web application is not entirely clear. Parsing only the body of HTTP payloads from different HTTP paths that are mapped to different methods (which is typically referred to as a REST API) is much simpler than building your own protocol. You might as well build a desktop GUI over top of a web server.
Making the desktop app send updates back to your mobile application is basically impossible using a bi-directional socket architecture. Your Android should not be running an open server socket continuously just for your application, mostly because battery drain, but because its network address is subject to change frequently, and you therefore additionally need a registration server from which your device would reconnect to. Such a service exists as Firebase Cloud Messaging, which is a rebranding of the GCM technology made by Google, and it can be used to send push notifications to devices, but only with small data payloads.
See here about what activities occur on an Android device for notifications. How does push notification technology work on Android?
Back to the question about databases. Suggesting one to use is too broad. And you only need one of those if you want to store and/or query or join datasets. The same computer running the desktop app can install and run whatever flavor of database you prefer, whether it's a relational database or noSQL database, entirely up to you. The only realtime databases I know of are RethinkDB and Firebase.
You could also just hold a SQLite file which is as good as a small scale database (even the SQLite documentation recommends it for low traffic web sites).
Firebase supports web interface, so you can develop html code and integrate in desktop app, something like web integration in windows form application

How can you share data between multiple android devices using the same Unity application?

I would like to get and send data to android devices that runs the same Unity application. Most data that will be sent will be booleans and locations (longitudes and latitudes).
I'm not sure if I understand your question, but if what you want is to make your Unity3d app/game communicate with other mobile phones using the same app/game you can either do it with: the internet, bluetooth, NFC. The easier solution is communicating through the internet which you'd have two solutions:
Create a server that will receive the data you want to send and which will "pair" the devices you want to send. Each device will send the data to the server and the server will then send the data back to the other devices.
Make some P2P solution(peer 2 peer solution) which is probabaly what you want. In this solution the devices will connect directly to each other and send the data.
Luckily Unity3D has a networking engine that can help you with that. Look at:
https://unity3d.com/learn/tutorials/topics/multiplayer-networking
https://docs.unity3d.com/Manual/UNetOverview.html
And here is a simple tutorial on how to use the Unity solution https://unity3d.com/learn/tutorials/topics/multiplayer-networking/introduction-simple-multiplayer-example

Technology Choice for Tablet Solution with Offline Capabilities handling Personal Information

We are looking to rewrite a form-based application with a fairly tight time-scale (ideally, we would be launching the beta mid-July, and the final version by September). The current platform is showing its limitations and would require an exorbitant amount to bring into line with our requirements. As such, we are looking to bring the technology in-house, and writing our own solution.
Requirements:
Must be able to handle loss of network connectivity - the user may not always have internet access
Must have secure two-way communication with the server - the information being uploaded and downloaded can contain personal information, and it is imperative that we not be responsible for data-loss
Must be able to synchronise and update / remove records already on the tablet - the information can change, and the user must have access to information as "fresh" as possible
Must be able to store a large number of records (~1000+ records, a few kB each, so total 5+ MB) offline - depending on the tablet model, the user may only have internet access via wifi at the beginning and end of a day, so as many records as might be accessed should be downloaded and stored
Should be accessible on both iOS and Android
The solution we have currently is a form app, which fails heavily on point three, which is rapidly becoming a deal-breaker. The solutions that have been floated are:
An HTML5 website with offline capabilities, through the tablet's web browser
A website wrapped in an off-the-shelf app "shell" to provide offline capabilities, deployed through the app stores
A custom-built app (through Xamarin or similar) to be deployed through the app stores
Unfortunately, we are a company of desktop developers - we have no in-house experience with tablet applications currently. That being said, the application is tied very closely with several of our other products, so it would be difficult to outsource the development.
The question, therefore, is this:
As a mobile application developer, what approach would be "recommended" to build an offline-capable app that must communicate securely with a server when it can?
So for 5 mb of data that needed to be synchronized, I would build an web service from where you can get the data for your mobile application.
I prefer JSON Format for the data.
When your app logs in while internet connection, the app can fetch the complete data from the web service.
What I do then, is to compress or archive the json as file to the app internal filesystem.
Now there are only two scenarios for the app:
offline (login):
get the archived json file and do what you want with your data
online (login)
fetch the data again from the web service, archive it and then do what you want with your data
To synchronize the data back to the backend is not really mobile application stuff. You have to think about your architecture in the backend.
For security ensure you have ssl enabled for the connection to the web service.
I am native iOS developer but I build something similar with Symfony as Backend and three native applications (iOS, Android and Windows)
You could also use firebase as a backend, it really depends on your needs.
At the end, im just a stranger from the internet :) and normally when a customer needs an estimation, we really need time for such an estimation and to choose the right platforms that fits for the customer.

Is it possible to create an Android application where the server side run on Android Mobile?

I am studying the feasibility of developing a mobile application for Android, for traders, where the client-side installs on a smartphone (A) and of course, through Google Play, and server-side installs itself in another smartphone (B) that installs via the Play also.
B through the merchant takes pictures of your items and upload adding a description (this article) for the application server side, in ways that the user A, which has the side application client can enjoy the products.
In short:
Capturing data to the server must be made ​​through an Android phone that can take pictures of products and upload to the system and adding text to describe the product.
Consultation of products will be made ​​by a mobile phone with Android as well.
Is it possible to do this? If not, I would appreciate to give me suggestions on how to do this. But I wanted to try not to make using computers (PC / Mac) or web app to load the data to the application. I want a system purely mobile. Maybe will use the computers to store the BD system only.
When you say the server side is a phone app, you imply that the phone is always on, the app is always running, and you need no central storage whatsoever.
You also lose any ability to keep analytics for your service, which is a crucial part of any startup.
If you want your app to have the server available even 80% of the time, and you want to keep a central database of what's going on, you must have some server you can control.
There are a lot of very cheap and manageable cloud solutions, so you don't need to buy an actual server.

Message exchange between different instances of my android application

I would like to create an Android application that neeeds to communicate with same application at a different device from different users. The user will be logged into the application using his Google+ account and he will be able to exchange messages with his friends. Imagine it like a chat application without a server in the middle.
The problem is that I don't own a server so the communication must be based to any Google framework or it must be implemented from device to device.
Do you have any suggestions?
I don't believe its possible to connect two devices over the internet without a server somewhere in the middle, basically there is no practical way for the devices to find each other without some known location they can both contact.
Your server wouldn't need to be too complex/expensive for testing usage. The free tier of Google Apps Engine, or a $5 PHP hosting account should do it.

Categories

Resources