I'm trying to display a .tiff image in an android app and it looks like .tiffs are not supported. The number one recommendation people have been recommending is to use Tiffonandroid (a google code project). Is there a basic way to incorporate a separate .apk file into an android app? I've tried to find resources online, but have come up dry. If that it more complicated then I'm imagining it being does anyone know of any .tiff converters or view libraries that would also work?
Libraries are not .apk files, they are projects or modules of code for you to use in your project. You can import them into your project and many libraries will give directions on how.
Related
I am working on my master thesis, where I am looking at the security for an IoT device, which is controlled by an android application. At this point, I have reverse engineered the application and looked through the code that came out of it. An interesting discovery is that it is using a .so lib to communicate with the IoT device. So, I would like to build a POC android application where I use this same .so lib.
Now, my question is: how do I do this correctly?
From what I have understood so far, I need to put the .so lib into the structure:
app/jniLib/armeabi-v7a/*.so
Then I need to load the library in java with:
static {
System.loadLibrary("something_lib");
}
Now if I wish to call a function I should do this by using the "native" keyword:
But, as shown in the image above, the function is not being found. So, I properly miss something or am doing something completely wrong.
I've looked at a project on GitHub (https://github.com/SandroMachado/openalpr-android), which is also using .so lib. But I'm having the same experience when I open this project.
I have also had a look at the Android NDK guides (https://developer.android.com/ndk/guides/prebuilts.html), but sadly it did not make me a lot smarter. Here it says something about an Android.mk file, is this still something I need in my situation? If so, I would love if something has a link to a page or can explain to me the missing gaps I have in my knowledge about how to do this.
A simple example/guide for how to use a .so file in a project would be the ultimate solution for me at this point.
Maybe this thread help you:
How to include *.so library in Android Studio?
Looks like you should integrate your *.so files into src/main/jniLib/armeabi-v7a/*.so rather than app/jniLib/armeabi-a7/*.so. Verify that your arm-directory is named armeabi-v7a and not armeabi-a7.
I have a project that I have been working on which is a standard android application that does not include any other external libraries at this time. I am now looking at making a game at the end of the app(its a quiz so after the questions I want to make a mini game).
So what I am trying to find out is can I just import the libraries that it uses and connect them to my project rather than creating a LibGDX project and importing that?
What it comes down to is your personal preference. In answer to your question, yes you could just add in the jar files and such into your current project, however you are going to have to edit your manifest and some add in some other stuff besides jars using this Setup. In my personal opinion it would be easier to create a libgdx project using the tutorial found here, but in the end as I said before it all depends on what exactly you want to do.
Before deciding, ask yourself.
Do I want to have everything in one project, or can it be in more than one?
What would be better in the long run for managing my app.
Do I want ease now or later?
Cheers!
In android I need to create a library file(.Jar file) to distribute it to third party people to integrate that functionality within their android apps.
Bit struggling of deciding what the best approach. Yes I can create an android library project and implement the functionality seperately and test it with my main project, but wonder how to create a .Jar file out of that (I know it works perfect with the .Jar file that automatically creates under the bin filder in library project but don't think its the best practice as it automatically creates and we dont have any control over it).
I serched this thing but didn't get an exact way to do this. But I am pretty much sure its possible as we already have .Jar files available to integrate with android.
If someone can explain the steps that I have to follow to create a .Jar file for android it would be great. I am using Eclipse as the IDE.
In my case I am NOT using any resourses from the library project and just few classes that have public methods in it to call from the main project.
Thanks.
So here is the deal. Let's say I'm developing an app depending on the Facebook SDK and Chris Banes PullToRefreshListView. I import the SDK's to my workspace(which I don't really like since it fills upp the workspace!) and reference it in my app as libraries. I'm making some changes to the PullToRefreshListView, let's say I'm adding a custom font or changing the color of one of the labels.
Now, I'm using Git to version control my project. I would like to be able to put up my project to our Git server and make my colleagues able to pull the project and get to work without having to struggle with getting the same SDK's (of the same versions as I used) setup and referenced in the project. Since I've made some changes to one of the libraries, the project could never be fully restored by another person if I don't provide the code.
How should I act in this situation?
Is it possible to put an uncompiled library in the libs folder or something like that?
If not, what is the right way of accomplishing this?
All I can find when Googling or searching Stack Overflow is how-to's on using compiled .jar files in the libs folder, which is good but not what I'm looking for.
Essentially, I'm looking for a good way of structuring projects using 3rd party libraries.
It sounds like these are android library projects (they contain assets). If that's the case, you can't turn them into JAR files.
The easiest way that comes to mind is to have your root project folder contain your app and all said libraries:
Root
-\Your app
-\src
-\res
-\3rd party lib 1
-\3rd party lib 2
-\3rd party lib 3
This structure would make it pretty simple to push to git and manage in eclipse.
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.