开发者

Pedometer App for a phone

Where could someone get the code or guidelines to create a universal p开发者_如何学编程edometer 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?


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).


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