Android Native Apps Source code - java

Is there anywhere I can get the source code and all the required library files for a NATIVE android app? I need it for an experiment I am working on and I need to test a few apps for the same.

First you must know all dependence in android is write in Android.mk.
Second you can find some code in android source which is connect to you purpose, then looks up its Android.mk, and can find almost you need.
At last, recommand you try ndk, and is supported by Google.

Related

Uploading files in google colab

So I am writing code in java in google colab because I want to copy-paste the code in android studio to perform a specific function. Now in python it is pretty easy to upload files to google colab but I want to do it in java (I particularly want to upload image files). I should be able to upload image files in such a way that I can use it as input in my code. How can I do it? Also, for all the packages that I import in google colab, will I have to separately download them for android studio or can I just copy-paste the code and it will run?
Google Colab presents a Jupyter-notebook like environment for Python code only. It cannot run Java code (at least, I cannot find where you'd make it do that).
I want to copy-paste the code in android studio to perform a specific function
Android code runs on an Android device, not in a server.
If you want to run Java code on a server, then you'd host an HTTP-based Java web-server that you use an HTTP Client from Android app to communicate with it. (In theory, yes, you can install and run JAR files in Colab, but you would then need to know the IP of those servers in order to connect with them).
The more appropriate solution would be to use Google AppEngine or GCE/GKE (assuming you want to use Google Cloud)
I ... want to upload image files
You can use the Java Google Drive SDK for that
for all the packages that I import in google colab, will I have to separately download them for android studio
Android Studio is an IDE. Gradle will download packages for compiling your Java/Android code, yes, but as mentioned, Colab is downloading Python packages, not Java

Using part of an Android app in a non-Android Java project

I'm working on a server backend component for an app, and one goal is to log all the messages transmitted through the app (using MQTT). To do this, I wanted to use the app as a library of sorts so that I could use the objects defined within to parse the messages coming through, since none of the messages will be transmitted as standard types. I'm using IntelliJ for the Java development, and Android Studio for the Android development. Is this possible? I was previously able to import the code as a module, which let me use the types defined within, but when I went to build the project it tried to build the Android code as well and failed because IntelliJ hadn't set up Android dependencies. Should I try and set the Android SDK as a dependency in the app module, and then build? Or am I approaching this the wrong way? (if it's even possible) I understand that there are also Library projects which looks like a possible solution, it would just require re-factoring all the applicable code out to a different project and I was hoping that wouldn't be necessary.
Trying to import the entire Android app as a library into a different codebase probably isn't going to work; you don't want a non-Android app to have all that Android code linked in, and with resources and the whole environment it will be tough to get it to compile at all.
A better approach would be to take all of the code that needs to work cross-platform and distill it into a plain Java library that you can include in multiple contexts. On the Android side you could include it as a plain Java library project, or compile it to a jar and include the jar.

Android OCR Native library

I am trying to develop a Android OCR app (for home use).
I had the idea to use the Asprise OCR in the app but instead of the windows version I was gonna use the Linux version.
The problem is, I don't know how to handle the native libraries. They have the extension .SH
I'm developing in Eclipse.
Google recently released an OCR API, so you probably want to use that:
https://developers.google.com/vision/text-overview
Just add the following line to your dependecies:
compile 'com.google.android.gms:play-services-vision:9.2.0'
I would recommend you to use Android Studio instead of Eclipse and related to the OCR library, you could use Tesseract, which is an open source library developed by Google.
Here you have more information and a practical example to follow:
https://solidgeargroup.com/ocr-on-android
That reference may help you:
http://gaut.am/making-an-ocr-android-app-using-tesseract/
Hope this helps
Update 13/04/17: Removed the broken link, will put it back if it goes up again.

How to use Skype Java API inside android application?

I want to make one application that will monitor chat history of other IM in phone.
I couldn't find any Skype API for Android, although I found Skype4Java API from net. I wish to use this in an Android application. I have imported the .jar file of that API to my Java build path. When I run my code, I am getting errors for libskype.jnilib and libskype.so file.
I also can't delete that file also, because when I attempt to delete that I get an error. Please tell how to do that?
How can I use Skype's Java API inside an Android app?
As of the current writing of this answer, there is no Android implementation of Skype. There are numerous third-party chat APIs, although I personally can't name one since I haven't worked with any.
The reason why the Skype4Java API is throwing errors at you is because it was not designed for use with Android. To delete the .jar file, you must remove all references to it and remove it from your build path for attempting a delete.

Using MonoDroid Library apk from Java code

If i created a apk library with monodroid. Can i u use this just in Eclispe(Java) and do my rest code in Java ?
In short: no. A DLL compiled from a Mono for Android class library relies on the Mono runtime in order to run it, which wouldn't be present in a normal Java Android application. It is possible to go in the other direction though, and use Java libraries within a Mono for Android app. Xamarin has documentation of how their architecture available here.
That said, in some cases it is possible to access C# code from Java code when you're in the scope of a Mono for Android application. This question/answer has some good details about that.

Categories

Resources