when to use "aapt add" for shared object files

by farrar » Sat, 17 Jul 2010 02:27:38 GMT


Sponsored Links
 hi All

I have the following so file from a vendor that needs to be added to a
demo apk:

lib/armeabi/libLoqASRJNIWrapper.so

I was instructed to do it like this:


aapt add -v LASRDemo.apk "lib/armeabi/libLoqASRJNIWrapper.so"


This will package the so file within the apk, but the directory
structure is not preserved:

$ unzip -l LASRDemo_signed.apk

 Length      Date    Time    Name
---------  ---------- -----   ----
      980  2010-07-16 10:19   META-INF/MANIFEST.MF
     1101  2010-07-16 10:19   META-INF/MYALIAS.SF
      937  2010-07-16 10:19   META-INF/MYALIAS.RSA
      195  2010-07-13 16:47   res/drawable/icon.png
      740  2010-07-13 16:47   res/layout/creatingro.xml
      760  2010-07-13 16:47   res/layout/error.xml
      744  2010-07-13 16:47   res/layout/loading.xml
     3376  2010-07-13 16:47   res/layout/main.xml
      592  2010-07-13 16:47   res/layout/my_spinner_style.xml
      740  2010-07-13 16:47   res/layout/recognizing.xml
     1888  2010-07-13 16:47   AndroidManifest.xml
     2756  2010-07-13 16:47   resources.arsc
   136032  2010-07-13 16:47   classes.dex
    48238  2010-07-13 15:11   loquendo/asr/demo/
MyCommandManager.java.ori
  2686392  2010-07-13 16:13   libLoqASRJNIWrapper.so



I need to carry over the "lib/armeabi" part as well. First off, is
this the correct approach for add a 3rd party .so file, and if so, can
I force it to preserve the dir structure? If I'm barking up the wrong
tree, what is a better way to handle this?

thanks
farrar


--



Other Threads

1. Layout chain

How can I do a chain with n ViewFlippers, where one view flipper points to
the next one e the last one points to the first one?

public MyFlipper extends ViewFlipper(){

private MyFlipper nextFlipper;

}

I can do it programatically, but i want to set who is the next in XML
layout... is that possible?

I tried to use the attrs.xml and use the id in myFlipper

<resources>


 <declare-styleable name="Card" >

<attr name="nextCard" format="integer"/>

</declare-styleable>


</resources>


And the layout like this..

<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:test="test"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent">

<MyFlipper

android:id="@+id/card01"

android:layout_x="10px"

android:layout_y="10px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

test:nextCard="@id/card02"


<ImageView

android:id="@+id/card01f"

android:layout_width="wrap_content"

android:layout_height="wrap_content"


</ImageView>

<ImageView

android:id="@+id/card01b"

android:layout_width="wrap_content"

android:layout_height="wrap_content"


</ImageView>

</MyFlipper>

 <MyFlipper

android:id="@+id/card02"

android:layout_x="10px"

android:layout_y="90px"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

test:nextCard="@id/card01"


<ImageView

android:id="@+id/card02f"

android:layout_width="fill_parent"

android:layout_height="fill_parent"


</ImageView>

<ImageView

android:id="@+id/card02b"

android:layout_width="fill_parent"

android:layout_height="fill_parent"


</ImageView>

</MyFlipper>

</AbsolutLayout>


I tried to revovery the nextCard id in the MyFlipper constructor, but no
way...

-- 

2. Example encoding video/audio using FFPMEG in android

Hi,

I am working on an Android app, that needs to do the following:
- capture a (animated) view to video including audio (from a mp3
file)
- encode the captured video (probably a bunch of raw image buffers)
and audio to avi.

After searching, FFMPEG seems the most suitable. Does anybody have a
sample code to accomplish what I need? I would really appreciate.

Whyhow

-- 

3. Why is my Android SQLite database going corrupt once in a while ?

4. new bitmap format that includes gps data

5. where to find the source code of Google search component?

6. Graphic rendering issues on simple components

7. ratingBar strange problem on htc desire