public class AlarmReceiver extends BroadcastReceiver {
public void onReceive(final Context context, Intent intent) {
//Toast.makeText(context, "Hi", Toast.LENGTH_LONG).show();
//final Context mContext = context;
final LinearLayout linear = (LinearLayout)View.inflate(context, R.layout.write_pw, null);
new AlertDialog.Builder(context)
.setTitle("비밀번호를 입력하세요.")
.setView(linear)
.setPositiveButton("확인",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
// TODO Auto-generated method stub
Toast.makeText(context, "Hi", Toast.LENGTH_LONG).show();
}
}).show();
}
}
알람이 끝나면 다이어로그를 띄워 작업할 계획인데요~
BroadcastReceiver를 상속받은 클래스에 다이어로그를 띄우게 했습니다만 컴파일 오류는 없구 알람끝나면 멈춰버려서 디버깅해보니
final LinearLayout linear = (LinearLayout)View.inflate(context, R.layout.write_pw, null);
여기서 자꾸 걸리더라구요...
근데, 뭐가 잘못됏는지 모르겟어서요..혹시 아시면 답변좀 달아주세요~



