Use PhoneGap + HTML5 and an Embedded Flash Movie - android

I wanted to know if it is possible to do the following:
Build a mobile app using HTML5, CSS, and JavaScript
Embed a Flash game (SWF) on one of the pages of the application
Wrap with PhoneGap, and deploy on Android an iOS
Keep the Flash game's functionality
I am considering doing this for an upcoming mobile project, and considering my options. I can build in all Flash, or I can build using HTML5 and just embed the Flash on one page. HTML5 would be much faster and cost-effective, and could accomplish what I need for the app's UI and everything else. The thing is that I need to incorporate this Flash game into the site. Will that mean that I have to build the entire application in Flash in order to accomplish this?
Thanks

Are you the last person on Earth to hear that Flash doesn't work on iOS?
Well, I have news for you: Flash doesn't work on iOS ;-)
You can use Adobe's CS5 tools to compile your Flash game as a native iOS app (which is probably your best bet if you're determined to go the Flash route) but you can't display a SWF on an iPhone, regardless of how it is embedded.
Embedding the SWF using PhoneGap may be a semi-viable solution on Android (at least for some handset models), but the performance is unlikely to be that great, and since Adobe have officially abandoned Flash on the mobile, making Flash games for Android is not a very future-proof strategy at this point.
You'd be better off trying to create your game using a pure HTML5 game development library such as ImpactJS - the tools are not quite as rich as what you get with Adobe, but the cross-platform support and future outlook is much better.
Here's a nice table of different cross-platform JS game engine solutions that somebody put together: https://github.com/bebraw/jswiki/wiki/Game-Engines

