5 ms·
Python, JRuby on the Android Platform in 10 Steps
- shirtless_coder 16y agoYeah but how feasible is it to actually distribute an app on the market with this bundled in? Can that even be done?
- jefe78 16y agoIts feasible and can certainly be done! http://code.google.com/p/android-scripting/wiki/SharingScripts#Scripts_as_APK http://code.google.com/p/android-scripting/wiki/SharingScrip... Enjoy! I know we'll be using this soon.
- noodle 16y agoif you do, could you write up a post about it somewhere and share? i'm not doing android dev, but making python viable really makes me want to try, and i'd be curious to hear more.
- th0ma5 16y agoi haven't seen any word from anyone distributing everything together. most conversation is around an app that would need python (and probably even SL4A) installed separately and manually by the end user.
- technomancy 16y agoI'm skeptical towards the ASE approach; Tim Bray's post on the subject has a good overview of the challenges inherent in getting nicer languages working for Android apps: http://www.tbray.org/ongoing/When/201x/2010/07/28/Ruby-and-Python-on-Android http://www.tbray.org/ongoing/When/201x/2010/07/28/Ruby-and-P... My money is on Mirah, a new fast, lightweight JVM language that feels like Ruby but compiles to identical-to-Java bytecode: https://github.com/mirah/pindah https://github.com/mirah/pindah I don't think shoehorning existing runtimes is a suitable long-term approach.
- deleted 16y ago[deleted]
- cageface 16y agoAgreed. Something like Mirah, designed to run the the Java ecosystem from the ground up, makes more sense and brings along far less baggage. You lose the Python libraries if you go this route but I suspect you're mostly just going to be gluing together bits of the Android APIs anyway so it's less of a loss.
- ddkrone 16y agoI am currently pulling my hair out just trying to get various activities to send stuff between each other. Doing this stuff in Javascript is so much easier with JSON and it's too bad there is no JSON equivalent for Java and the static typing doesn't help matters either so I can't wait until there is another option other than Java for writing applications.
- th0ma5 16y agoactually there's a JSON library with the Android SDK ... check out this great document that describes a bare bones webview based android development path, sort of like phonegap but with thinner gloves: http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidWebView.pdf http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidWebVi...
- cageface 16y agoIt's funny. Half the time people claim Android's static typing is an advantage vs iOS and half the time people instead really hate it. I have to say that now that I'm slowly getting over the verbosity of Objective-C I'm finding ansi C + a dynamic messaging layer to be a pretty nice combination on iOS. It looks like I'd have to work both below Java with the NDK (painful) and above it with some kind of scripting layer to get similar speed + flexibility on Android.
- ddkrone 16y ago
- alanh 16y agoWow, title does not match the article at all. Doesn’t look you like can actually develop in Python yet, or at least without considerably more work. The title, to me, implies Google backing & compilation for Dalvik.
- nailer 16y agoIndeed. Flagging the post as it's misleading.
- koush 16y agoFairly old news. I ported Mono to Android a few years ago and got Python and Ruby running that way. http://www.koushikdutta.com/2009/02/monodalvik-interop.html http://www.koushikdutta.com/2009/02/monodalvik-interop.html
- koush 16y agoOopsie, wrong link: http://www.koushikdutta.com/2009/01/microsoft-dlr-and-mono-bring-python-and.html http://www.koushikdutta.com/2009/01/microsoft-dlr-and-mono-b...
- pan69 16y agoHello Java. Thank you Jython and JRuby.
- hdragomir 16y agoNow this will bring me back to native apps for Android! Sadly, thought, this still won't make apps easier to sell on the Android Market, but that's for another discussion.
- evilmushroom 16y agoStill do not get all the Java hate--- it's plenty valid enough for Android dev-- and easy to use. Some people just like hating it because they think it's cool to do so. :)
- udp 16y agoI find both Java and the Android APIs ugly, overengineered and more importantly - boring! I'd rather write a webapp in HTML/CSS/Javascript than a native Android application any day. What I'd like to see is applications for things like Android becoming packaged up "web pages", with platform-specific extensions to access the native APIs. Considering webkit/V8 are already bundled, it'd make a lot of sense...
- bad_user 16y agoI tried doing a simple application with Javascript + native hooks for the iPhone, using UIWebView + hooks to native functionality. I did it like that because the UI needed fast updates if available. It was a horrible experience. Mobile Webkit is buggy and inconsistent and comes with restrictions; and trying to emulate the native look&feel ... it's like trying to provide a native look an feel for a Java AWT interface, running on top of IExplorer 6. I don't see it happening, and I don't wish to see it happening. Just build the damn thing with whatever native platform the phone comes with, and leave the platform-specific extensions out of WebKit. Thanks,
- udp 16y agoIsn't it up to the platform to give web applications the "native" look and feel, though? If an application is just standard HTML controls, it can't be difficult for (eg) iOS to make them look like iOS controls, surely? If mobile webkit is as "buggy and inconsistent" as you describe, than I'd rather see that fixed than have developers write for a completely different language/API for each platform they want to target. HTML/CSS/JS are open standards and supported relatively consistently across desktop operating systems and mobile devices. I just think it makes a lot more sense for each platform to expand that when they need to, rather than reinvent the wheel with, for example, their own button API every time.
- ianhawes 16y agoI can't believe no one has mentioned Appcelerator Titanium yet (http://appcelerator.com http://appcelerator.com). Titanium allows you to create Android applications in JavaScript. Even though its not python, for all the Java haters (and there are plenty) its drastically easier than creating an app in Java. Plus, its significantly faster than using a WebView (a la PhoneGap). With Titanium you get access to all the native controls, maps, audio/video, camera, Facebook, and a _ton_ of other stuff. You can check out their Github profile for more info: http://github.com/appcelerator/titanium_mobile http://github.com/appcelerator/titanium_mobile. Beyond the basic UI stuff, Don Thorp and his excellent Android develops have recently added the ability to use Android.R resources, intents, activities, services, notifications, and other advanced API's that you'd be hard pressed to find in an app developed via PhoneGap. Not only is it free, but you can use the same codebase (with some changes) to create an iOS (iPad or iPhone) app. Unlike Mono Droid/Mono Touch, Titanium is 100% free.