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

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


Sponsored Links
 Hi,

If my app is dependent on a 3rd party library, say chartdroid 
< http://code.google.com/p/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
cx0der


--



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
time.

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

_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 com.android.inputmethod.latin) 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

Hi!

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.

TIA.

cheers

package info.shouraig.com;

import android.app.Activity;
import android.net.Uri;
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 = "http://www.youtube.com/watch?
v=8bmWwxixT0Y";
        VideoView videoXSO5;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

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

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

--

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?