Page 927 - 3-2
P. 927
for (int i=0;i<ja1;i++) {
if (det1 == 0 && notFlag == 0) {
Log.d(this.getClass().getName(), "for 문 진입");
if (fireData[1].equals(MainActivity.callval)) {
Log.d(this.getClass().getName(), "1 차 if 문 진입");
if (fireData[3].equals("1")) {
Log.d(this.getClass().getName(), "2 차 if 문 진입");
MainActivity.room = String.valueOf(fireData[2]);
textAl = " 불남";
} else {
textAl = " 안전";
}
}
}
else if(notFlag==1) {
if(fire.equals("1"))
textAl = " 불남";
else
textAl = " 안전";
}
}
for (int i=0;i<ja1;i++) {
Log.d(this.getClass().getName(), "not_for 문 진입");
if (notFire[0].equals("1") || notFire[1].equals("1") ||
notFire[2].equals("1"))
{
Log.d(this.getClass().getName(), "not_if 문 진입");
++notFlag;
if(notFlag==1) {
if(notFire[0].equals("1")) {
NotificationManager manager = (NotificationManager)
getSystemService(NOTIFICATION_SERVICE);
NotificationCompat.Builder builder = new
NotificationCompat.Builder(getApplicationContext());
builder.setSmallIcon(R.drawable.on)
.setTicker("HETT")
.setContentTitle(notAddr[0]+" 호 "+disRoom[0]+
" 에서 불이났습니다!")
.setContentText(" 도망가세요!")
.setDefaults(Notification.DEFAULT_SOUND |
Notification.DEFAULT_LIGHTS |
Notification.DEFAULT_VIBRATE)
.setAutoCancel(true); // 알림바에서 자동 삭제
- 927 -