How to check for existence of 3rd party library during installation?

by Shivakumar T » Thu, 07 Oct 2010 07:05:25 GMT

Sponsored Links

If my app is dependent on a 3rd party library, say chartdroid 
<> ;. Is there a way to check this 
dependency during installation time and redirect the user to install the 
dependency before continuing to install my app.

I ask this because while installing one Google app (I think Google 
translate) it asked me to install TTS before continuing to install.

Thank in Advance.

Best regards


How to check for existence of 3rd party library during installation?

by Mark Murphy » Thu, 07 Oct 2010 07:10:21 GMT


I am assuming your "3rd party library" is in the form of a separate
application. In that case, you can use PackageManager to see if it is
installed. However, you cannot do this during installation -- only
when your application is run by the user.

If by "3rd party library" you mean a JAR, that will be bundled in your
application automatically, and so it cannot be missing at installation

Mark Murphy (a Commons Guy)  |  | 

_Android Programming Tutorials_ Version 3.0.1 Available!


Sponsored Links

How to check for existence of 3rd party library during installation?

by Kumar Bibek » Thu, 07 Oct 2010 13:46:50 GMT

 Yes you can. Query the package manager.


Other Threads

1. Error in helloandroid tutorial

Hi all,
I met the following error message appared on the emulator screen.
 "There's a big error message saying that 'Application Android Keyboard (in
process is not responding.' and asking
whether i want to force close it or wait."
Anybody knows why? Thanks.


2. Video From Youtube in Emulator Android 2.1 Eclipse Gallileo/ Unable to play video


having no luck with playback of video from source file, i thought id
try video from youtube... Emulator says it cannot play video.. So now
what?.. can anyone tell me aoubt this code below.




import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class XSO5 extends Activity {
        private static final String RTSP = "
        VideoView videoXSO5;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {

      //***VideoView to video element inside Multimedia.xml file

       VideoView videoView  = (VideoView)findViewById(;
       Log.v("videoXSO5", "***Video to Play:: " + RTSP);
       MediaController mc = new MediaController(this);
       Uri video = Uri.parse(RTSP);


3. Writing an app using android.speech.srec ... how to get to that code?

4. MediaPlayer error (1, -1)

5. Can not build LatinIME code

6. RelativeLayout doesn't work as expected in a ListView container.

7. Do manually created sqlite databases get exported when an apk is built?