Phonegap android tablet application development - android

I have a very basic query related to phonegap and android tablet. I donot have the setup currently with me to verify.
I need to know if the development of Android phone and tablet using Phonegap differs, in term of build or any other thing which i should know before starting development

This question is not very descriptive, but I'll throw you a few tips for phonegap development on android:
Develop your layout using chrome/safari.
Make sure your layout is touch friendly and looks good at 320px, 480px, and 768px wide
Don't overdue it on mobile touch frameworks such as "sencha touch". Your app is guaranteed to not feel 100% like a native app and trying to make it feel more native by using one of these can actually have the opposite effect when users start noticing animations being sluggish or buttons and new screens not behaving as normal.
Find an android device to test on that's very mid-grade. Don't make the mistake of using a high end device to test on and seeing smooth javascript/css3 animations only to find out that on the majority of the devices, the android 'WebView' has pretty mediocre performance.
Honestly, it's really not that hard to make an application that has all of the functionality that phonegap offers as a native android app. There are plenty of codesamples and books to help you along the way, great resources (such as SO) to post questions or find answers on. I understand you may want to use phonegap for cross-platform compatibility but if you're looking for 'native feel' and cross-platform compatibility, you may want to look at appcelerator titanium instead. Yes, you'll have to learn their API - but you'll have to learn some of that with phonegap already (and you are still using javascript).

Related

Asp.NET Apple Android Windows8 phone GUI

I am thinking of developing a program within ASP.NET. But that I could port easily to Apple, Android and Windows phones and tablets. I also want the program to be able to run on PCs (MACĀ“s?).
This seems to be fine. However, the normal GUI of Windows does not look at all like the GUI from e.g. iOS or Android. And this would be a big show stopper. It should be at least optimized for touch mode. So all on screen widgets should be a bit bigger.
Are there libraries, providing controls, which looks like normal ones on the operating system? It would be best if this works kind of automatically. So the program should find out where it runs and load the standard GUI best fitting to the device, where it is being started.
I could of course develop own controls, but this may be a bit too much of effort.
It would also be very nice if the library would handle different screens or modes like portrait and landscape. So that it may switch depending on the orientation of the tablet, or phone for instance.
I am searching for something like that, which provides a good result, without the programmer needing too much to do by himself.
I also like if one can recommend a library he is using already by a bigger program. From my own experience, you get to know the strengh and weakness of such libraries with the time passing by.
Best Regards.
I already discovered some tools like PhoneGap, Sencha, Mono. I do not know, if these are well suited for me.
I like to create an app most likely for all plattforms at the same time. Is this the case with e.g. PhoneGap?
I am not familar with JavaScript, or CSS or HTML development.
I am an experienced C# programmer and I am quite familar with Java. So VisualStudio is my daily working environment, and I am using Eclipse also a lot.
Mono:
I only read about it and found out this aspects:
cost 999$ to use it in Visual Studio. Hope that this price includes development for all plattforms and not just one. Did not yet check this.
The coding looks very good.
There are APIs for Android, iOS, and Windows Phone to setup controls. So these parts needs to be rewritten for any supported application. One may create a core library, which can be used for all components. This aspect is not so nice.
However, I would prefer a solution, where the GUI is even described on another level. And then it should be brought to the current plattform automatically, if not specific libraries are used. So HTML5 may be more flexible.
Best Regards,
Patrick

Python for IOS or Android

