Android flash vs Java - java

I've been thinkin about games on android and was thinking - isn't it EASIER to make a game in flash than in android using Java with android SDK ? I've only experience with Flash/AS3 and it's quite easy to create user interface, animations, layout and to write scripts.
As of Flash CS3 there are motion detection objects, so we can create really interactive games.
However I've not seen any flash game related for a phone( I mean with orientation and so ). Is there something I am missing like flash too slow on a android enabled phone?
This applies to applications too. I would like to hear opinions about Flash vs Android :)

you can create game in flash and adobe air will convert it in apk. adobeAir is version where you can create any game and just 2 or 3 step that convert it in apk.so you can publish it or play it in your android phone

Flash is not supported on Android 2.1 and lower, and some manufacturers no longer provide software updates for their older devices. I think Flash will also probably be slower (which may not be an issue if your game isn't very computation/graphics heavy) and consume more battery. It also doesn't take advantage of multi-core processors right now, but that may change in the future.
On the other hand, if you write your game in Java for Android, you will be limited to one platform.
As a compromise, you could try something like Haxe, which allows you to compile your code into flash, Java and C++, among others.

Related

Emulating Android Drone Control App On Windows

I recently purchased a Yuneec Breeze quad-copter drone that uses an Android and iOS app with its own WiFi connection as a controller.
I am looking to write a Java application that performs the functions of the Android app with Game Controller support (the Breeze Cam app uses the touchscreen which means my big thumbs cover the streaming video) but am running into a roadblock.
While being proficient in Java, including network functions, I find myself woefully uninformed as to how to capture and read the network traffic between my phone and my drone. Its simply a skill I never needed until now.
Any place to help me get started?
OR -
Since I'm writing this in Java would de-compiling and hacking away at the Android source be a more viable option?
If so what decompilers are recommended?
In my experience these apps tend to be written in proprietary code. Android may be an open-source project, but the apps written for it don't have to be. It's unlikely you'll be able to write your own code to control the drone unless Yuneec provides an API/SDK to do so.
A quick Google search yields this thread on their forums: https://yuneecpilots.com/threads/api-sdk.745/
It's not much info, but it looks like you're SOL. Sorry.

How to convert Tasker app to native app?

Using Tasker for Android (link: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and a widget-composing tool, Zooper (link: https://play.google.com/store/apps/details?id=org.zooper.zwpro ) I have automated my Android phone to automatically register certain data whenever the phone enters or leaves certain WLAN-covered areas or connects/disconnects to certain BlueTooth devices.
The registered data is kept in simple Tasker-variables and a widget simply displays (some of) the contents of those variables to the user - it is really that simple.
Together this system works like an ever running background application with an always-updated (simple) user interface (the widget).
I am so happy with what this system does that I now want to convert the whole thing into a real, yet very tiny Android app that can be download and installed from Google Play.
However, I never developed an Android app before (and not an IOS app either!). But being a professional C# developer (and former C++ developer) for Windows desktop applications and Windows services for many years now, I feel confident that I can also learn how to make such a simple Android app, even if it involves programming languages with which I’m not so confident by now (Java for example).
What I need is a few directions to get me started the right way:
Which tools do I need for making such a simple app?
Can it be done in Visual Studio, or do I need to use Eclipse or
Xamarin?
Can it be done in C# or must it be done in Java?
Do I need to buy licenses for development tools (other than Visual
Studio) or can it be done with free software?
How would you go about the whole thing?
Any input will be much appreciated!

What's the right approach for creating an Android app?

I have a great idea for an Android app, but as I'm only familiar with php/js, I'm uncertain of which approach I should choose for creating it. The app will be based on a google map with a lot of position markers. There won't be any fancy animations or other heavy resource-demanding activities.
As I see it there are three different options:
Read up on Java and program the whole thing in Java
Create the map activity in Java as a mapview and then use webviews for the other activities (which can easily be scripted as html5 webpages.)
Script everything as a webapp (not really an option, as this is not a real mobile app imho.
I'm most keen on using no. 2 as I'm quite familiar with html/php/js/mysql. Have to read up on the html5 specifics, though. Questions:
I need access to GPS and camera hardware. Is that acheivable in webviews?
How complicated is it to pass variables between js in webview activities and java in other activities?
How big a difference in performance can I expect if I use option 1 vs option 2?
Other thoughts?
Kind regards,
Anders
You can choose number 2, but as we are talking about an android phone, you might want to get really accurate coordinates for your map, and you can only achieve this by accessing your phone GPS, through webviews the best you can get is the location trought the device internet IP adress, wich doesnt lead to a very accurate geo position.
The best choice is a 100% java application in my opinion.
1) Yes it's possible, but as commented it will be less accurate and probably slow.
2) Not complicated. Painful if you need loads of interaction between a webview and native app. Using a Javascript Interface that can be set up from the native app. You can basically inject javascript in a webview's html.
3) Heterogeneity of performance depending on device. Because your implementation will be based on the device's browser you can expect to get really sluggish behavior for older devices. Anything to do with HTML events (Dragging, Tabbing...) will have a knock on most devices, from my experience.
4) As #vodich comments there are other party frameworks. My benchmarking on PhoneGap and other js-based options is that they're a waste of time if you are looking at developing a professional app. I haven't developed on Adobe AIR but find a pain the need to be installing plugins to get native functionality (access to sensors, camera, etc) Mobile is all about fast, responsive behaviour. HDI is your finger, user is fast, so app needs to be fast.
EDIT: So hell yeah! Java FTW!
Albert.
4.Other toughts?
Yes, if you really want to make a great Android app, you should be using only Android and specific Android UI components, and give it a native look and feel. And regarding 1,2 yes it is possible, I would say not so complicated to just integrate them, but I think you'll eventually get in big problems.
Learn Java and write your application natively.
Webviews might allow you to use your php skills to present something to the user, but it's entirely one-way - you'll not be able to interact with what's inside.
The Android developer site offers fantastic documentation and jumping from PHP to Java isn't greatly difficult, though you'll need to get used to strict typing and "real" OOP.
Other thoughts? Don't go down the PhoneGap/Cross platform toolkit road - it might allow you to write applications for multiple platforms and using your current skills, but in the end you get a subpar app that doesn't feel right on either platform and doesn't fair well as future versions of iOS and Android are released.

