Android Game on javascript - javascript

I want to create a truth or dare game for android. I am actually thinking about a UI which will have a bottle which can be rotate when user allow it to.
my question is can i do it in android javascript ?
because i know js little bit and there might be some code available online related to my work.
any suggestion or code related will be appreciated
Thanks
Also can i use javascript libraries like jquery on android ?

using phonegap for developing might help you with your project. and yes phonegap does support jquery for android development.

Related

Anyone have a custom webview implementation with flash i can use?

I know later versions of android webview don't have this ability. However, I know the pidgeon browser has its own implementation that allows flash to run.
I have been searching for a while and have not found much, but, does anyone know of a good AS3 and AS2 interpreter in javascript or a custom webview implementation that I can include in my app?
I was using phonegap, but I can do it in android studio if I could just find a good webview implementation with flash..
BTW working with the clubpenguinrewritten team to get a mobile app working while we rewrite the client.
EDIT: i tried with interpreting with swf2js.js but sadly it's as3 support is a little sad...

How to get Device Information Using HTML5 Javascript & Phonegap

I'm developing a cross-platform mobile application using HTML5 Javascript & Phonegap. It's supposed to be an application which can display the Device Information and RAM & CPU status (using & free RAM CPU, name, size,...).
But I can find any API which can get the status of CPU&RAM. I'm just a beginner in Mobile HTML5&JavaScript. So, if you guys know anything that can help, please tell me. I'll be very appriciated.
Thank you!
In a plain web app you don't have access to this information. But since you mentioned Phonegap in your question, you can get basic device info using this:
http://docs.phonegap.com/en/3.0.0/cordova_device_device.model.md.html#device.model
There are also 2 cordova plugins which you can look into. Neither has iOS support at the time of this writing.
http://plugins.cordova.io/#/package/com.ankamagames.plugins.sysinfo
http://plugins.cordova.io/#/package/org.chromium.system.memory
You may want to look at Chrome packaged apps and the chrome.* apis for cross platform and mobile development here https://developer.chrome.com/apps/about_apps
Although I never worked on such area. But what I can suggest is- You will need to write android native plugin to achieve the same.
I think there should be android api to read memoryinfo and cpuinfo file if not you can directly read /proc/cpuinfo and /proc/memoryinfo to get ram and cpu related information.
Hope it will give you some insight. Below is the link of related question -
Android How do you get total memory RAM in the device?

Plugin for UPS Barcode for jqMobi

I am need of a plugin for a web based app using appMobi with jqMobi as the framework. I need to be able to read UPC codes while do a barcode scan. I can get it work flawlessly with Android, but am not able to use my current code to work with IOS. Does anyone know of a plugin for appMobi, jqMobi, or a way in java-script to get this work?
I have researched a great deal and have came across a few suggestions of implementing another barcode app from the App Store like pic2shop, but can not seem to get it work. Just wondering if anyone has successively created a plugin for jqMobi would be great? Thanks for any help.
appMobi has an API for that, see:
http://www.appmobi.com/documentation/jsAPI/device/scanBarcode/index.html

How do I leverage my knowledge of Html/JS/CSS for iOs, Android, etc?

Is it possible to create responsive, mobile-style apps without coding directly for iOS or Android with the same html/js/css stack that is used for major browsers?
Have a look at these books, they really helped me get started with developing for mobile using web technologies:
Building Android Apps with HTML, CSS, and JavaScript
Building iPhone Apps with HTML, CSS, and JavaScript
As others have said you can make a web app styled for mobile. There are some nice framworks to help you with styling and things like nice animated swipes etc. I would recommend looking at jQuery Mobile and Sencha Touch.
For sencha there is a list of getting started resources in my answer to another stackoverflow question here.
If you you want to make your web app native (and have access to features like the camera and accelerometer) I would recommend PhoneGap, but there are other frameworks already mentioned like Titanium.
Phonegap can be used along with Sencha Touch or jQueryMobile and has lots of resources to help get you started e.g. the API docs and getting started guide (check out the phonegap website for others)
Hope that helps!!
Yeah, it's called Web App.
You're probably goin to use some touch/mobile library like jQuery Mobile or Sencha Touch to make the user interaction easier and fancy.
You don't need to code on C/Java to put out someting great for mobiles. ;)
On top of that you can also use PhoneGap to create the complete "native" look and feel, without writing any code in Java/Objective-C.
#Jason if you have Good Knowledge in java scrip then i prefer to you to start with Appcelerator Titanium Click Here Link For and Link two This will good For Developing Application for iphone and android platform .There are lot Tutorial you can find for both android and iphone.

iphone web page transitions

I am developing a web page for iPhones and iPod Touch's. I am using the Universal iPhone UI framework. I need to have silding page transitions, but can't seem to get it working. Is there a good javascript framework I could use that would make this easier? I've done a lot of normal web dev with jquery, but it doesn't seem to like the iPhone.
Try http://code.google.com/p/iui/
It's a nice little JS framework, among other things, that will help you with the transition aspect. Have a flick through the documentation too, as it'll give you quite a few additional options as well.
Regardless of what framework you're using, the WebKit CSS trasitions are extensions of CSS and were developed with the iPhone and iPhone web-based apps in mind. You can do some very clever, complex animations with no JavaScript and only a few lines of CSS.
Here's what Google finds on the subject.
Try the following frameworks.
Jo
Sencha Touch
jQuery Mobile
These are for serving Web based mobile sites, they can then in turn be made into Apps for Android or iOS using PhoneGap
Of the 3, Sencha is the more mature project and has the most things out of the box. Jo looks very promising and would probably directly compete with Sencha. jQuery mobile is very interesting but just far to early to do any production code with it, too rough around the edges. jQuery mobile takes a different approach to the others as it is html based and it interperates the attributes on tags to turn things into tableviews or menus.
jQuery mobile is quicker to hack together and get your head around, where the other two take a little bit more thinking. But once you figure them out its easy enough.
If you don't want to serve the site via a url at all and want to just build an app then Appcelerator is the way to go. You write code in JS and it makes native Android or iOS apps for you. You will get access to pretty much the full Android/iOS api.
I have coded with appcelerator, however I am no longer going to use it and use one of the above frameworks, probably Sencha for just now. I can get access to the device native apis via PhoneGap and for simpler apps give a great experience cross device via a url.
Reference
Apple's Dashcode IDE has an extensive set of page transition templates for the iPhone. You should be able to fire up a quick project, get the look you want, then export the resulting HTML/CSS/Javascript into your favorite IDE.
The only catch is that it's OSX only.
I've been deep into an iPhone web app project lately. We evaluated iUI, but decided against it for various reasons. Consequently, I've developed most of the same functionality from scratch. While I can't share the code from the actual product (as I'm under NDA), I have been documenting many of the techniques I've used to do certain things. Check out the links below:
http://segdeha.com/e/css-transitions/
http://segdeha.com/blog/2009/07/19/stupid-webkit-tricks

Categories