Code example for AppWidgetHost

Methods: startListening

0
    } 
     
    @Override 
    protected void onStart() { 
    	super.onStart(); 
    	host.startListening();	//start to listen widget related broadcast event.
    } 
     
    @Override 
    protected void onStop() { 
    	super.onStop(); 
    	host.stopListening();	//stop to listen widget related broadcast event.
    } 
     
	public void onCreateContextMenu (ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo){
		super.onCreateContextMenu(menu, v, menuInfo);
		Log.i("Q",Integer.toString(v.getId()));
		menu.add(0,1,0,"À§Á¬ Ãß°¡");
		menu.add(0,2,0,"»ùÇÃ 2");
		menu.add(0,3,0,"»ùÇÃ 3");
	}