Licensing: Android, LGPL and the ZBar QR Code scanner [closed] - android

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have integrated zbar code scanner in my Android-app in minutes (great library!),
nevertheless I am thinking of replacing it with another QR code reader now.
The reason is, that there is much scepticism[1][2] on the web whether
LGPL is compatible with commercial Android projects.
Can someone tell me why zbar uses LGPL but nevertheless are supporting android? (the even have a android section in their support forum...)
Is there a way to make sure my app meets the license requirements?
[1] http://source.android.com/source/licenses.html
[2] http://www.gnu.org/licenses/lgpl-java.html

Android platform project has different licensing requirements from 3rd party app developers. While it is possible to replace and reverse engineer LGPL libraries in 3rd party apps, it is not so for LGPL libraries in read-only firmware.
Key parts of Android zbar are distributed in binary .so files. As such, they are replaceable in your distributed app in terms compliant with LGPL.
For the Java adapter code (zbar.jar), make sure you're not using ProGuard or other obfuscation on it.
For reference, here's how the droidText project addresses LGPL compliance: https://code.google.com/p/droidtext/wiki/LGPLCompliance
(Standard I-am-not-a-lawyer disclaimer applies.)

TL/DR: always distribute zbar source together with the app and you are clear.
I'd say that it's not simple for a user to upgrade the library should they want to. Instead, to be safe, you should treat your program as statically linked with the library. (From a practical point of view, your program is sort of statically linked, anyway.)
If you do that, you have to distribute the source (or linkable object files) of the library. It must be the potentially tweaked source you used, not some generic download-link or so.
By the way I upvoted llato's answer too, because it got some merit, but I would not be keen on arguing that line of reasoning in front of a judge. (Not that I think zbar authors in particular would drag me there but you get the point.)

Related

Am I allowed to use an open source Spritz clone in my app? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
The Spritz technology generated a lot of buzz on the internet recently, and I'd like to incorporate that technology into my app. People have already open sourced it here: https://github.com/andrewgiang/SpritzerTextView
I am wondering if the fact that its GPLv3 licensed means I'm good to go, even commercially.
I understand that I'm not receiving legal advice from you guys.
EDIT: Based on OpenSpritz: https://github.com/OnlyInAmerica/OpenSpritz-Android
If the original software was GPLv3 and someone randomly stamped Apache 2.0 on a derived work, the GPLv3 will govern.
The GPL is infinitely more restrictive, it requires you to make source code available for any derived work, allow others to copy your work and distribute -- basically you don't own your code any more, the public does -- you are merely the steward. As Steve Balmer described [Linux's GNU GLP], "it is a cancer that attaches itself in an intellectual property sense to everything it touches" -- can't think of a better way to say it.
Apache 2.0 on the other hand is permissive. You can use the code, put in your program, use it commercially, and not have to provide the source code when someone requests. In short, if your doing anything commercial, don't touch anything GPL, but Apache 2.0 fine.
More info: https://stackoverflow.com/questions/749461/lgpl-mit-or-apache-differences
(someone posted a nice chart there.)
I am the developer of SpritzerTextView and I am looking into this, OpenSpritz-Android is currently under GPLv3 and I have been working with that developer on his implementation of their SpritzerTextView.
OpenSpritz-Android might switch their library license to Apache 2 and will comply with the licence I have on my released version.
Look here

Why do iOS and Android force you to write the UI in the native App Programming language? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
:) When you write a iOS App, in order to use the UI like buttons. you have to write it in Objective-C. (Java on Android). I was wondering if anyone had any thoughts on the technical reasoning behind this. Why they might of done this. As you can write apps in C++ on iOS so I've never fully worked out why they didn't expose a way of making the UI in that. (Ignoring the fact that this is how they did it on the Mac).
Note: I know you can write apps in c++ for Android but the question is more why is the main UI i.e buttons etc forced to be written in a dynamic language for these platforms, why not expose access to it thorough C++ without having to write a crude wrapper or binding layer yourself.
I'm guessing that when the original framework engineers were working on their respective operating systems, cross-platform desires like UI support in a different language like C++ was at the bottom of their concerns. You'll have to realize that when deadlines loom, all of the features are prioritized only what is considered most important is made to work. Everything else is a consequence of that.
In the case of iOS, Objective-C is the language of choice for the OS that Apple uses. All of the MacOS app developers were writing in Objective-C so their developer based was in familiar territory.
In the case of Android, Java was already a popular language, with existing open source tooling and libraries (Eclipse IDE, Apache Harmony), so presumably they decided to use Java as the first class language for app development with apps running in a VM as a consequence. Alternatively the decision may have been VM first for the sandboxing of apps and Java was picked as the language for app developers. Or some other reason.
In either case any attempt to add in additional languages now that both are in the hands of customers means design decisions and trade offs along with a host of other questions like: how to add it in without breaking existing APIs, how to support it along with new features, how to test, etc. etc.
As you see more and more software, you'll realize that lots of stuff is just arbitrary or made sense at the moment of when it was designed.
iOS does expose a C API for drawing UI components; it's called Core Graphics.
Because the view itself is written in Objective-C, or Java, respectively. When in Rome, do as the Romans do.

