ActivityNotFoundException when trying to start another Activity from Preferences via Intent

by Dentharg » Wed, 29 Apr 2009 01:07:48 GMT

Sponsored Links

I've seen this example in API demos:

<PreferenceScreen android:title="@string/title_intent_preference"
  <intent android:action="android.intent.action.VIEW"
android:data=" " />

I'm trying to start another activity I made. I've added it to manifest
however each time I try to get to it from preferences screen I get

How should I define manifest or prefs xml to this activity is started?



Other Threads

1. Large jars in Android

Hi all,

I looked for any info on this but could not find much. Originally
I had a number of 3rd jars that I was importing into the Android
project. The general concensus I got was that I needed to find
the source for them and compile them in Android - well I  kicked
my behind and did all that and finally I have all jars in place for
my Android app. The compilation and packaging of apk of the
app with those jars sitting in the libs dir of the app takes 10-12
mins and towards the end it gives an Eclipse internal error
and it quits! I tried doing this outside Eclipse using ant and still
the same result. I have the java heap params jacked up for
-xmx and -xms to 256MB and still no luck. The jars sum up
to 6MB and the actual app to 0.25MB. The individual library
directories that use to compile each of the 3rd jars compile
fairly fast.

So I am wondering if anyone has any insights on this - is the
Android plugin or in general the Android devices not meant to
handle such large apks? Is there anything else I need to
configure or look into to get this packaged?

Thanks very much


2. Android on devices without batteries - unlock screen problem


I am trying to port Android (2.2_r1.1) to an ARM11 board which runs on
AC power (no batteries!!) and where im using a USB keyboard as input

So far, Android initializes without problems and I get to the first
screen when you have to press MENU to unlock it. I have modified the
qwerty.kl file so that MENU is mapped to F5 key.

key 63    MENU              WAKE_DROPPED

(NOTE: also tried with WAKE instead of WAKE_DROPPED)

When I press the F5 key i see this on the logcat log:

D/KeyguardViewMediator(  702): wakeWhenReadyLocked(82)
D/KeyguardViewMediator(  702): handleWakeWhenReady(82)
D/KeyguardViewMediator(  702): pokeWakelock(5000)
I/power   (  702): *** set_screen_state 1

It seems that KeyguardViewMediator is receiving the MENU key correctly
(since that is the code in

public static final int KEYCODE_MENU  = 82;

Therefore, the keyboard seems to be OK. Unfortunately the screen is
not unlocked!!

NOTE: I have also tried using the sendevent tool, but the result is
the same.

The android system that i built works correctly when i run it on the
Emulator (../android-sdk-linux_86/tools/emulator -avd avd22 -
system ....) where i can unlock the screen without problems, for
example using the sendevent or using the artificial keyboard in the

I tried to put the same fake battery properties in the init.rc for the

    setprop status.battery.state Slow
    setprop status.battery.level 5
    setprop status.battery.level_raw  50
    setprop status.battery.level_scale 9

But nothing changed...

So far, my conclusion is that the problem is probably related with the
wakelocks and the lack of batteries or appropriate power management
support for my board. The reason for thinking that is that in the
Emulator, the messages that appear when i press the MENU key is just:

D/KeyguardViewMediator(   61): pokeWakelock(5000)

That is, no message related to set_screen_state as it happens in the

In the kernel (android-2.6.32) i have selected a generic power driver
because i dont have any battery and this options (of course, android
drivers such IPC binder, low memory killer etc are enabled):


These are the error messages related to the batteries at
initialization time:

E/BatteryService(  702): acOnlinePath not found
E/BatteryService(  702): usbOnlinePath not found
E/BatteryService(  702): batteryStatusPath not found
E/BatteryService(  702): batteryHealthPath not found
E/BatteryService(  702): batteryPresentPath not found
E/BatteryService(  702): batteryCapacityPath not found
E/BatteryService(  702): batteryVoltagePath not found
E/BatteryService(  702): batteryTemperaturePath not found
E/BatteryService(  702): batteryTechnologyPath not found
E/SurfaceFlinger(  702): Couldn't open /sys/power/wait_for_fb_sleep
or /sys/power/wait_for_fb_wake

NOTE: the last one and the ones about  usbOnlinePath,
batteryVoltagePath and batteryTemperaturePath appear also in the
emulator version

Could somebody give me a hint of what should i do to make it work?

Could it be related to the wakelocks and the fact that the device
doesnt have batteries?

Is there any way to fake the batteries without modifying the code of
the KeyGuard java file?

Note: in the emulator case, i can see some code related to power in
hardware/libhardware_legacy/power/. Should i write something like

Thanks in advance


3. Is it possible to create a custom system image for any currently released commercial hardware phone/netbooks?

4. CursorAdapter Problem

5. Viewable Address Field for People Contact truncated

6. Sign in error habis matikan dan hidupin spica

7. GPS satellite icon