• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Unable to instantiate service

I have a BroadcastReceiver that seems to work, but when it tires to call my IntentService it bombs out saying that it's, "Unable to instantiate service". Below is some of my code:

Broadcast Receiver:
Code:
public my_receiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
        if(intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING) && sPrefs.getBoolean("enabled", false))
        {
            context.startService(new Intent(context,my_intent.class));
        }
    }
    
}
IntentService
Code:
public class my_intent extends IntentService{
    
    public my_intent(String name) {
        super("my_intent");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        android.os.Debug.waitForDebugger();
        Context context = getBaseContext();
        SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
...
Any help would be appreciated!
 
Back
Top Bottom