The android source code has an "external" folder where there are many libraries such as jmonkeyengine. I am wondering if I can access those libraries? There are two scenarios that I am interested in:
If I am just developing an app for the app store, could I somehow use those library (i.e., not including those library in my apk and let my app access them directly from the android system somehow). My initial experiment seems to suggest a "No", I basically compile an apk that use jmonkeyengine library - but I exclude the library from the apk. The app would crash immediately when launched because my activity refereed to a jmonkey class.
If I am developing an "internal app" for an android device (as in compile the whole android source code with my app in the "app" folder in the source code), will I be able to access these library by default?) I have not try anything here yet.
Thanks in advance.
Well, after working on it for a while, I think I have the answers:
The answer for the first question, from my experience (as oppose to reading some references...), is NO.
The answer for the second questions is also NO. By default you will not get access to it. You get access to it by changing the build files instructing android to link your app to the library. At this point this sounds very obvious to me, but at the time I wrote the question that is not very clear
Related
Is it possible to build and run ScalaFX applications on Android?
I'm aware of cross-build of JavaFX supported by gluon. Can ScalaFX be combined with this, or by other means? What are the intricacies? Among other things:
How does building work, as I understand that currently it uses Gradle - can this be replaced with SBT?
Also, I believe that most Scala applications that are run on Android need to be stripped of unused library code, otherwise they binaries are really large. Is that right?
Any other steps that need to be taken into account?
There is already an application that combines Scala and JavaFXPorts:
Code:
https://github.com/rladstaetter/fx-tictactoe
Blog posts:
http://ladstatt.blogspot.com.es/2016/01/fx-tictactoe-tictactoe-javafx.html
http://ladstatt.blogspot.com.es/2016/02/fx-tictactoe-deploy-javafx-app-into.html
And you can actually download from Google Play and test it.
I want to use vuforia sdk's text recognition module in my new app.
I have been successful in building and running their sample apps. However, having done that was apparently not enough for me to figure out how to start using vuforia android sdk in my mew project in a proper way.
The IDE is Android Studio. I have the license key for my vuforia account.
Could someone help me get started? I jist need to start using vuforia as a library in my own personal project. I do not want to start developing directly over their sample apps.
I am sorry if the context of the questions doesn't fit into that of this particular community.
I wanted to do exactly what you said. I didn't want to build on the top of their samples. I struggled to find a tutorial but there is none, at least I was not able to fine one. Turns out it is really easy. Go to the Vuforia folder(wherever you installed it) and then head to vuforia-sdk-android-X-XX-X\build\java\vuforia and copy the .jar file and paste that file to your new project in Android studio inside your libs folder. Then add this line to your Build.Gradle
compile files('libs/Vuforia.jar')
inside your dependencies. That's it. You can access all the Vuforia classes from there. Don't forget to instanciate them just like in the example with your own key from Vuforia developer console.
I don't know if this is still relevant, but... This link shows what you need to do, code-wise, for creating a new Vuforia App: How can I build a basic Vuforia app. This, along with the links you have already seen regarding the setup, should be enough for you to get started from scratch.
Instead of relying on Vuforia's module, I built my own real-time OCR from scratch, using the Camera (1) API and Google's Mobile Vision Library.
My app - Optical Dictionary & Vocabulary Teacher - performs a lot better than Vuforia's module. It does real-time scanning of words, shows them in a more friendly manner, and does way better validation of words. It even lemmatizes the words (e.g fooled -> fool, thieves -> thief etc).
Also, needless to say that this gave me complete control over my module as well.
Here is a Video Demo of my app.
If any one wants to build something similar, they can feel free to contact me for assistance.
So... I'm trying to create a plugin for one of my apps. This plugin would require several views, images, an activity and a parser for CharSequences... Ideally, this plugin would be downloadable from the Android Market.
I understand how to create a library, but that would need to be included in the application.
I understand how to create an app as a service and just call it via intents, but I need direct access to objects and code that is neither parceable nor serializable.
What I have been looking at is eyes-free TTS. With their implementation, the developer includes a small TTS_library_stub.jar file in their app, which looks like it defines a lot of the necessary classes/objects.
So my question is, how would I go about building something like this and generating this "stub" .jar file, which would be included in my app? I've been trying to work my way through the TTS code, but it's a massive codebase, and I'm having trouble finding what I'm looking for.
Any help would be massively appreciated :)
The service and the app need to have the same sharedUserId in the manifest and be signed with the same key. Then the app and service can share eachothers assests, classloader and even run on the same thread. I have never included part of the GUI in a service, so maybe that is a limitation...not sure.
If there is a limitation, you must be able to work around it. Look at OpenIntents. It is open source, it is a service and you can download that from the Market. It provides a GUI file browser to any app that uses its intents.
Didn't full understand what you needed, but thought this might help.
If you want android library to be downloaded from market, It has to be standalone android application. (not android library project!). Then you can upload it to market, download it to phone and communicate with it via intent(which this library can handle) or service(aidl) or provider(the data from library) and perhaps receiver, but I never used it in that way.
If you would design your app for an OSGi environment like apache felix it might be possible to load libraries at runtime.
In their presentation they described how the whole concept is working.
Since only APKs can be shared in the android market you would need to write your own "update mechanism" which downloads your OSGi bundles (your plugins) and deploys them to felix.
I'm producing an application for multiple clients. Each of these apps only slightly differs (in the ui presentation) from the others and almost all of the other code is identical.
In the best case scenario I would brand something like a boot-strap app for each client so they could have their logo on a separate app in the market. Once a user installed a client's app it would download the core functionality, set some prefs and launch as if it had come from a single download. This way I could get the benefit of updating for bug fixes once rather than for each application (slated for 20-30 by end of year.) I've read that this isn't possible because of security measures though (and additional visits to the market place for the second download or having to allow installation from unknown sources isn't acceptable.)
I'm thinking that worst-case/only-case might be to include this shared code in each application and create some batch build and deploy once updates are ready.
I'm looking for a .dll like approach for economy of effort and safety.
I'd appreciate any input on this.
Thanks!
The java equivalent of a dll is a jar file. You can extract all of your shared functionality into a library project that compiles into a jar and then include that as a library in your other projects.
I am newer to android development. I have a couple apps I've made with appinventor. I would like to be able to take a completed and packaged .apk that is saved on my computer that was made with appinventor and open to edit it in eclipse. Mainly I want to see how a working app Ive made is actually written. This is for my own educational purposes only, no pirating or other illegal uses.
generally it is not possible to convert an App Inventor project into Java. However there are projects which have this goal, see the App Inventor-Java translation project and the Java Bridge project.
Check the android-apktool. I have no experience with the tool and as I see it will not show you the sources but it seems to be the best way to 'unpack' apk files.
I doubt this is possible, how are you going to bring the dex code back to your java code, even then, AppInventor makes for horrible APKs, two apps that do the exact same thing will differ greatly in size if made with the SDK vs AppInventor.
You should just read a couple of books, or search for information online, instead of trying to unpack an APK.
It's absolutely possible using dex2jar which involves a little time to set up and run but it give you a .jar that you can open with a java decompiler. As for getting the source files into eclipse, there are probably some decompilers that do this but probably cost money. You can use the one listed to copy/paste the code out but it will not provide you with an eclipse project.