Android: using flex for android - android

I am planning to build android applications using adobe flex. But as per my knowledge we dont need to use android sdk for this purpose. I have created hello world app using flex,It is completely different from creating apps using android sdk. Is there any way to use flex widgets with android sdk(I mean instead of using android UI widgets can I use flex widgets) .please help me

The quick answer is no, Air apps don't have that native capability.
However there is a way to get around some limitations.
James Ward wrote a great post about it.
http://www.jamesward.com/2011/05/11/extending-air-for-android/

I think you need to subclass View for each "page" of your Android app. But beyond that, you probably don't have to use the lightweight, performant mobile versions of things like buttons if you don't mind having an app that is not lightweight and performant.

Related

How can I add a native Android action bar to my Air Mobile app?

I have an Air mobile language learning app on the Google Play store that I'm happy with. It performs at 60fps and does what I need it to do.
I plan on adding more language packs and was wondering if I could use a native slide-out tray and action bar.
I have no idea if I can add any native android UI elements to an air mobile app. Does anyone have experience doing this?
you'd need a native extension to interact with OS related items. checked out this yet? http://help.adobe.com/en_US/air/build/WS597e5dadb9cc1e0253f7d2fc1311b491071-8000.html
This is technically possible using an ANE, though this is not what ANEs are meant for. ANEs are meant to give you access to native APIs, not native GUI elements. You should refrain from mixing AIR and native GUI elements. If you want to use native elements, you should switch to using native code.
If using native code is not something you wish to do, you can write your own implementation. The GUI structure is not difficult to mimic and AS3 offers a multitude of MouseEvents and TouchEvents that would allow you to properly write an AIR version of that GUI element (I've done so in the past, actually).
Another option is to use Flex or Starling or another GUI framework that offers a pre-built component for this. If you are not already using one, however, it will require you re-build your entire app.

Android UI framework

I have some issues in working with Android layouts and make them adapt for all screen sizes..
I have found that there is an alternative solution : Android Bootstrap http://www.androidbootstrap.com/ for that and provide nice UI components (buttons etc...).
Since I'm developing natively, is this kind of frameworks won't make the App runs slower ?
Is this only a UI framework like for the web (Bootstrap from twitter) ? if not, can we use with it everything in Android (Camera, micro etc...) and Can we include some Jars like Zbar ?
Thank you.
I have found that there is an alternative solution : Android Bootstrap
It is not an "alternative solution". You still will need to be "working with Android layouts and make them adapt for all screen sizes", because Android Bootstrap does not change much related to that.
and provide nice UI components (buttons etc...)
It uses the same Android widget set that all other Android apps use.
is this kind of frameworks won't make the App runs slower ?
There is nothing in an Android Bootstrap project that would necessarily make the app significantly slower.
Is this only a UI framework like for the web (Bootstrap from twitter) ?
It is not even that. It is a starter project that demonstrates how to tie together a dozen or so open source libraries for Android app development. You can think of it as an extended version of the templates used to create new applications and activities in Eclipse or Android Studio.
This is not to say that Android Bootstrap is bad -- far from it. However, it does not resemble your description.
can we use with it everything in Android (Camera, micro etc...)
I have no idea what "micro" is with respect to Android. Since you are writing an Android application, just like any other Android application, you can use it with whatever parts of Android you choose to.
Can we include some Jars like Zbar ?
I see no reason why not.
It is very common for such templating engines not to have exactly most components you need. for android it is basicallly about adding support third party libraries to get the exact experience you need.
Thus you may want to consider adding more or lacking parts by leveraging some external libraries like those from HERE

Developing UI for Android

I am planning to develop an Android based mobile for my Human Computer Interaction based project. I am looking for a UI designing application for Android platform. Can it be achieved with Eclipse or is there a better way of developing UI for Android applications that could be used directly with coding ?
Thanks,
Manoj
You can directly code your UI too if you want to. It just takes long, and you open a window for errors.
Developing UI with eclipse using XML is great and easy, why don't you want to use it?
If by UI you mean "not-the-basic-UI", then it's possible too with eclipse - if you want a customized view then you code it, and if you want the normal UI views to look differently, theres a way to do that too (I'm pretty sure you can set your own pictures for button-state-pressed, button-state-selected and so on...)
You need to be more specific with what you want to do.
Use java EE eclipse with (Android Development Tools) plug-in. Upgrade the android SDK in eclipse.
Eclipse has an extension called ADT (Android Development Tools).
Hope you have installed it. Here is the link for installing Android in Eclipse.
Eclipse provides the help for design the UI for android. It is just drag and drop.
Hope this helps
Eclipse has a builtin GUI builder that is fairly good, there is also DroidDraw, which may be slightly easier to use. I would recommend using Eclipse's builder myself, both are somewhat limited without hand-coding XML really.
Quick side note: Be sure NOT to use AbsoluteLayout, as I have seen a few people starting out with Android programming fall into the pitfall of thinking it will make GUI design easier. Issues will arise very quickly.

