How I can use a Lisp library in Android (Eclipse Java)?
For example I like have a "Intelligent apps" with Lisp.
You need or common lisp implementation, which can run under android, or some tool to compile common lisp code into JVM Bytecode or native library for android (with NDK). As far as I know, there is no good and free solution for this problem for now.
Clozure Common Lisp can run under android, but you can't really create an application which can be published in play store with it. Or it'll be very difficult. There is even an example for CCL on android.
There is also proprietary Common Lisp implementation from wukix - MOCL, which aims to be able to bring Common Lisp into mobile development world. I had no experience with that, you can give it a try.
As I said, looks like for now there is no easy way to do what you want.
LambdaNative is technically a lisp (it is an implementation of Scheme based on Gambit-C Scheme) which implements its own GUI and various other modules.
It uses the same source code to create native applications for Android, iOS, Linux, Mac OS X, Blackberry 10, Windows, OpenBSD and OpenWrt.
Try lispworks android/ios runtime:
Sad thing it's not free, but you can ask for evaluation license.
Useful links:
Build iOS/Android Libraries in Common Lisp with LispWorks
LispWorks® for Mobile Runtime
LispWorks User Guide and Reference Manual- 16 Android interface
Mocl is another alternative:
mocl (+ lisp ios android osx)
There is also eql5-android, which integrates QML for the UI. It features a few examples.
Related
I've been searching solutions for my enterprise apps, at least 3 platforms need to be supported, which are iOS, Android and Window Phone. After a whole day's search, I finally set my eyes on 2 promising cross platform solutions, one is monocross and the other phonegap.
monocross seems to use c# and .net at all, is it possible to access native libraries and languages? I read somewhere it's compiled directly into binaries that can execute on target platforms.
And about phonegap, it uses webviews on each platform to provide the capabilities of presenting user interfaces to final users. As it's implemented via interpreted language and high level apis, the performance may not meet our needs.
Finally, we(my team) decide to give it a try with mono, the architecture is illustrated as bellow:
+++++++++++++++++++++representation layer++++++++++++++++++++++++++
[monotouch,monodroid,silverlight]or [native gui calls] or [html5/js/css]
+++++++++++++representation controller/business logic layer+++++++++++++++
[ mono/c# ]
++++++++++++++++++++++++++++server side+++++++++++++++++++++++++++
[ the cloud ]
I want to use mono/c# to write some common purpose business logic and data structures, and when it comes to some common platform features, like storage service, notifications, I'd like to wrap them up on each platform and expose uniform apis for c#(business logic layer) to use. As to the representation layer, we decide to choose from the 3 optional solutions listed above.
To make this happening, first I have to figure out if it is possible to call native frameworks.
So, my questions are:
1, How does mono work, I mean, are the c# codes compiled into binaries that can be executed directly on iOS, Android and Windows Phone?
2, Is there a mechanism to make native invocations? Like in cocos2d-x, I can call java methods via JNI, and in iOS, c++ can call oc directly. Can I call cocoa touch stuffs in mono with c#?
3, Is it possible to manage all these stuffs in one single project, and how to build them?
4, Are there any better solutions?
Any suggestions will be appreciated, thanks for your patience!
I wonder why Xamarin does not land on the first page of your search result,
http://xamarin.com/features
But that's what the Mono guys created for the C# developers that want to target mobile platforms. MonoTouch and Mono for Android are there each featuring a common library base with Microsoft .NET, and also platform specific bindings.
Your non-UI code should be able to be used in portable libraries and share among them. Microsoft's portable library is Windows specific, and right now I am not sure how much Mono guys can embrace that, but even if PCL fails, you can create multiple platform specific projects based on the same copy of source files (which I did in #SNMP). The remaining task is to develop platform specific UI for Windows Phone, iOS, and Android.
There are tons of articles showing the features,
http://docs.xamarin.com/
and also many successful apps
http://xamarin.com/apps
The best way to learn a product is to try it out (for free in Xamarin's case). This also applies to MonoCross (which is a framework built upon Mono).
I am not familiar with PhoneGap, so you need someone's advice on that.
Disclaimer: this is not a complete answer - but I do hope it answers at least part of your question
I encountered a similar problem when I started cross-platform dev using the Mono products 18 months ago.
The approach I've built since is called MvvmCross - it forked off of MonoCross a long time ago - now shares no code with it (but maybe we'll team up again one day!).
The approach uses PCLs to share code. This is not entirely painless, but is easy after you've done a few setup steps - http://slodge.blogspot.co.uk/2012/12/cross-platform-winrt-monodroid.html
You can learn more about this approach on this video: http://slodge.blogspot.co.uk/2012/12/mvvmcross-video-presentation-xaminar.html
I want to know more about Cross-Platform. I'm currently working on my thesis and decided to make an Android Application but not all target users uses Android device. So, We've come up with an idea to Cross-Platform the android application.
I have read the same topic but it didn't get to me too well. iOS / Android cross platform development. I want to know if there is another way than using the frameworks discussed in the link.
I want know what is the best/shortest way to cross platform a Android Application?
Cross Platform tools are in my opinion not a good idea at all. Android is Java, and iOS is Objective C. Android can use NDK to use a C/C++ library so theoretically if you did most of your code in C/C+ it could be used on both sides. I think two natives is more in order. Study NDK to see what could run on both devices. Lets say you built your app as a C++ Library except for UI interactions. Then in theory the library should work on both sides. C/C++ a lot easier on iOS than android however.
Also it really depends on the dependencies your app will have. Lets say you want to use a library but its only available in Java or C++ how does this effect your decision.
You might also consider designing your app so that it just captures data on the devices and the actual processing of the data takes place in a web service.
Another way is use Mobile Web HTML5 Framework like Phonegapp, Sencha touch and more.
Although web technologies don’t perform as well as native, but it is a useful thing that you can try.
See Choosing Mobile Web HTML5 Framework and http://operationproject.com/2011/adventures-in-html5-part-one/
Android application are apk files that are basically zip file that contains dex/odex files and all other resources that you may wish to add.But I think you can use any coding language to develop as long as you have IDE that converts your code to apk and dex .And most important of all your programming language must support corresponding api or must have something similar to cross compile.The reason Google used Java for Android was they felt it is convenient to do it(read it during case Google v/s Oracle)
Personally I feel cross-platform is good since it increases the developers base and understanding of the System (here Android).And I think the same analogy would go with other Systems as well.
I have my own C++ library with source code. It contains functions like this: CreateDvice, FillDevice, CloseDevice and etc. There is no dependency to any third-party libraries.
There is requirement to create application for mobile platform:
Blackberry
iPhone
Android
The application has to use logic provided by this library.
Is there chance to use existing library in mobile application or at least some of them?
Or does it require to re-implement library code for each platform?
For iOS (iPhone/iPad) you can directly compile your library and use it from a regular iOS app written in Objective-C++ and/or C++.
For Android you can directly compile your library using the NDK, then either write your app in Java and call your library via JNI, or write the whole app in C++ using the NDK.
I believe you are out of luck on Blackberry, for this platform you'll need to rewrite your library in Java, as neither apps or libs can be written in C++.
Edit: See my other answer for a completely different approach that may work for you.
Blackberry:
It's technically possible to have ASM on BlackBerry (or Android, iPhone, etc.) but 3rd-party developers are often not allowed (or not able in the case of BlackBerry) to do so.
iPhone:
Absolutely. You can statically link a C++ library. Of course it will have to be compiled with the right instruction set. There are a host of examples out there on how to do this. Translate - you will need the code.
Android:
Absolutely. There is a good book on this by Mark Murphy. Introductory material here:
http://www.androidguys.com/2009/10/14/android-beyond-java-part-one/
Your question is unclear. Do you need a cross-platform library/engine to create a mobile application?
If it is so, Cocos2D would be the best choice. Originally it's a game engine, but it is suitable for applications too. And it supports all the platforms written above.
Instead of compiling your C++ library on each target device that you intend to support, you could opt for creating a service that packs your library. You can install this library on a host you have control, then from each platform the only thing you need to do is invoke this service.
I'm not sure if this thing makes sense for the kind of library that you have, but this would be a way to maintain a single version of your library, and you'll have a guaranteed same behavior on all devices.
Good luck.
Android is not natively Java, it's natively C++. And iOS is also natively C++. So why not just leave the C++ code untouched and drop RIM's current platform (since they are switching to BBX which does support C++ as well).
For Blackberry you can use the C++/Qt Cascades; for iOS you can use C/C++ & Objective-C (a superset of C) and Android can use the C++ NDK. You can use Java on all platforms as long as the Java apps are standalone and the JRE is pre-packaged with the app (iOS). You can interface with C/C++ libs using JNI
If you want to use a Java library on all platforms, that would work.
Android and Blackberry are natively Java.
You can use a tool called XMLVM to cross-compile your Java library to Objective C for use on iOS.
http://xmlvm.org/overview/
It is not 100% perfect, but pretty darn close. We use it extensively to port common Java library code to iOS. Port the C++ library to Java and you are good to go.
I'd like to start creating Android apps but I don't like Java. I read that scala can be used to do it. Are there another option?(Clojure?)
I'm a Python/Django developer so it would be great to learn a pretty different language.
At this point Scala is the one that is most mature..I wanted to try groovy myself but its not even out of alpha..
Plus Scala on android has docs..:)
It's not hard to do with Mirah (formerly Duby), a very young language based on Ruby that compiles to bytecode that's basically indistinguishable from Java's, but adds some great new features like closures, type inference, and obviously a Ruby-like syntax. It's particularly well-suited for Android because it has no runtime or standard library (it uses compiler plugins instead) outside the JDK, whereas basically all other JVM languages bring along a lot of baggage, especially languages that weren't designed to target the JVM (like Ruby and Python).
http://github.com/technomancy/Garrett
Much nicer than writing Java!
for clojure development a useful tutorial: http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html
Clojure gets a LOT of benefit from android-2.2's JIT compiler and has not really been widely adopted on previous versions.
Appcelerator Titanium is an awesome environment for using web-ish skills (like HTML, CSS, and JavaScript) to build native apps for Android (and iPhone, and desktops, etc.). For example, the gang at Intridea have made several popular Android & iPhone apps with Titanium Mobile, including the OilReporter app that has been used for gathering data on the extent of the Gulf oil spill.
If you use Python, maybe SL4A (Scripting Layer for Android) is a good choice.
You could write python script that runs on Android and use Android API, but it also has a drawback that you need install Python/SL4A runtime library on your Android device.
In addition to the other solutions listed here previously, you have:
PhoneGap
Rhodes
AIR (pre-release)
AppInventor
Clojure
Another immature implementation is JRuby/Ruboto: http://blog.danieljackoway.com/first-ruboto-release.html
Is there a way to develop classes for Android and BlackBerry ? In this I mean that BlackBerry and Android have different collections.
So I would like to know what is the best way to develop such files (reflection, different files, ...)
Your best bet is to write to a common interface, so that your higher-level code can be consistent, and the parts that will be different, will be abstracted into their own libraries. This way you can write applications that use a common codebase, though most of the work will take place in your libraries, as that is where you connect to the platform.
This way you can try to minimize redundant work, but take advantage of each platform more completely.
If you limit yourself to what each can do then you are shortchanging your users as there are a great deal you will not be able to do, or do well.
We have common code for Android and BlackBerry. You know that BlackBerry is J2ME based so its Java 1.3 compatible, and Android is Java 1.6 I think. This places significant limitations. I will list what I remember below.
All common modules you code has to be Java
1.3 compatible if you want it to work on both platforms. This means
no collections framework, no
reflection, primitive string
handling/localization with strings
in class files etc.
It will be very hard to have ALL code that is works on both platforms. So it is better to have some common packages, then BlackBerry and Android packages that work on those platforms.
Nightly build system is really helpful as it will catch errors that break one platform build, caused by changes for the other platform.