Building a music visualiser

I am interested in building a music visualiser using fractal patterns for my final year project. I have googled quite a lot on it and I know a bit about fractals, however I was wondering what software would be used to 'animate' the graphics.
I know Java has a drawing API (AWT and Swing), but it's probably not the best for the animation factor. On the other hand there is also Flash that has new capabilities within as3 to produce such an effect, but if this app was to traverse into mobile development Flash wouldn't be a great choice. So there still exists a gray patch in my head regarding actual app development. Can anyone give me a head's up on where to start looking?
I would suggest that you first define what it is you want to build and then choose the best technology for the task. For audio visualization you will most likely be using some kind of Fourier data. This and the fractal math concepts should translate across programming languages well.
I will often build prototypes in ActionScript or Python just to understand the fundamentals of new topics. Once I have an understanding of the concepts and know the target platform, the prototypes are usually very helpful and sometimes can be easily ported over.
As for quickly prototyping audio visualizations you could use Processing ( java based ), openFrameworks ( c++ ), Cinder ( c++ ) or Flash.
Each of these technologies are cross-platform, allow you to read audio data in realtime, quickly create windows and provide easy to use drawing APIs.
Also, it sounds like you are thinking about mobile. I believe that both Cinder and openFrameworks can be used for iPhone development. As well, AS3 can be compiled into an AIR app which will run on the Android platform. Performance of Flash on Android devices varies greatly from device to device though.

The best way to play swf-files (flash) in my android-program?

I have to play flash (swf) in my program when the user clicks on a link. Which is best? Concentrate on android 2.2 and use the Adobe Flash Player, or what do you recommend? I have tested WebView, but can not play swf in the emulator. HTC has a custom flash player but it feel like a limitation.
Some code samples to play swf in android that works for as many users as possible?
Have you considered using Flash to create an AIR app for Android rather than using Java? If you have to download and run external swf files, this seems like a path of least resistance to me. Of course, this requires learning ActionScript, but it's not difficult if you know Java.
It's hard for me to give you a solid recommendation, much like toggy-tog-togs answer. B/c we don't know exactly how many swfs or what kind of swfs you are playing.
I mean, if your application is pretty much just playing swf's and you need a UI to run it, it might be worth looking at Air and Flex.
However, to address that first problem you had. I haven't tested it myself, but I am nearly 100% certain, that your emulator won't play flash content in a webview b/c you don't have flash player installed on the emulators. :-) Android supports Flash content but only after you download and install the player from the App store.
So you might want to try running your emulator and installing the Flash player app. I don't even know if that is possible but you ought to try it out. :-)
By the way, the Android emulator is trash, if you are serious about developing for the Android platform, you really have to pick up a device or two to debug on.
Good luck!
So your using JAVA if you are then it is best to open up the browser that is the easiest but if you are wanting to use it in the application (This is less loading time if it is included in the package) but it costs try using JFlashPlayer (It Costs For the full version) http://www.jpackages.com/jflashplayer/download/ This runs very fast on the android platform. Hope I could help.

Categories

Resources