Code example for RemoteViews

		else return R.layout.main_phone; 
	public static void beginListen(Context cont)
		RemoteViews remote = new RemoteViews( cont.getPackageName(), getLayout(cont) );
		beginListen(cont, remote);
	public static void beginListen(Context cont, RemoteViews remote)
		Intent prefAct = new Intent(cont, PreferencesActivity.class);
		PendingIntent prefActP = PendingIntent.getActivity( cont, 0, prefAct, 0); 
		setListener(cont, prefActP,, remote);
		Intent weathAct = new Intent(cont, WeatherActivity.class);
		PendingIntent weathActP = PendingIntent.getActivity( cont, 0, weathAct, 0);
		setListener(cont, weathActP,, remote);
		Intent faceAct = new Intent(cont, FaceActivity.class);
Connect your IDE to all the code out there  Get Codota for Java