how to test the existence of a specific activity ?

by hapciu » Wed, 04 Feb 2009 13:57:20 GMT


Sponsored Links
 Is there a way to find out whether a specific activity is present on
the phone ? I mean without firing an intent to start it and then catch
the exception.

thanks

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



how to test the existence of a specific activity ?

by Dan Raaka » Wed, 04 Feb 2009 14:57:15 GMT


 This should help
 http://www.curious-creature.org/2008/12/15/android-can-i-use-this-intent/ 

-Dan



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


Sponsored Links


how to test the existence of a specific activity ?

by Al Sutton » Wed, 04 Feb 2009 16:41:13 GMT


 getPackageManager() in a Context gives you one of these; 
 http://code.google.com/android/reference/android/content/pm/PackageManager.html 

You can then use 
 http://code.google.com/android/reference/android/content/pm/PackageManager.html #getActivityInfo(android.content.ComponentName,%20int)
 
If you know the package class name, or 
 http://code.google.com/android/reference/android/content/pm/PackageManager.html #getInstalledApplications(int)
 
if you just want to have a rummage through whats installed.

Al.
 http://andappstore.com/ 





-- 
======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



Other Threads

1. how to run android native IM

dear all:
   android have native IM code, but we can not use, I add
"<category android:name="android.intent.category.LAUNCHER" />" to some
IM activty like:

        <activity android:name=".app.SigningInActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.DEFAULT" />
                                <category 
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
and then I can see the app in menu, but it still can not run. why

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

2. OpenCore RTP session streaming?

1.) Does OpenCore Handle RTP creation and RTP sessions?

I'm looking to implement a phone based streaming server broadcasting
RTP over UDP.


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

3. Launching/Installing an APK with command-line like options

4. environment woes...

5. Switching Content Providers for the same Content URI

6. App crashes when creating UI

7. android codecs