Reputation: 61
Where could someone get the code or guidelines to create a universal pedometer app for various phones? or would you have to create a different app for each phone? or could you just create an app for android & iphone?
How would a coder go about doing the task? where to look for help?
Upvotes: 2
Views: 1142
Reputation: 1660
Titanium Mobile does support Accelerometer.
For iPhone, there is an offical library in the framework that will detect steps, but it will only work from iOS7. Look here: /System/Library/Frameworks/CoreMotion.framework
Please be aware there are restrictions for what kind of Apps can run in the background on an iPhone.
Upvotes: 0
Reputation: 75296
Titanium Mobile is a cross-platform dev environment that lets you write apps in javascript that are then compiled into native apps for iPhone/iPad and Android. I haven't used it myself, but I've heard that it does not completely suck. I do not know whether it supports the accelerometers in these devices (which would be necessary for a pedometer app), but it probably does.
However, since you'd have to learn a bunch of new stuff just to use Titanium, it might make more sense to just pick a platform and spend your time learning to program it natively (Android has more marketshare now - maybe - so I'd recommend just learning that; Android is much easier to work with than iPhone).
Upvotes: 2