Where is zxing Android CaptureActivity defined? - android

I am following the steps outlined at http://techiedreams.com/android-zxing-barcode-scanner-integration/ to embed QR scanning into my Android app. Instead of building the .jar files myself, I have downloaded them directly from http://repo1.maven.org/maven2/com/google/zxing/.
The problem is none of the jar files below contain com.google.zxing.client.android.CaptureActivity class that is required for integration.
http://repo1.maven.org/maven2/com/google/zxing/core/3.1.0/core-3.1.0.jar
http://repo1.maven.org/maven2/com/google/zxing/android-core/3.1.0/android-core-3.1.0.jar
http://repo1.maven.org/maven2/com/google/zxing/android-integration/3.1.0/android-integration-3.1.0.jar
All these jars are at the latest version as of this post. Wondering if I missed something. Regards.

Yes, it is not a library component and you are not meant to call it that way. The source is available but it is not distributed as a Maven artifact. It is part of an app.

Related

Android | how to use com.android.setupwizardlib

How I can use com.android.setupwizardlib in my project?
This library isn't on jcenter or as gradle dependency.
This library is used in some apps (Such as Greenify) and it uses the XML tag com.android.setupwizardlib.SetupWizardLayout in my Activity
Any solutions about it?
I know how to import a library, I only need help with this specific google library
Greenify SetupWizardLib
It would be simpler for you to use existing packaged libraries for this functionality, such as some of these or a couple of these.
Otherwise, grab the source code and resources, add them to your project (directly or via a separate library module), and make changes as needed to get it to build.

Using SkyEpub jar library in an android project

I am going to use SkyEpub 3 library in my android application to read ebooks in epub format. To get familiar with the method of using SkyEpub I have downloaded its android demo project from here.
Its demo project is working properly, But when I use the skyepub.jar in my own project, it says some methods and classes from the jar file are undefined. Of course in the mean time I am using an unlicensed version of this library. I want to test it before buying the license if it was ok. I doubt that the errors are because of using the unlicensed version of the library in my project.
Can any one tell me please what is the problem exactly?
Thank you in advance.
Because there are a lot of classes ,which are not in jar, in example project. In the example, they create a lot of classes by extends another classes from jar. I used this jar before.
I found what was the problem. I increased priority of the jar file in eclipse. Now it works.

Generating AAR file from third party library Android

I am looking to create an AAR file from an existing third party android library but have so far been unable to find much documentation online. One post mentioned that the file is automatically generated when you add the library as a dependency to an existing Android Studio project and build that project, another said to use Apache Axis2. Still though, im having trouble generating it. If anyone could give advice or point me in the right direction that would be great. (P.S apologies if this is a noob question) Thanks!

AIR 3 Native Extensions for Android - Can I/How to include 3rd party libraries?

With all the new hype surrounding native extension support in AIR 3, I haven't found a single thing that confirms or denies it is possible to include and use an external JAR inside the native Android implementation.
All of the examples basically showcase the ability to hook into the built-in Android APIs. But what if someone wants to use one of hundreds of libraries that make it easier? Certainly it seems like this should be possible. I'll try to outline what I've done and maybe someone will spot a flaw:
Successfully created native Android library, using compiled-in imports from 3rd party Android library XYZ.
Exported Android project as JAR file.
Note: The referenced 3rd party JAR is in /lib inside the jar.
Successfully created ActionScript library (SWC) to interface with native Android library.
Created ANE package from SWC, extension.xml, Android JAR, and library.swc (for platform Android-ARM, extracted from SWC).
Note: Have also tried putting the 3rd party library in file structure outlined here: http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-24823354 12ffea65006-8000.html#WSf268776665d7970d-6be13ace1308aaebeca-7fff. I think this is more geared to runtime type execution with JNI or whatever, so that article has left me a little confused.
Used ANE in example Flex Mobile project.
Built and installed APK file on test DroidX device.
Can successfully see AIR application loading (and trace statements) in LogCat "ActivityManager: Displayed com.me.androidapp/.AppEntry"
Can successfully see native Android Java code being invoked via runtime by AIR app to instantiate extension & context. "mye_native: MyExtension.initialize", "mye_native: MyExtensionContext.createContext"
As soon as AIR app tries to call native function, it blows up, not able to find the classes from 3rd party Android library: E dalvikvm: Could not find class 'com.thirdparty.SomeClass', referenced from method com.me.nativeExtentions.MyExtensionFunction.call
Any ideas? It seems like it should work this way.
One thing I have noticed is that when I blow apart the APK and Dex from a pure Java Android app of mine (that also has 3rd party android libraries), it appears that the classes from the 3rd party have been included inside it (not just a jar reference).
When I do the same thing with my Flex APK, I find only my own Java classes plus Adobe's, and the 3rd party ones are nowhere to be found that I can see.
I posted this on the Adobe forums, but I thought I'd give the SO think-tank a try. Thank you.
You have to combine all your jars into one. Something like http://code.google.com/p/jarjar/ or your own Ant script will help.
Edited to add example:
Suppose your main extension jar file is extension.jar and you are using code in external.jar. Then you can put the classes from external.jar into extension.jar using the Java jar tool:
jar -xf external.jar
This will extract the .class files into package folders. If the top-level package is "com", then you can add those to extension.jar with:
jar -uf extension.jar com
(Repeat the second command for each top-level package in the external jar.)
You could also combine the library jars manually by turning them into zip-files (just rename them to .zip) and copy the classes from the 3rd party library into the main one and rename that one back to .jar

How share a library on Android

I want to build a java library with some useful things I done to Android. Just like my other project: https://github.com/MarkyVasconcelos/Towel
My question is, what is the best way to share a library on Android?
Source codes from a entirely Android project(res, src, Manifest, etc..)?
Only source codes(.java)?
A generated jar with the 'src' folder?
Thanks.
I'd distribute an Android library project. I have several such projects in my various GitHub repositories -- those links are just three of 'em.
Although never done myself I think you have to provide an Android Library Project if your library contains android specific content.

Categories

Resources