Cross-mobile background service - mobile

The goal is to record and analyze GPS tracks:
For iOS and Android devices with GPS it is required to record/analyze in the same time
For other devices (tablet - desktop) it is enough to analyze previously recorded tracks (in the browser)
It is OK to have some platform-specific code, but I'd like to share "analyze" part between iOS, Android and Web AND to be able to run this code while iOS/Android app is backgrounded.
I have some "analyze" code written in JavaScript, so I started looking for options in this order:
1) Do everything in a web app
iOS Safari stops running JavaScript when backgrounded.
No luck.
2) Use PhoneGap or alike
JavaScript stops when backgrounded. It is proposed to write ALL service code as native plugin.
No luck.
3) Use Titanium
Spent two weeks only to find that Android Service implementation in Titanium is incomplete. It lacks startForeground(..), which is used to ask Android to not kill the service. Someone tried to implement native module for this, but reports that while service itself is running, JavaScript don't.
4) Use Marmalade for mobile and compile C++ to JavaScript for Web
Quick googling said C++ code can't be run from service
5) Use MoSync for mobile and compile C++ to JavaScript for Web
Quick googling said they do not support services. On the other hand I saw startForeground(..) in their sources, so maybe worth rechecking.
7) Write in C: native for iOS, JNI for Android, compile to JavaScript for Web
Haven't checked yet
6) Use Codename One for mobile and compile Java to JavaScript for Web
Haven't checked yet
And my questions:
Q1. Can you confirm for each above option if it can or can not be used for such an app
Q2. I specifically interested in Titanium (as already invested in it). I'm thinking of a native Android module with dummy Service that does nothing but asks Android to not kill its process where real Titanium service is running along side with an Activity.
Will it work?
Q3. Other options / general advice?
Thank you.

When we met the "super-duper" framework limitations I came with native knowledge: add a plugin for Phonegap learn how to link it, write for both platforms.
Titanium no experience, sorry. I don't think I would even open they page to read they hello word.
Back to your original task, just look again outside of your shoes ( as I would ask it and you should respond)
"The goal is to record and analyze GPS tracks:
I'd like to share "analyze" part between iOS, Android and Web AND to be able to run this code while iOS/Android app is backgrounded."
Suggestion 1: Just re-write the code in C / C++. Compile the .so Link with Android SDK / NDK and iOS.
Suggestion 2: "I have some "analyze" code written in JavaScript, so I started looking for options " Move the code to server side, where you will run a node.js and your existing code. Your apps will get a notification with result.
Suggestion 3: Write the real platform specific app finally and use the hardware + OS capabilities fully. The JavaScript purpose it is other then do hard maths.

Related

LabVIEW - mobile applications

As far as I am concerned and what I've already implemented there is a way to cooperate somehow with mobile apps such as sending some instructions between mobile and LabVIEW instruments but...
Is there any way to implement mobile application with LabVIEW ?
I suppose that officially not, but what about some external frameworks such as LabVIEW hacker toolkit ?
I've never seen anything that allows you to create native apps. The usual solutions other than data dashboard are using web technologies:
Write a html page that LabVIEW can host that can load on the mobile device and use http or websockets for communications. There are some toolkits to automate this for example LabSocket (though not sure how much mobile testing is done with it).
Remote viewing technologies. I saw one the other day called wezarp which works on mobile.
All of these depending on a Windows based application that you are talking too though. I'm afraid natively I don't think anything exists and would be very hard to implement as you would need to play with the LabVIEW compiler to cross-compile to objective-c, java or javascript.
There was a way: NI LabVIEW mobile module which worked for windows mobile. You would program an app in LabVIEW, compile it and load onto your Windows phone. I recollect it worked pretty stable. The solution is not recommended for new projects
For dashboard style panels, there is Data Dashboard for LabVIEW Android smartphone version allows you to view only. (tablet version allows you to exercise limited control options) Also available for iPhone.
Something available here for select devices only

Using IDTech UniPay Card Reader with Cordova/PhoneGap

