2010-08-05 3 views

답변

0

사용 RemoteViews.setOnClickPendingIntent (R.id.view_id, 의도)하는 방법. intent 매개 변수는 매니페스트 파일의 필터와 일치하는 올바른 형식의 Intent 객체 여야합니다.

1

app-widget의 핸들 클릭 이벤트에 RemoteViews.setOnClickPendingIntent(R.id.view_id, intent) method을 사용할 수 있습니다. (한 String.valueOf를 INT은 widgetid =있는 Integer.parseInt; 자세한 정보는 링크

Click here

0
 Intent intent = new Intent(context, Activity.class); 
     Uri widgetId = Uri.parse("" + appWidgetId); // this line means 
     intent.setData(widgetId); // you can send a widget id 
     PendingIntent pintent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); 

     views.setOnClickPendingIntent(R.id.clickButtoninWidget, pintent); 
     return views; 
+0

아래를 참조 할 수 있습니다 당신은 위젯 ID가이 –

+0

열린 uriWidgetId = getIntent()있는 GetData() 좋아받을 수 있습니다. (uriWidgetId)); –