Upgrading and existing flex application using the mx library to work on Android

I am trying to make my flex app work on Android, and that involves making an AIR app to run on Android. Seeing as the flex app needs the mic, an AIR app is required. I am using flash builder 4.5 on win7 with air 2.6. The trouble seems to be that most of it is now not available. For example mx.containers is there, but not mx.containers.viewStack. I notice that there are obvious equivalents in spark for some components but not others.
VBox, HBox, Canvas VDividedBox, AdvancedDataGrid and associated custom renderers are the components my application uses the most.
What is the fastest way to make this work on Android, I am under time pressure. Is there a site somewhere that recommends the best way to do this, and what components can be replaced with which?
(This is my first time posting here, but I have a good reputation on vworker:
http://www.vworker.com/RentACoder/DotNet/SoftwareBuyers/ShowBuyerInfo.aspx?lngAuthorId=6446927)
Thanks
Thor
It sounds like you need to read the Full Adobe Manual for Flex 4.5. Much of it will be review and you can breeze through that, but you'll want to learn about the Spark components and the spark architecture.
To draw a direct parallel to your specific components you need:
A Canvas is, generally, replaced by a Group.
a VBox is replaced with a VGroup. Or you can use a Group with a VerticalLayout.
An HBox is replaced with an HGroup. Or you can use a Group with a HorizontalLayout.
There is no Spark version of a ViewStack. In Mobile Applications you'd probably use the view class and ViewNavigator to accomplish something similar
I'm not sure of a VDividedBox; nor AdvancedDataGrid replacement.
Since you wan to build an Android app, next you're going to want to read this Adobe manual. To get acceptable performance out of AIR for Android, you are probably going to have to rewrite an MX heavy project from scratch.
This is not a project I'd want to partake with tight time constraints; so I wish you best of luck.

How to write android code in titanium

I had been working on android since a little long. Now I am wondering about titanium. Is it possible to write android (java) code in titanium app since the app is build in titanium? If yes then how? Actually I am having problem dealing with push notification for android in titanium. So I got a solution to build complete app in titanium and then if possible use android code in app to deal with push notification. How? Please do response as quickly as possible. Thanks in advance.
To answer your question directly, you will need to develop a native Android extension to call Java code via JavaScript in a Titanium application.
Rai
You should be checking out the docs Here tells you all you need to know
Hope it helps
Frank
yes it is possible but remember that the titanium tools lag behind the official android ones. Documentation is poor and often wrong, code is laggy and the resulting .apk are much bigger.
Why are you thinking of using Titanium? For cross-compatibility?
If you are thinking about that you have multiple possible ways:
1) Build a minimum common denominator, like titanium, but better: Write a core application for both android and iPhone so that it will be fast and light on memory, with a modified broswer to show your content. This way the interfaces will be much easier and you'll have to write the content just once.
Still you will be able to access low level hardware, like GPS, compass, gyroscope.... easily without consuming too much battery (unlike with titanium) as needed.
2) Find an existing minimum common denominator: Javascript work both on iPhone and Android.
3) There are many other options (Adobe air, python, custom scripting, mobile web site, ...) but I think that the cons outweigh greatly the pros.

Categories

Resources