I've continued to experiment.  I wanted to send an attachment file but
but here is a portion of the  logcat showing the RxBcast failing at
bootup and after the Emulator is opened then running correctly.
look for ******  I unlock  emulator
The same thing happens on my DroidX2 Fails on boot after keyboard is
unlocked and then works correct when started by touching icon.

1015}I/SurfaceFlinger(   58): Boot is finished (26269 ms)I/
ARMAssembler(   58): generated
scanline__00000177:03515104_00000001_00000000 [ 73 ipp] (95 ins) at
[0x2eec50:0x2eedcc] in 1496954 nsI/ActivityThread(  227): Publishing
provider com.android.email.provider:
com.android.email.provider.EmailProviderI/ActivityThread(  227):
Publishing provider com.android.exchange.provider:
com.android.exchange.provider.ExchangeProviderI/ActivityThread(  227):
Publishing provider com.android.email.attachmentprovider:
com.android.email.provider.AttachmentProviderD/dalvikvm(   58):
GC_EXPLICIT freed 4280 objects / 204952 bytes in 179msD/
Exchange(  227): BootReceiver onReceiveI/ActivityManager(   58): Start
proc com.needham.RxBcast for broadcast com.needham.RxBcast/
com.needham.PiesOfCod.RxBcast: pid=237 uid=10040 gids={}D/EAS
SyncManager(  227): !!! EAS SyncManager, onCreateD/EAS
SyncManager(  227): !!! EAS SyncManager, onStartCommandD/EAS
SyncManager(  227): !!! EAS SyncManager, stopping selfD/Eas
Debug(  227): Logging: D/EAS SyncManager(  227): !!! EAS SyncManager,
onDestroy

******  I unlock  emulator

D/KeyguardViewMediator(   58): pokeWakelock(5000)D/
KeyguardViewMediator(   58): pokeWakelock(5000)I/ARMAssembler(   58):
generated scanline__00000177:03515104_00001001_00000000 [ 91 ipp] (114
ins) at [0x333bb8:0x333d80] in 2730008 nsI/ActivityManager(   58):
Displayed activity com.android.launcher/
com.android.launcher2.Launcher: 19060 ms (total 19060 ms)D/
AndroidRuntime(  237): Shutting down VMW/dalvikvm(  237): threadid=1:
thread exiting with uncaught exception (group=0x4001d800)


*******  Bad stuff here
E/AndroidRuntime(  237): FATAL EXCEPTION: mainE/AndroidRuntime(  237):
java.lang.RuntimeException: Unable to instantiate receiver
com.needham.PiesOfCod.RxBcast: java.lang.ClassNotFoundException:
com.needham.PiesOfCod.RxBcast in loader dalvik.system.PathClassLoader[/
data/app/com.needham.RxBcast-1.apk]E/AndroidRuntime(  237):     at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2789)E/
AndroidRuntime(  237):  at android.app.ActivityThread.access
$3200(ActivityThread.java:125)E/AndroidRuntime(  237):  at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)E/
AndroidRuntime(  237):  at
android.os.Handler.dispatchMessage(Handler.java:99)E/
AndroidRuntime(  237):  at android.os.Looper.loop(Looper.java:123)E/
AndroidRuntime(  237):  at
android.app.ActivityThread.main(ActivityThread.java:4627)E/
AndroidRuntime(  237):  at
java.lang.reflect.Method.invokeNative(Native Method)E/
AndroidRuntime(  237):  at java.lang.reflect.Method.invoke(Method.java:
521)E/AndroidRuntime(  237):    at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)E/AndroidRuntime(  237):
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)E/
AndroidRuntime(  237):  at dalvik.system.NativeStart.main(Native
Method)E/AndroidRuntime(  237): Caused by:
java.lang.ClassNotFoundException: com.needham.PiesOfCod.RxBcast in
loader dalvik.system.PathClassLoader[/data/app/
com.needham.RxBcast-1.apk]E/AndroidRuntime(  237):      at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)E/
AndroidRuntime(  237):  at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)E/
AndroidRuntime(  237):  at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)E/
AndroidRuntime(  237):  at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)E/
AndroidRuntime(  237):  ... 10 moreI/ARMAssembler(   58): generated
scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at
[0x33c728:0x33c7e4] in 493939 nsD/MediaScanner(  201):  prescan time:
4232msD/MediaScanner(  201):     scan time: 5msD/MediaScanner(  201):
postscan time: 1msD/MediaScanner(  201):    total time: 4238msD/
MediaScannerService(  201): done scanning volume internalD/
dalvikvm(  123): GC_EXTERNAL_ALLOC freed 12767 objects / 663160 bytes
in 129msI/Launcher.Model(  123): not binding apps: no Launcher
activityD/dalvikvm(  123): GC_EXPLICIT freed 1892 objects / 94832
bytes in 182msD/dalvikvm(  123): GC_EXPLICIT freed 3604 objects /
193968 bytes in 228msI/Process (  237): Sending signal. PID: 237 SIG:
9W/InputManagerService(   58): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$Proxy@44eb94c0I/ActivityManager(   58): Process com.needham.RxBcast
(pid 237) has died.D/SntpClient(   58): request time failed:
java.net.SocketException: Address family not supported by protocolD/
dalvikvm(  123): GC_EXTERNAL_ALLOC freed 341 objects / 19920 bytes in
67msW/KeyCharacterMap(  123): No keyboard for id 0W/
KeyCharacterMap(  123): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin

