Communication between cordova app and native app? - android

I am building a cordova app which will communicate with a device using BLE in background using https://github.com/don/cordova-plugin-ble-central
Here are the challenges I am facing :
I want this app to be kind of a service to be used by another native app i.e communication between cordova and native app. I assume both apps need to be opened in background or one of them in foreground for this to work. Is it possible? How?
This cordova app will be a separate apk. But is it possible that it can be a part of native app so that user only have to install the native app without installing the cordova app separately?
Such app which continuously scans for Bluetooth Low Energy (BLE) peripherals is eventually be cleared by mobile OS to conserve battery. Is there any way to have it opened in background all the time. I know in android you can disable battery optimizations for a particular app. But what about IOS?
Is it maintainable across different platforms(both IOS and android)? Or native implementation will be a better choice?

Related

Android Wear Os using phone and watch app together

I want to make an application that can be controlled from the application on the phone at the same time with Android wear os. I would appreciate it if you could suggest a source or an example for this.
Android XYZTouristAttractions Sample is good place to start
This sample aims to be as close to a real world example of a mobile and Wear app combination as possible. It has a more refined design and also provides a practical example of how a mobile app would interact and communicate with its wear counterpart.

Display remote Android apps running in LXC to a smartphones

I’m currently working on a project where I want to be able to allow users to access Android apps without downloading.
Current setup using LXC containers
I’m doing this by running LXC containers with Android OS installed on a server (remote).
Desired goal
I’m unable to figure out how to remote display these apps (running on remote server, i.e. LXC containers) to client app (running on smartphones).
My main concern is to:
minimise latency and
allow normal apps as well as video and gaming apps to work
What I did (research)
I’ve researched VNC, Xpra etc. but can't figure out how to use it for reaching my goal.
Any help would be much appreciated.

Event Based react native background

Is it possible to implement an event based background service that runs when the app has been left? I am planning to use react-native and their implementation of geolocation. The device will be an Android Phone. It would be a plus if the same goals can be made available on iOS too. I have heard that iOS have strict guidelines of GPS running in background service when user has left the active app state.
EDIT: Further research shows that I may be able to implement this with cordova plugin. Although I have no experience with working with this plugin before.

Tizen Wearable background app

I am wondering if it is possible to run an tizen wearable app in background. I need to run an app in background. I am using several sensors and I need to save these data continuously.
another thing Can we get the sensor in Samsung Gear S2 data such as Heart Rate directly from an android app directly without any widget on the Gear S2.
I appreciate any help or suggestion.
Thanks,
I'm also new on this and I'm starting with Samsung Gear S2.
When I read your post, I thought I read somewhere that Gear S2 would only run web app, yet, I opened the Tizen IDE, used a sample native app, and installed it an ran on Gear S2, so, I would say that you probably can do it. I would just explore the native sample apps for start, you'll have to develop in c/c++ and as you might know, you'll need to instal the Tizen IDE and the Samsung Extension SDK (http://developer.samsung.com/technical-doc/view.do?v=T000000248)
hope it helps.
It wasn't possible in the first Tizen version that supported wearable (2.2) but became possible later (2.3) when native and hybrid apps were added to the wearable profile.
Not sure how running Android apps on Tizen is really implemented, but I'd expect the chances of Anrdoid apps getting access to device information (sensor and other) is fairly unlikely, as those come through Tizen-specific APIs with also Tizen-specific privilege requirements - the mapping would be complex, but who knows, someone may have managed it. You don't need a widget for that though, the same device information API (and more) is available through native apps.
Yes it is possible to create wearable background app but only with Tizen 2.3 & above and only in Native app versions not in Web apps.
If you want to build app in web version then u can write your service in native and UI in web app and make the app as hybrid app.
Follow the guide in link below to pack a hybrid app:
Tizen Hybrid App Packaging guide

create location tracking app for Android: native or phonegap?

We need to create an app, which works for time tracking of the employees as well as location tracking.
We only want to program it for Android, but we don't have any Android skills.
Therefore phonegap came as a great alternative.
But there are several questions, to which I can't find a clear answer in the web.
If the phone is in standby mode, can the phonegap-app still send position data? Would this still be phonegap standard or do I need to use plugins?
the smartphones will be very simple and cheap. Is there a higher risk, that the phonegap application gets closed by Android to free memory then for a native app?
Alltogether, could it be recommend to invest the time to learn Android or would it be better to stay at our language JS?
It’s perfectly feasible to write a location tracking application using phonegap and have it a) work in a performant manner on low spec android phones and b) keep the app running in the background when the phone is in standby mode.
To keep the app running in the background on android, it’s necessary to acquire a partial wakelock (see android powermanager). In phonegap, you need to use a plugin to achieve this. On the plus side, there’s an existing phonegap plugin to do this. The downside is that in order to use a custom plugin, you will not be able to use the convenient phonegap build method to build your app, so will need to do the manual process via the Eclipse IDE, but this is not a great hassle to set up (see here).
In terms of your app getting closed because of android running out of memory, and also having it perform responsively on cheap, low spec devices, this won’t be a problem so long as you are careful to write your javascript code in an optimal way. I’ve implemented a location tracking app using phonegap which uses custom maps and in testing on older android devices including HTC Desire and HTC Wildfire, performance was acceptable and the partial wakelock worked - I had no problems with the app getting closed because of lack of memory.
I chose phonegap over native because I’m a web developer so Javascript is more convenient for me than having to start from scratch with Java and the android SDK, and also because I was able to use the same JS code base with appropriate plugins to produce the same app for iOS. Phonegap is able to access GPS hardware on the device and in testing outside I found the average accuracy to be between 4 to 8 metres depending on the device.
Hope this helps!

Categories

Resources