How to deploy and bundle third party dynamic library

by Layeeq » Fri, 10 Apr 2009 22:33:56 GMT


Sponsored Links
 Hi,
If the application needs to use a third party dynamically linked
library (.so) file,   how to package that as bundle?.  Can i follow
the  samples platform library example?   The .so file is built with
android toolchain. Will that work even if i have no source code.

--~--~---------~--~----~------------~-------~--~----~



How to deploy and bundle third party dynamic library

by Mark Murphy » Fri, 10 Apr 2009 22:36:58 GMT


 


Questions regarding using the Android source code are best asked on a
discussion list pertaining to the Android source code:

 http://source.android.com/discuss 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android App Developer Training:  http://commonsware.com/training.html 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to deploy and bundle third party dynamic library

by Layeeq » Mon, 13 Apr 2009 12:16:13 GMT


 Hi,
If the application needs to use a third party dynamically linked
library (.so) file,   how to package that as bundle?.  Can i follow
the  samples platform library example?   The .so file is built with
android toolchain. Will that work even if i have no source code.


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Modal Dialogs: the definitive solution

Hi,

I decided to share the solution i found to the problem of Android not
supporting real modal dialogs.

The solution was to draw the dialog by myself. :-( Well, at least
worked fine, besides the problem that its a bit ugly. :-)

Here's the code i used:

   static boolean alertShowing;

   public static void alert(String msg)
   {
      int scrW=instance.getWidth(),scrH=instance.getHeight();
      alertShowing = true;
      final int fh = 18;
      // note: we have to draw the dialog on screen, otherwise if we
use Dialog, the application just quits
      String[] msgs = msg.split("\n");
      Canvas canvas = surfHolder.lockCanvas();
      // fill with white
      Paint p = new Paint();
      p.setColor(0xFFFFFFFF);
      canvas.drawRect(0,0,scrW,scrH,p);
      p.setColor(0xFFAAAAAA);
      int ly = fh+fh/2;
      canvas.drawRect(0,0,scrW,ly,p);
      // draw caption in black
      p.setColor(0xFF000000);
      p.setStyle(Paint.Style.STROKE);
      canvas.drawRect(0,0,scrW-1,scrH-1,p);
      p.setAntiAlias(true);
      p.setTextSize(fh);
      p.setTypeface(Typeface.DEFAULT_BOLD);
      p.setTextAlign(Paint.Align.CENTER);
      canvas.drawText("ALERT",scrW/2,fh+fh/4,p);
      canvas.drawLine(0,ly,scrW,ly,p);
      // draw message
      int maxy = scrH-fh*2;
      p.setTypeface(Typeface.DEFAULT);
      for (int i =0,y=fh*3; i < msgs.length && y < maxy; i++, y += fh
+2)
         canvas.drawText(msgs[i], scrW/2, y,p);

      String ok = "Ok";
      int tx = scrW/2;
      int ty = maxy+ly;
      canvas.drawText(ok,tx,ty,p);
      Rect bounds = new Rect();
      p.getTextBounds(ok, 0, ok.length(), bounds);
      int ww = bounds.width();
      int hh = bounds.height();
      canvas.drawRect(tx-ww,ty-hh-3,tx+ww,ty+3,p);

      surfHolder.unlockCanvasAndPost(canvas);
      while (alertShowing)
         try {Thread.sleep(200);} catch (Exception e) {}
   }

   public boolean onTouchEvent(MotionEvent event)
   {
      if (alertShowing)
      {
         alertShowing = false;
         return true;
      }
   }

HTH.

   guich
   http://www.totalcross.com

-- 

2. Hello, Stack Overflow!

Hi Android beginners!

Just wanted to let everyone know that we've just opened up an official
*developer* Q&A channel on Stack Overflow! Here's our blog post on the
launch:

    http://android-developers.blogspot.com/2009/12/hello-stack-overflow.html

Stack Overflow is very well-suited for asking programming questions,
and has some great features like syntax highlighting and tagging.

I'd recommend you all try it out. Bookmark this link for a current
list of Android developer questions on the site:

    http://stackoverflow.com/questions/tagged/android

**NOTE** When asking a new question, make sure to use the 'android'
tag!

Lastly, if your question is more advanced and might warrant a threaded-
style discussion, post that to the existing android-developers Google
Group at:

    

3. Checkout: Developer-Issued Refunds and Application Ownership

4. Buzz apps for android

5. Letting user save as ringtone or Notification... Please help

6. example that increments a variable on the A key?

7. Emulator error cause?