I have been looking at the different packages for python on android and IOS as i am going to be upgrading my phone soon.
However, i dont know which OS to go with. For android they have the SL4A package, but for IOS they have their equivilent. However, im stuck on which to go for. Does anyone have any suggestions for this?
I know its kind of a stupid question, however im just getting into mobile development since they allowed scripting languages on the mobile platform.
The python support for Android is pretty good, but still under development. You can do things that a scripting language can but not the stuff that Python as a OO language can.
Example:- When you go through the api reference here, you can see that one can write scripts to do basic to complex tasks, but, in a restrictive way. You can never build full blown apps, and even if you do, it will always be slow because the SLA4 is just another layer on top of few other layers in the Android hierarchy. There have been a lot of fun stuff that has been done using Python scripting, example: http://www.wired.com/gadgetlab/2010/07/nexus-one-phone-rides-a-rocket-up-28000-feet/#ixzz0v7LFT7ay (A bit over-board and crazy, but awesome nonetheless.)
I don't have much experience on an IPhone to pass on such comments. But, an IPhone is expensive. You can always get a used Nexus phone and do all kinds of Python hacking/scripting. All depends on your budget and your need.
That is all.
I had been on the lookut for Python on iOS for sometime. About 2-months ago, one one released to the iTunes app store -- http://pythonforios.com/ and it is fantastic! It includes the complete set of Python 2.7.2 documentation -- which alone is worth the $3 price.
It's a bit of a challenge to code any serious apps (which I suspect is the result of the developer having to comply w/ Apple's app guidelines), but it is a perfect place to test ideas from a train or airport (when you are without a laptop).
1 caveat -- I've only tried it on an iPad. It could be a bit cramped screen real-estate on an iphone.
Pythonista is an excellent alternative for the iOS platform - here's a nice article on it. And this one details how you can achieve workflow automation on the iPAD.

Is there a technology which makes it possible to develop a game for Android, iOS and Web simultaneously?

As the topic states - is there any technology that would let me write code for a simple commercial 2D game which could be then compiled to work well on Android, iOS and Web browsers or at least two of them (e.g. Android and iOS)? There is so much buzz about cross-platform nowadays that I was wondering if I'm missing something.
My goal (set by my producer) is to make this game for all of these three platforms, and so far I planned to use:
- Web browsers: Adobe Flex,
- Android phones: Java (since my favourite C++ is recommended only for short snippets),
- iPad/iPhone/iPod: Objective-C (are there any alternatives?).
It pretty much means re-writing the same source code three times. Is there any way to speed it up by using a technology that would work on at least both of them?
However, I don't want to use Adobe Flex for all three (though it's possible), because it requires Adobe AIR (works only with Android 2.2 and higher) and not a lot of phones have it (it's totally different with browsers where 98% of people have Flash).
I don't mind adding some platform-specific code for each version, of course.
Also, if you have any suggestions about choosing a fancier technology for any of the platforms (maybe some nice frameworks?), I'd really appreciate that, too.
Take a look at Corona and Moai both are Lua-based frameworks for game development targeting multiple platforms.
I would like to say that Multimedia Fusion was capable of doing this, but it isn't quite ready yet. There are currently a number of runtime exporters for the product which allow you to export your game to multiple target platforms which include flash, java and iOS at the moment. XNA and Android exporters are currently in the works. I should probably mention that I am only affiliated with these guys as a happy consumer of their products. It is probably worth checking it out even if they can't do everything you want yet. If it's not suitable for your needs it is still a very good choice if you wish to rapidly prototype your application.
See:
http://www.clickteam.com
On a side note, personally I would recommend against going down the js+html5 route, particularly if you are targeting mobiles. I should probably stress that it's simply an opinion I have and that there are plenty of people here who will disagree with me. In all javascript games I have played, I have felt the garbage collector. The issue is that without control over garbage collection it is free to run when it feels like, causing infrequent but very obvious pauses in the middle of your game. You can work around this but I don't see why it should be that difficult. I can definitely align with the ideals of being able to write the thing once and run it on all platforms, but I can't see it working just yet.
To offer some advice assuming you find no suitable tools for the job, your aim is to maximise reusability. This means all of your games resources and levels should be well defined as independent resources. For non-critical logic you can make use of embeddable scripting languages such as Lua, which will maximise your code reuse. C (or C++) code will also be reusable on a lot of platforms, and might be a good choice if you are familiar and confident with the language.
I'm personally using Phonegap and Zepto.js. But you may have more luck with jQuery mobile. Phonegap is nice because its website will compile the apps for you.
1) If you write your game in C++ you can use it for iPhone & Android (NDK) as well. Preferably, you write your game engine in C++, than you can use a OS specific layer for UI stuff..
2) Implement your game in HTML & Javascript. iPhone/Android users will have to use a webbrowser to play your game. For iPhone, you can even create a launcher, that looks like an app, but actually is a webview with HTML & Javascript
Unity3D should be able to do this for you, if you purchase some extra sprite addins to handle 2D (like Ex2D or SM2 or Toolkit 2D). Also right now until Apr 8, the iOS and Android license is free.
Game Maker Studio. It has a package that let's you deploy on all of the platforms you outlined.
http://www.yoyogames.com/gamemaker/studio

