Code example for Intent

Methods: getBroadcastputExtrasetActionsetData

	 * @param buttonCode 
	 * @param widgetId 
	public static void setupWidgetButton(RemoteViews remoteView, int viewId, Context context, Object caller,  String buttonCode, int widgetId, String uri, String action){
        Intent active = new Intent(context, caller.getClass());
        active.putExtra(COMMAND, buttonCode);
        // Make this pending intent unique to prevent updating other intents 
        Uri data = Uri.withAppendedPath(Uri.parse(uri + "://widget/id/#"+buttonCode), String.valueOf(widgetId));	
        remoteView.setOnClickPendingIntent(viewId, PendingIntent.getBroadcast(context, 0, active, PendingIntent.FLAG_UPDATE_CURRENT));
Stop searching for code, let great code find you!  Add Codota to your java IDE