안녕하세요~
오늘 연속으로 질문을 드리네요..
stackoverflow에서 해당 문제에 대해 답변이 많은데
도저히 이해가 안되서요..
<receiver android:name="패키지명.AccessService$idpwBroadcast">
<intent-filter>
<action android:name="패키지명.idpw" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
이렇게 매니페스트에 넣었습니다.
Intent broadIntent = new Intent("패키지명.idpw");
broadIntent.putExtra("id",idStr);
broadIntent.putExtra("pw",pwStr);
sendBroadcast(broadIntent);
요렇게 값을 보내서
public class idpwBroadcast extends BroadcastReceiver {
public idpwBroadcast (){}
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
Log.e("리시버","응 값 받았음"+action);
if (action.equals("com.sgt.test.servicetest.idpw")) {
getID = intent.getStringExtra("id");
getPW = intent.getStringExtra("pw");
Log.e("리시버","응 값 받았음"+"\n"+getID+", "+getPW);
}
}
}
요렇게 값을 받아왔구요!
근데 이게 문제가 발생을합니다...
java.lang.RuntimeException: Unable to instantiate receiver 패키지명.AccessService$idpwBroadcast: java.lang.InstantiationException: java.lang.Class<패키지명.AccessService$idpwBroadcast> has no zero argument constructor
디폴트 생성자가 없다고... 분명 떡하니있는데 말이죠...
아 그리고 저 리시버는 extends AccessibilityService{ }의 내부에 생성되어있습니다!
답변 부탁드리고 감사합니다ㅠㅠ