For simple animations You can also convert flash to HTML 5 (with Abobe tools , form google html5 convert dosen't ) and than put it in web view any platform Windows Phone, Win store.....
html 5 will work even without cordoba or phone gap

Related

Android Development - Include Flash?

I need to develop an app for a website. The problem is that on the site are Flash videos.
Is there a way to integrate the Flash in my Android app?
Thank you!
It's recommended that you don't as Android is phased out as mentioned. Depending on the complexity, it would be best to replace flash videos with HTML5 where possible.
If you insist on it however, it's possible as long as the user has the Flash plugin installed using a WebView:
How to Enable Flash Plugin in Webview?
Also note that the flash plugin is fairly limited - it has performance and sound sync issues and does not respond to clicks and key presses like the desktop version of flash does (Though oddly, the old Windows Mobile version was quite performant and had no key or mouse issues... huh)

Mobile app as3 vs html5

I'm making an app for Iphone and android. And I'm wondering what the pros and cons are for flashcs6 (as3) and for html 5.
I'm into flash so I have no idea about the possibilities with html5, some guy pointed me on the fact that developing apps for andriod and iphone might be easier to do with hmtl5...
So I'm wondering what you guys think about this..
Greetings,
Merijn
I looked into using HTML5 for a mobile project a few months ago and found that it isn't yet as mature as AS3. It wasn't horrible - if I had decided to stick with it, I'm sure I could have made a great app. The problem was that there was no compelling reason to choose HTML5 over AS3, so I stuck with what gave me the easier development time. In a year or two from now, I imagine that HTML5 mobile dev will be a lot more mature and easier to work with though.
I can't speak feature to feature as I was just looking into making a game which just required being able to render to the screen and no device APIs (accelerometer, camera etc.). Performance-wise, AIR seemed to win out but not by a huge margin.
For now, it would come down to whether you want to pick up HTML5 (certainly a good skill to learn) or whether you want to just deploy as soon as possible in which case I would go with AS3 (more mature tools, libraries, etc.).
Of course there is no "right" answer to this question, but an oppinion. HTML5 with JavaScript is looking promising in my oppinion. HTML5 is not yet "finished" but it is at least in parts implemented on newer mobile devices.
Check out ImpactJS for a demo of what you can do using HTML5 and JavaScript. Its a javascript game engine which shows that you can use this for IPhone and other smartphones. (As well as newer desctop browsers)
Here you can find information about which browser how much of the html5 standard supports allready.
There are also other options depending on the type of app you want to create. For instance jQuery mobile can be used if its a "simple".

Integrate WebGL in android app

I have android app which works fine. And now I want to add some graphical features using WebGL ,but I have not a lot of experience in 3d, especially in android. I need suggestion that how would be worked my android app (I mean performance) after integrating this new feature?
And also I'd like to know in my app can I use "WebGL code", which works fine for pc browsers?
Your question is a little unclear. It sounds to me as if you have a native Android app that you want to add 3D content to. If so, WebGL is maybe not your best bet.
WebGL is a interface to OpenGL that works through a web browser, coded with Javascript. While you can convince some mobile devices to work with it, it's typically not available through most mobile web browsers. That may change in the near future, but it's anyone's guess as to exactly when. Point being, WebGL is not a viable target for phones right now.
If you have a native Android app though (coded with Java), you can access OpenGL ES 2.0. Capability wise it's identical to WebGL, but you can access it through the platforms native language, which will typically lead to better performance. If you have a WebGL app, it should be pretty straightforward to port to Android since the APIs are largely equivalent.
If you want to start using OpenGL in your Android app, the documentation is here.
Chrome experiments now have a section for mobile https://www.chromeexperiments.com/mobile.
Though you can play wide range of webGL examples in android chrome browser by enabling webgl as shown in pic below :-
This way you would be able to use webgl in chrome browser :-
Unfortunately old WebView does not support webGL but WebView V36 does have webGL support . You can openGL for similar purpose.

How to create a Webapp for iOS, Android, BBerry, Symbian

The Challenge
I would like to create a simple website for:
iPhone 3 and 4
iPad
Android 2.2
– BBerry OS 7 and Playbook Browser
Symbian
Desktop Webbrowser
The Problem
Whats the "best-practice" for detect, optimize and deliver the Webapp for each device/screensitze? I know this is about HTML5, CSS3 Mediaqueries and JS. HTML5 Boilerplate is a good point to start.
But:
Should I detect Browser/Devices via backend/front? What are good
libraries?
How Do I detect different screensizes? What are good libraries?
etc.
Use Phone Gap as your starting point.
Depending on your use case, there may be other libraries you may want to pile on top of it, but basically Phone Gap is what you should start with.
My suggestion would be to use Sencha Touch. Its a very mature mobile app frame work with a very active community. They support any mobile that uses the webkit based browser which is everything on your list(Im not sure about the symbian browser).
Sencha 2 which will be released by the end of october will have its own native packaging library, so the use of phonegap wont be required. But it work well with phone gap if preferred.
Mobl is new language for the mobile web. just a look on it.
Adobe's Edge is the most refined HTML5 creator that also supports Android, iOS and Playbook (IMHO forget about Symbian, that's Nokia's half dead platform). BB7 uses webkit like most other desktop and mobile browsers.
Note that coincidentally Phonegap (that I see in other answers here) is part of Adobe now.
You can give a try to Titanium's new web SDK too.
And then look at this SO question which is very similar to yours and has lots of useful links in it.

Using Adobe AIR to develop Android mobile applications

Can anyone give a comparative information between developing Android mobile applications using Eclipse SDK and Adobe AIR?
Kindly share your opinion, anyone who has already having any experience on developing Android mobile applications using Adobe AIR.
I have gone through articles on developing Adobe AIR but wanted to know if anyone found it useful. I am aware that Android mobile applications developed using Adobe AIR is supported for Android 2.1 and 2.2.
Thanks in advance.
I will do my best to answer your question, though it's a little broad (if you could provide specifics on the information you need, I'd be happy to add more detail).
Firstly, there's a ton of information both from Adobe and from the Flash/Flex community on developing for AIR for Android. You can develop for AIR for Android using Flash and the Flash IDE or using Flex and the Flash Builder IDE currently in public preview on Adobe Labs (you can do straight ActionScript as well if you like).
One of the benefits of using AIR is that you can leverage your existing skillset in Flash/Flex/ActionScript rather than having to learn a new language. Another benefit is that yu can reuse code for existing Flash/Flex/AIR applications you may have built. Another benefit, and the one Sheikh mentions above is that Adobe is working on making AIR a cross-platform mobile runtime. If you search you will already find articles from Adobe and the community about people running AIR applications on the Playbook (the simulator anyway, since the device isn't released yet) and even using the preview Packager for iPhone to compile their applications to iPhone.
Although I haven't worked with AIR, but what I feel AIR is for, is cross compatibility.
Its like you're not building for Android, you're building for AIR. and since Android supports AIR, your applications will run on Android device.
In future more Mobile OS will start supporting AIR, so if you code an app for AIR, there will be a huge possibility that your same code runs on different platforms like Android, Windows Phone 7, iPhone (perhaps :-P). Thus, it will be saving a lot of coding effort for coders.
I have discovered that the cross-platform compatibility for AIR applications is quite good except for a few caveats:
1) User input boxes. They are generally not handled well in AIR applications. The popup keyboard can hide the input box, which it generally does not do with native JAVA apps for Android.
2) Real-time games. AIR for Mobile is SLOW. You may be disappointed if you try to develop any sort of real-time software.
3) Socket communication. This is my current peeve. I created a simple chat application in Flash and did some speed tests. This is in preparation for creating multi-player games for mobile devices. On the PC, the application can run over 200 messages per second to the server and get responses. On the AIR for Mobile, both on the iPhone and Android, it is about 11 messages per second max - and the app is doing nothing BUT sending and receiving the data strings. Add a layer of game play and the speed limitations could be crippling. This means real-time games may suffer if you need faster communications. It's plenty fast enough for turn-based or games that don't require lots of updates.
Basically, the cross-platform compatibility is nice. Just think about whether your particular project might be harmed by the speed issues as well as potentially poor handling of user input boxes. Do some testing.

Categories

Resources