I am making an flash application an i want to have a On/Off button in the notification bar and on that button click i want to perform some action. What i am doing is this...
    Intent switchIntent = new Intent(this, switchOffButtonListener.class);
    PendingIntent pendingSwitchIntent = PendingIntent.getBroadcast(this, 0,
            switchIntent, 0);
    remoteViews.setOnClickPendingIntent(R.id.closeOnFlash,
            pendingSwitchIntent);
but i want to do this how can i do this
  //switchOffButtonListener notificationOnOff= new switchOffButtonListener(flash,soundFlashing,closeOnFlash);
    Intent switchIntent = new Intent(this, notificationOnOff);
    PendingIntent pendingSwitchIntent = PendingIntent.getBroadcast(this, 0,
            switchIntent, 0);
    remoteViews.setOnClickPendingIntent(R.id.closeOnFlash,
            pendingSwitchIntent);
i know intent only take class not the object but i want to pass the classes object into the onRecieve f BroadCast Reciever and want to use them there can anyone help me how i can do this, i read links but wasn't able to apply. Sorry if this is a silly question i am new to Android Programming so please help me out even it's foolish to ask.
 
     
    