开发者

Can we make a Flex-LAMP application work on Android

We have a need to port an application built to work on Flex, using php webservices and mysql database to run on Android - not connect to a hosted app using a browser, but to make it install and run directly on Android.

Has anyone does this before? Or do you think this is possible? Any hacks/workarounds/insane ideas you guys can give?!

EDIT: Thanks for some answers guys. Let me also give more clarity.

The application we are porting will be used mainly for tablets, and the stage size is already same as what we can use in tablet. Since flex is mainly used for display, a lot of our application code is built as PHP webservices, which talk to a MySQL backend.

Now we want this to be able to have data offline - the best way to do that in a netbook would be to just have LAMP stack installed and install everything offline, with a simple synchronization with the main database. On Android tablets though, at least now, there seems to be no way to install the entire stack. That's wher开发者_StackOverflow社区e we are trying for a workaround to get the app working on an android tablet without much rework.

Some changes like making it touch friendly can be done easily. But we do not want to take up extensive rework of redoing the application if it can be avoided. Any ideas?


Yes you can by using Air for Android. I explained on my blog how to do so using Flex and Ant. However, for it to be good for touch input, you should use the 4.5 SDK and you'll need to redo the UI to fit the new resolution and make it easier for touch.

You can keep the php/mysql stuff if you don't want to rewrite it, but you'll need to give access to the internet from the application in the manifest. You can even utilize Air's SQLite db on Android if you want to make some of the data available offline.


You can use WebView to display a Flex component that is bundled with app, though it's unlikely to work well if originally designed for PC screens and input methods.

In order for the app to "feel right" and blend in with other apps and system, you'll have to:

  • redesign user interface, considering:
    • Of the existing app, which bits of functionality actually make sense in mobile context?
    • What's the best way to implement them, keeping in mind limitations like screen size, possible absence of QWERTY keyboard, computing power etc.
    • What device-specific hardware features can be used to enhance UX (touchscreen, camera, accelerometers...)
  • Rewrite UI in Java, using Android's native UI widgets

In summary, for the app to feel native, it will pretty much need to be rewritten, not ported, IMHO. You can reuse graphics assets, interaction ideas, algorithms at general pseudo-code level, but not much of the actual existing code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