How well does Unity 3d work for both Android and iPhone?

I'm not sure if this is the best place to ask this question so if it isn't please let me know and I will move it. I am looking to create a game for both Android and iPhone platform. I know Unity is a great game engine and my question is how well does it work for creating one code base to build for both Android and iPhone platforms? Time is a constraint on this project so I am very interested in how smoothly the process usually is when trying to build both applications and how much custom code must be written for each specific application. Any insite that people have on this topic would be much appreciated thanks.
Unity, as implied by it's very name, is designed explicitly to facilitate such multi-platform development in little time. You can for example define for each platform what the max size of each texture is, and it will automatically resize them for you when you build for that target platform - the build process really simple too. Since both your platforms are touch devices, it should be easy to have just one code base working seamlessly for both platforms (and more if needed), with very few custom code for each platform.
Unity has a no-questions-asked 30 day trial of the Android and (I think) iOS versions - I encourage you to try them and see for yourself how little time it will take you to have a proof of concept build for both platforms.

Should I use PhoneGap instead of ramping up on the Android SDK?

Although I am comfortable with Java, I have much more experience with web development. I am looking to get into programming simple Android games.
Should I just program everything using Javascript/HTML and forget ramping up on Java/Android SDK? I guess my question really is, what are the limitations of PhoneGap? What are some things to consider, etc.?
Some advantages I can think of:
More selection in terms of game engines for HTML5/JS
Faster ramp up time
Automatically deploy to all major platforms
The biggest pro for phonegap is that it takes advantage of your web development experience. I think what most people seem to miss (or ignore) is that there is no advantage in avoiding phonegap for an android only application! You can still write as much native code as you want to, mixing and matching phonegap as you please.
I am writing an Android app that uses text to speech. Because Phonegap doesn't support this in their API, you might think that Phonegap is a bad choice, but actually it was quite easy to call the Java code I need from javascript:
Java code:
public void onCreate(Bundle savedInstanceState) {
//boilerplate and TTS set up
...
this.appView.addJavascriptInterface(this.speak, "speak");
...
}
public void speak(String text) {
this.tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
}
Javascript code:
speak.say("hello world");
Pros for Phonegap:
deploys to all major mobile devices
sounds like it best fits your skillset
covers most available platform APIs with a uniform code base, no need to learn each one
PhoneGap Build (https://build.phonegap.com/) and Cordova (https://github.com/brianleroux/Cordova) are making it even easier to deploy to multiple platforms
Pros for Android:
Better performance
No limitations on which APIs you can use (i.e., video)
Defined toolset and workflow
native UI components
Fragments API and native layouts make handling different screen sizes easier
It really comes down to whether or not you want to be an Android-only developer or not. That first pro for phonegap is HUGE is you plan to develop for multiple platforms.
I personally have major concerns over PhoneGap apps performance compared to that of a native Android app. The admittedly small amount of testing that I have done makes the PhoneGap version feel very unresponsive compared to native. I don't see how this doesn't translate to a poor user experience. Even PhoneGaps packaged sample application runs poorly.
I was very excited at the possibilities that PhoneGap appeared to open up, but I don't feel like it's there yet. I don't feel comfortable committing to a large project on PhoneGap.
No WAY! Adobe has their cloud build which has a 9.5 MB file size limit. And, they are discontinuing support for other types of build.
I have just spent the past week or so developing a simple Android app using PhoneGap. My great hope was to be able to recommend this product for use in our department as a "write-once, deploy everywhere solution."
In practice, it was more complicated than I would have hoped. I did manage to get an Android version of the app done, but I found a lot of quirks in using basic stuff like getting it to include css and the jquery mobile framework. I kept thinking that this was just my learning curve but a lot of the tutorials I found online were outdated and didn't work in the version I downloaded. The biggest surprise was that you can't link to external documents without using a plugin such as childBrowser, which is a huge drawback.
I tried today to port my app over to iOS and could not get past step one with importing css. I couldn't find any support documentation on this basic step. It's frustrating because this is a simple app that I could craft as native in Xcode in a day or so. It looks like it will take me a lot longer using PhoneGap.
PhoneGap looks really promising, but at the moment I don't want to use it. It's just a question of time. Why would I want to take twice as long on something? It might be a better choice in future versions

Categories

Resources