5
조치를 수행하기 위해 끝내면 내 서비스에 알려야합니다. 그래서 나는 서비스 및 A PendingIntent
를 보내려면, 그래서Intent 내 서비스에 PendingIntent를 보내는 방법
PendingIntent pendingIntent;
Intent newInt;
newInt = new Intent(Intent.ACTION_SENDTO);
newInt.setData(Uri.parse("sms:052373"));
newInt.putExtra("sms_body", "The SMS text");
pendingIntent = PendingIntent.getActivity(this, 0, newInt, 0);
이제 문제는 어떻게 pendingIntent
pendingIntent
에 첨부하기 시작 (PendingIntent.send()
를 사용하여)을 시작할 수 있나요?
NewIntent.putExtra("pendingIntent",pendingIntent);
startService(NewIntent);
을하지만 그것은 작동하지 않습니다
내가 예를 들어이 시도.그리고 서비스
:PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra("pendingIntent");
pendingIntent.send();
을 "하지만이 작동하지 않습니다는"증상의 쓸모없는 설명입니다. – CommonsWare
감사합니다. 다음 번에는 send()에 대해 – Aminadav