Code example for RemoteViews

0
	protected static void updateAppWidget( Context context, AppWidgetManager appWidgetManager, int appWidgetId, boolean use24,
			Date date, int layoutId )
	{ 
		Constants.log( "ClockAppWidgetProvider::updateAppWidget. appWidgetId=" + appWidgetId + ", layoutId=" + layoutId );
		 
		RemoteViews remoteView = new RemoteViews( context.getPackageName(), layoutId );
		setPendingIntent( context, remoteView );
		updateAppWidget( appWidgetManager, appWidgetId, use24, date, remoteView );
	} 
 
	/** 
	 * @param context 
	 * @param remoteView 
	 */ 
	protected static void setPendingIntent( Context context, RemoteViews remoteView )
	{ 
		Intent alarmIntent = new Intent( Intent.ACTION_MAIN ).addCategory( Intent.CATEGORY_LAUNCHER );
		ComponentName alarmName = getComponentName();
		alarmIntent.setComponent( alarmName );
		PendingIntent pendingIntent = PendingIntent.getActivity( context, 0, alarmIntent, 0 );
Connect your IDE to all the code out there  Get Codota for Java