Code example for AppWidgetHost

Methods: deleteAppWidgetId

0
		btn.setOnClickListener(new OKBtnOnClickListener());
 
	} 
 
	public void removeWidget(int appWidgetId) {
		AppWidgetHost host = new AppWidgetHost(this, 1);
		host.deleteAppWidgetId(appWidgetId);
		host.deleteAppWidgetId(appWidgetId);
	} 
	 
	Boolean Canceled = true; 
	  
	@Override  
	protected void onPause() {  
		if(Canceled){
			//removeWidget(mAppWidgetId); 
		} 
		 
		super.onPause();  
	}