Code example for AppWidgetHost

Methods: stopListening

    protected void 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);
		menu.add(0,1,0,"À§Á¬ Ãß°¡");
		menu.add(0,2,0,"»ùÇÃ 2");
		menu.add(0,3,0,"»ùÇÃ 3");
	public boolean onContextItemSelected (MenuItem item){
		switch (item.getItemId())	{
		case 1: 
        	Intent i = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
        	int a = host.allocateAppWidgetId();
Stop searching for code, let great code find you!  Add Codota to your java IDE