After installing this plugin: https://github.com/TranWare/cordova-plugins which should work with this device: http://www.idtechproducts.com/products/mobile-readers/176.html
I am trying to use it but when I called it "IDTech is not defined" even I saw the plugin running on debug mode!
Are you developing for Android or iOS (or both)?
Looking at the source of this plugin, its Android only. Unfortunately, it looks like nobody has written a proper Cordova plugin for the IDTech card reader that supports both platforms :(
I did find another plugin, but this one is iOS only: https://github.com/deboorn/iMag-Cordova-Plugin. Maybe give that one a shot instead?
I should note I've not tried either of these plugins personally, but I am doing some research in adding support for this device in a Cordova app I've built and came across that plugin (and your post). Best of luck!

Porting an app developed with Android SDK to codenameone

How would one go about porting an app built with Android SDK to Codenameone? The objective is to port to multiple OS.
I suggest checking out the Android trail in the Codename One website http://codenameone.com/android.html generally you would need to rewrite your UI and networking code. Adapt to a smaller subset of Java functionality etc.
You could keep most of the business logic intact though. I would suggest starting with a GUI builder application and some of the How Do I? tutorials just to get the UI right then the rest should be easy.

Best program for making app for mobile (android, iphone and others)

i try for a few time now to make app for mobiles with appmobi XDK phoneGap XDK from appmobi, sencha and appcelerator but except iphone where the app works ok in android mobiles doesn't work well. Any other program except these or any tricks for make it work better in android and in others?
any help it will be very important
thanks
Actually i want to avoid that.I want to build for all mobiles together in the same time.That's why i used that programs. I don't known a lot of thinks and i am looking for a simple way to do that. I want a way which i can read about it on internet and i can find thinks because except jquery mobile i can't find for any other library. So did anyone known how i can find the best way that's my question.
thanks for your time and your answer.
Not sure why you're asking for a "program" and then referring to some technologies/tools (Appcelerator, PhoneGap, etc).
Anyways, I've been developing cross-platform mobile applications in the last few months using Appcelerator for almost everything. However, they technology you'll choose also depends on your needs.
There are three kinds of mobile development these days:
Native Mobile Development: Using Objective-C (language) + X-Code for iOS and Java (language) + Android SDK for Android, etc. You can always choose something like Appcelerator if you're targeting multiple platforms, as you mentioned earlier. Good for: Performance, Native capabilities (using the camera, for example). Recommended Tools: Titanium Appcelerator.
Mobile Web Development: If you have only web skills (HTML/CSS/JavaScript) you can always make your web application mobile-compatible, using tools like jQuery Mobile or Sencha Touch. Recommended Tools: jQuery Mobile, Sencha Touch.
Hybrid Mobile Development: Using web technologies for your application (you'll be loading a web page), but using a native application (a web wrapper) for making the application Native (and distributable) across the Play Market or AppStore. Recommended Tools: PhoneGap, Trigger.io, or you can even use Titanium Appcelerator and use a Web View Component
How you should take a decision?
Do you need native capabilities (use the camera, accelerometer, etc)? If you, you need to go either native or hybrid.
How many platforms do you plan to support? If it's only Android and iOS, then you can use either Appcelerator or make it native. If you're planning to support more platforms PhoneGap or a Web Application sounds more reliable.
Do you plan to deliver your application through the AppStore/Play Market? Then you need to make it native/hybrid.
Note/Recommendation: By reading your question I noticed that you're really confused on mobile and programming stuff. Before going so far, you should take some time in reading more about overall development.
Perhaps not exactly a program but what can be quite convinient(based on your application needs) is to make it a webapplication. Then you can use libraries such as Jquery mobile to adapt the website to the mobile platform as well as incorporate technologies only available on smartphones, such as swipe, orientationchange etc. Then you can make a simple Webviewer for androind and iphone which can be made seperately.
You can look at Kendo UI
kendo UI mobile have support for : iOS 3.0+, Android 2.0+ and BlackBerry touchscreen devices.
What i really liked about it is native-like UI experiences for end users automatically on same code base for different OS.
You can check demo , change OS using OS SIMULATOR MODE
I am not associated with Kendo.

Is it possible to make a silverlight program as a mac OSX app?

I have a silverlight application, now I want make it run as a mac OSX app, perhaps aiming to sell on app store. Since I'm completely a newbie in mac developing, is it possible to make this silverlight app run like a native app?
Maybe there is some way to make a browser shell, and embed that silverlight on a html to show it. is there any way make it more native without a browser control, and I want to disable the right click "silverlight" popup.
More over, since silverlight cannot access local file system directly, any good idea to do this? First came into my mind is put a webservice module in the app, so that this app acts both client(silverlight) and server, and then process the local file on server module.
The most you can do is have it run as a Silverlight Out Of Browser application (see a bit more detailed explanation here). This mode is pretty much like running in a chromeless browser, however it is still running in the same sandbox and you have very limited resource access.
Apps running this way will definitely not have the native OS/X app feel, neither will they be started similarly and you won't be able to sell it on the Apple App Store.
If you want to target Mac desktops and deliver a native experience I'm afraid currently Objective C or a framework on top of that is the only viable choice.

Resources