Porting a C++ application with Lua scripts to android? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm looking into porting an application called ygopro (source code here) to Android. I was just wondering if anybody can help me out by telling me what would be the best way to go about doing this? I would prefer to not spend more than about 60 hours on it and I certainly don't have the time to go through and rebuild everything from scratch. The code is in C++ and there are about 5,500 Lua scripts to do various things. Is there any easy way I can port this?
First, you'll note that the graphics library used by this project is based on has been ported to android.
There are two demos available for that project. Those will show you how to write an android application that uses this library. I suggest you essentially hack your projects source into the framework they provide.
In terms of Lua, again you'll want to use an existing port. Many of the Lua ports are oriented towards allowing access to LUA from Java via JNI, but you just want a Lua shared library out of them to link to from your C++ code. You will probably want something like AndroLua rather than the Android Scripting Environment. Pretty much, add all the folders in it's jni folder to your Android.mk includes, add it as a library, and you'll be good to go.
In terms of actual porting, I'm assuming that the project currently compiles happily under GCC. If that is the case, as you try to build it, it will complain about functions that are platform specific, and you will have to replace these. That should be manageable, if you are slowly adding code to the graphics framework demo as suggested. Beyond that, some libc functions are missing, but generally only rarely used ones.
Hope this helps. It goes without saying that you should complete some Android Native tutorials before starting. This project is more than a weekend.

Android library engineering [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Intro: I have a native library (C++) with Java (JNI) wrapper. The library engine is cpu intensive, we don't want more than one app linking this lib to be running at the same time, and complex objects should be returned by the lib engine.
The question: What is the best way to engineer such an Android library?
So far, I could find just find 2 valuable examples: OpenCV manager and Connectbot ssh-agent.
I can think of a few solutions:
Solution 1: Make a (bound or AIDL) service that wraps the library functionality. (should the service run in its own space? or in the space of the application that links to it? how can the native lib be loaded if it's in a different app space(System.load("/data/data/com.company.myLib/lib.so")). How to return complex objects in AIDL?). This should be the Connectbot way.
Solution 2: Divide the lib into 2 components:
A standalone package which keeps the native libs + a manager service
An android lib-project which only contains Java wrappers which users can use to build their apps.
This should be the OpenCV manager way. I don't know exactly the details, but this way one does not need a service to interface with and can just import com.company.myLib.LibWrapper. On the other side the LibWrapper class should perform System.load("/data/data/com.company.myLib/lib.so"). Correct?
I would personally go for solution 2. Unfortunately Android is a new land and there are not many models yet on how to develop a library. Is there any other/better solutions? Is there other considerations to make?
Consider the following scheme: you build an "empty" app that contains no activities, no settings - only the manifest, the icon for "manage apps" list and the native lib that is installed by the system in /data/data/package/lib directory.
This native library may, but doesn't have to expose JNI functions. In a typical situation, this lib will be a straightforward port of an opensource LGPL library - e.g. libdmtx.so.
The "client" apps will call loadLibrary() for the "external" lib, and after that it will call the usual load() for its JNI wrapper. This lib has the only purpose to translate Java methods to the public C APIs of the external lib.
The JNI wrapper and the corresponding Java class may be distributed as a .jar or as sources, they are not bound by LGPL license of the external lib.
Such scheme is, IMHO, the only way to ensure LGPL compliance on Android: anybody can recompile the "external" lib from the open source, package it as an "empty" app and install it on their device.
Regarding your concern about concurrent access to the lib, I actually doubt that it is so important: the high end devices have four cores more powerful each than one core on cheaper devices. OTOH, it's easy to use Linux synchronisation methods, e.g. named pipes, to keep track of active instances.

Haskell interpreter on Android? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is there a Haskell interpreter (with standard libraries) that can be installed on Android?
So that someone with an Android device can do some Haskell exercises on an Android device: write and run some example code in Haskell.
Hugs is written in C and quite portable. It should be possible to port it to Android.
Taking a note from imz, all you need is
ConnectBot or similar
A remote machine with
Vim, Emacs, or similar
runghc / ghci / hugs / yourfavoritehaskellinterpreterorcompiler
It's not as solid as a dedicated app or scripting layer would be, but honestly, for your use cases, it would provide almost exactly the same functionality as those options (if not more). And it would be just as "mobile" as a website (depends only on the uptime of the host and the connectivity of the client).
You can use tryhaskell.org from your mobile browser. It will accept any valid expression, but keep in mind that defining your own data types won't be possible.
For some negative information, all the work I've seen for GHC on Android (such as http://ipwnstudios.com/) is based on cross-compilation, rather than building GHC for android or ARM.
I just found IDEone in the Android Market, which sends your code to an online service. It works, but programming on Android isn't much fun. Btw: In case you don't want to register see BugMeNot
Surprisingly, I couldn't uncover any existing Haskell interpreter for Android.
But here are some instructions for writing your own interpreter for the Scripting Layer on Android. That's assuming you're willing to try mapping the haskell functions on top of the Java android ones (which is not a perfect solution, I know). You'll also want to refer to their scripting layer written for Scala, because that's the one that comes closest to Haskell (which is not very close I admit).
Otherwise, there shouldn't be any reason why any of those Haskell implementations couldn't be directly compiled for Android using the NDK. As long as they're written in C, they should work on Android. For C++, that's a little bit more tricky since Android doesn't have all the C++ headers.

Categories

Resources