Thanks to everyone for contributing to this longish discussion. Changing the line in the manifest fixed the problem. As far as debug is concerned I set it in the manifest as Eclipse didn't seem to set it by default.
The overall project is to use an Android tablet as an embedded application which means there has to be an A. external method for powering the tablet on and off (maybe via a small microcontroller), B. autostart an application at bootup - which is what this string is about, and the last requirement - C remove the key unlock screen. A. external startup is complete View at http://tombtalk.net/?p=627 as this is about hardware B. Start app at bootup is mostly complete thanks to all of your help. C. Remove or bypass key slide lock - being researched. There seems to be some uncertainty about how to do this. I'll report back as I learn stuff. All of the above available on a small blog. http://tombtalk.net Best Tom B On Feb 23, 5:06 pm, Ted Scott <[email protected]> wrote: > That's one error and certainly explains the class not found exception. > > I'm not sure but you also might need a default category for the activity > definition. > <category android:name="android.intent.category.DEFAULT" /> > > What do you mean by you have to debug as an Android? Of course you have > to run the code on a device to debug it. Also you won't be able to > attach the debugger to your receiver because it will fire before the > DDMS is attached. > > On 2/23/2012 4:50 PM, YuviDroid wrote: > > > > > > > > > There's something odd with the package names :S:S:S > > > If your BroadcastReceiver package name is "package > > com.needham.RxBcast;" then also in the manifest you should use the > > same package: > > <receiver android:name="com.needham.RxBcast.RxBcast" > > > > or correct the package name and make it "package com.needham;" and the > > receiver in the manifest: <receiver android:name="com.needham.RxBcast" >. > > > On Thu, Feb 23, 2012 at 10:32 PM, Thomas <[email protected] > > <mailto:[email protected]>> wrote: > > > It is the program you sent me. I noticed that I have to debug as an > > Android to get the > > Log.d statements to work. > > > ************************************************************ > > > package com.needham.RxBcast; > > > import android.content.BroadcastReceiver; > > import android.content.ComponentName; > > import android.content.Context; > > import android.content.Intent; > > import android.util.Log; > > > public class RxBcast extends BroadcastReceiver { > > > private static final String TAG = "RxBcast77"; > > private static final int NOTE_ID = 1; > > > @Override > > public void onReceive(Context c, Intent i) { > > // check and handle registerable actions > > String act = i.getAction(); > > Log.d(TAG, "Rxd7777 "+ act ); > > if( act.equals(i.ACTION_BOOT_COMPLETED) ) { > > Intent si = new Intent(c, PiesOfCodActivity.class); > > si.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > c.startActivity(si); > > } > > } // onReceive > > > } > > > ********************************************************************* > > package com.needham.RxBcast; > > > import android.app.Activity; > > import android.os.Bundle; > > import android.util.Log; > > import android.widget.TextView; > > > public class PiesOfCodActivity extends Activity { > > /** Called when the activity is first created. */ > > > private static final String TAG = "RxBcast77"; > > > public void onCreate(Bundle savedInstanceState) { > > > Log.d(TAG, "POCA777 "+ savedInstanceState ); > > super.onCreate(savedInstanceState); > > TextView tv = new TextView(this); > > tv.setText("Hello, Pies of Cod!"); > > setContentView(tv); > > } > > } > > > > ****************************************************************************** > > <?xml version="1.0" encoding="utf-8"?> > > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > > package="com.needham.RxBcast" > > android:versionCode="1" > > android:versionName="1.0" > > > > <uses-sdk android:minSdkVersion="7" /> > > <uses-permission > > android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> > > > <application > > android:icon="@drawable/ic_launcher" > > android:label="@string/app_name" > > > <activity > > android:name=".PiesOfCodActivity" > > android:label="@string/app_name" > > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > > <category android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </activity> > > > <!-- android.intent.action.BOOT_COMPLETED --> > > <receiver android:name="com.needham.PiesOfCod.RxBcast" > > > <intent-filter> > > <action android:name="android.intent.action.BOOT_COMPLETED" /> > > </intent-filter> > > <intent-filter> > > <action android:name="com.needham.PiesOfCode.LAUNCH_APP" /> > > </intent-filter> > > </receiver> > > > </application> > > </manifest> > > > On Feb 23, 2:16 pm, Ted Scott <[email protected] > > <mailto:[email protected]>> wrote: > > > On 2/23/2012 11:18 AM, Thomas wrote:> 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. > > > > > ******* 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/ > > > > Looks like a configuration issue. Before you started > > experimenting, did > > > you get the stuff I posted working? > > > > What's in your manifest? What does your project's code tree look > > like? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to > > [email protected] > > <mailto:[email protected]> > > To unsubscribe from this group, send email to > > [email protected] > > <mailto:android-developers%[email protected]> > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > > -- > > YuviDroid > > Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a > > widget to quickly access your favorite apps and contacts!) > >http://android.yuvalsharon.net > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