***  com.needham.RxBcast/.PiesOfCodActivity  is in system as it
displays OK
    emulator is unlocked


I/ActivityManager(   58): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=com.needham.RxBcast/.PiesOfCodActivity }I/ActivityManager(   58):
Start proc com.needham.RxBcast for activity
com.needham.RxBcast/.PiesOfCodActivity: pid=248 uid=10040 gids={}I/
ARMAssembler(   58): generated
scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at
[0x3745c0:0x3746cc] in 744029 nsI/ActivityManager(   58): Displayed
activity com.needham.RxBcast/.PiesOfCodActivity: 1232 ms (total 1232
ms)W/KeyCharacterMap(  248): No keyboard for id 0W/
KeyCharacterMap(  248): Using default keymap: /system/usr/keychars/
qwerty.kcm.bin
************************************************************************************************************

On Feb 21, 4:58 pm, Ted Scott <t...@hootinholler.com> wrote:
> On 2/21/2012 3:02 PM, Thomas wrote:> The compile error:
> > * PiesOfCodActivity cannot be resolved to a type
>
> > The error essentially is that the RxBcast cannot be aware of an
> > external app that exists on an Android somewhere.  The
> > PiesOfCodActivity is a retitled "helloworld" that works just fine on
> > my Android.
> > Perhaps there is some sort of intent construction where the app-to-be-
> > is a string that represents future runtime intentions.
> > Thanks for all of your good thoughts and help.
>
> Of course not you put it in a different application. That's not what I
> thought you asked about, I thought you wanted an app that would launch
> at boot. Did you get it working with the receiver in the same package?
>
> To launch another activity outside your package you need different
> information in the intent. One way is to specify the package of the
> other app:
>              Intent si = new
> Intent(Intent.ACTION_MAIN).setPackage("com.hootinholler.PiesOfCod");
>
> The other app needs to have an action MAIN defined in its manifest and
> it also needs a category DEFAULT
> <category android:name="android.intent.category.DEFAULT" />
>
> I've tested this here with one application that only has the
> PiesOfCodActivity in the PiesOfCod package and another app that only has
> the RxBcast in a Pies package and constructs the intent as above.
>
> Really this didn't take that much to solve given a little reading and
> experimentation. I agree with Tre that you should probably read up on
> Intents and how they get created and resolved.
>
> Also I don't think it will be a good idea to have an app with no
> launchable activity as it could make it hard for users to uninstall

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to