헉... 마우스 제스쳐 땜시 꺼져버렸는데 ㅜㅜ 자동저장땜에 불러와졌네요 ~~~ 휴 ㅎㅎㅎ 운영자님 고맙습니다.
----------------------
안녕하세요 ^^;; 되도록 검색을 이용하는데 - -;;
몇 가지 가이드만 좀 부탁드립니다 ^^;;
문제는
1. 에뮬에서 어플을 띄우고
telnet>geo fix 100 200
telnet>geo fix 200 100
이렇게 해나가면 어플에서는 변경된 위치정보를 잘 받아옵니다.
그런데 제 폰(모토로이,안드로이드2.0)으로 포팅하면 위성수신 아이콘은 올라오는데
이게 LocationListener.onLocationChanged()가 호출이 되지 않습니다...
1,2분 뒤에 다시 한번 로직이 수행되어도 getLastKnownLocation은 null을 리턴하고
onLocationChanged()도 수행이 되질 않습니다....
에뮬에서는 별다른 어려움이 없었는데 혹시 폰에서는 추가 적으로 고려해줘야 되는 부분이 있을런지요 ^^;;
조언이나 방향이라도 좀 부탁드리겠습니다.
고맙습니다 :)
대략의 코드를 보면 다음과 같습니다.
----------------------------------------------------------------------------------------------
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
----------------------------------------------------------------------------------------------
/* Location 정보 조회 */
LocationManager locationManager = (LocationManager)ctx.getSystemService(ctx.LOCATION_SERVICE);
Location lastLocation = locationManager.getLastKnownLocation("gps");
if (lastLocation == null) {
locationManager.requestLocationUpdates("gps", 60000, 1.0f, locationListener);
Log.i("@@SmsVerifier", "lastLocation is null");
} else {
smsInfo.setLatitude(lastLocation.getLatitude());
smsInfo.setLongtitude(lastLocation.getLongitude());
Log.i("@@SmsVerifier", "lastLocation is not null :" + lastLocation.toString());
}
----------------------------------------------------------------------------------------------
public class MyLocationListener implements LocationListener {
@Override
public void onLocationChanged(Location location) {
Log.d("@@LOCATION", "위도" + location.getLatitude());
Log.d("@@LOCATION", "경도" + location.getLongitude());
}
}
----------------------------------------------------------------------------------------------
그리고 로그는 다음과 같습니다.
02-16 00:19:28.733: DEBUG/GpsLocationProvider(1321): setMinTime 60000
02-16 00:19:28.733: DEBUG/GpsLocationProvider(1321): startNavigating
02-16 00:19:28.741: INFO/MotGpsHal(1321): HAL: Sending periodic request to Location SP with dl_lcs_nmea_hal = 1.
02-16 00:19:28.764: INFO/@@SmsVerifier(5621): lastLocation is null
02-16 00:19:28.819: INFO/MotGpsHal(1321): Sending Session BEGIN to App
02-16 00:19:28.819: DEBUG/GpsLocationProvider(1321): Acquiring wakelock
02-16 00:19:28.835: VERBOSE/SmsReceiverService(5676): block_tuns_on: false
02-16 00:19:28.835: VERBOSE/Telephony(5676): getOrCreateThreadId uri: content://mms-sms/threadID?recipient=01027399278
02-16 00:19:28.858: VERBOSE/Telephony(5676): getOrCreateThreadId cursor cnt: 1
02-16 00:19:28.858: VERBOSE/Telephony(5676): getOrCreateThreadId uri: content://mms-sms/threadID?recipient=01027399278
02-16 00:19:28.882: VERBOSE/Telephony(5676): getOrCreateThreadId cursor cnt: 1
02-16 00:19:28.921: DEBUG/ContactsProvider2(5337): query default
02-16 00:19:29.092: VERBOSE/MediaProvider(5361): enter query, uri: content://media/external/audio/media/9
02-16 00:19:29.092: DEBUG/MediaPlayer(1321): Couldn't open file on client side, trying server side
02-16 00:19:29.092: VERBOSE/MediaProvider(5361): enter query, uri: content://media/external/audio/media/9
02-16 00:19:29.100: DEBUG/NotificationService(1321): updateLightsNotification lights enable=0
02-16 00:19:29.100: INFO/NotificationService(1321): setPeriodicLocked enabled=0 mScreenOn=true
02-16 00:19:29.116: ERROR/MediaPlayerService(1204): Couldn't open fd for content://media/external/audio/media/9
02-16 00:19:29.116: ERROR/MediaPlayer(1321): Unable to to create media player
02-16 00:19:29.163: WARN/NotificationService(1321): error loading sound for content://media/external/audio/media/9
02-16 00:19:29.163: WARN/NotificationService(1321): java.io.IOException: setDataSource failed.: status=0x80000000
02-16 00:19:29.163: WARN/NotificationService(1321): at android.media.MediaPlayer.setDataSource(Native Method)
02-16 00:19:29.163: WARN/NotificationService(1321): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:699)
02-16 00:19:29.163: WARN/NotificationService(1321): at android.media.AsyncPlayer.startSound(AsyncPlayer.java:62)
02-16 00:19:29.163: WARN/NotificationService(1321): at android.media.AsyncPlayer.access$200(AsyncPlayer.java:33)
02-16 00:19:29.163: WARN/NotificationService(1321): at android.media.AsyncPlayer$Thread.run(AsyncPlayer.java:99)
02-16 00:19:29.452: DEBUG/ContactsProvider2(5337): query PHONE_LOOKUP
02-16 00:19:29.475: ERROR/ContactsReceiver(5337): updateUricontent://com.android.contacts/phone_lookup/01027399278
02-16 00:19:30.616: VERBOSE/SUPLJ(1321): msg length: 36
02-16 00:19:30.616: VERBOSE/SUPLJ(1321): Read packet: 31 bytes
02-16 00:19:30.616: DEBUG/SUPLJ(1321): package:
02-16 00:19:30.616: DEBUG/SUPLJ(1321): [ 0x09 0x01 0x1d 0x00 0x00 0x00 0x01 0x00 ]
02-16 00:19:30.616: DEBUG/SUPLJ(1321): [ 0x00 0x00 0x00 0x1c 0x6b 0x00 0x00 0x00 ]
02-16 00:19:30.616: DEBUG/SUPLJ(1321): [ 0x01 0x0d 0x77 0x70 0x64 0x65 0x2e 0x6e ]
02-16 00:19:30.616: DEBUG/SUPLJ(1321): [ 0x61 0x74 0x65 0x2e 0x63 0x6f 0x6d ]
02-16 00:19:30.616: DEBUG/SUPLJ(1321): Handle SubCMD OPEN_SOCK_REQ
02-16 00:19:30.639: DEBUG/SUPLJ(1321): Message Received:1
02-16 00:19:30.639: DEBUG/SUPLJ(1321): CmdId:56 addressType:1 mHost:wpde.nate.com mPort:7275
02-16 00:19:30.639: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151944.787,,,,,0,,,,,,,,*7C
02-16 00:19:30.639: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151944.787,A*0B
02-16 00:19:30.639: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:30.639: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:30.639: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151944.787,,,,,,,,150210,,E*3F
02-16 00:19:30.639: DEBUG/SUPLJ(1321): Opening SocketChannel...
02-16 00:19:31.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151945.787,,,,,0,,,,,,,,*7D
02-16 00:19:31.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151945.787,A*0A
02-16 00:19:31.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:31.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:31.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151945.787,,,,,,,,150210,,E*3E
02-16 00:19:32.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151946.787,,,,,0,,,,,,,,*7E
02-16 00:19:32.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151946.787,A*09
02-16 00:19:32.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:32.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:32.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151946.787,,,,,,,,150210,,E*3D
02-16 00:19:33.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151947.787,,,,,0,,,,,,,,*7F
02-16 00:19:33.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151947.787,A*08
02-16 00:19:33.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:33.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:33.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151947.787,,,,,,,,150210,,E*3C
02-16 00:19:34.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151948.787,,,,,0,,,,,,,,*70
02-16 00:19:34.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151948.787,A*07
02-16 00:19:34.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:34.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:34.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151948.787,,,,,,,,150210,,E*33
02-16 00:19:34.655: DEBUG/dalvikvm(4067): GC freed 99 objects / 4384 bytes in 101ms
02-16 00:19:35.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151949.787,,,,,0,,,,,,,,*71
02-16 00:19:35.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151949.787,A*06
02-16 00:19:35.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:35.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:35.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151949.787,,,,,,,,150210,,E*32
02-16 00:19:36.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151950.787,,,,,0,,,,,,,,*79
02-16 00:19:36.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151950.787,A*0E
02-16 00:19:36.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:36.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:36.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151950.787,,,,,,,,150210,,E*3A
02-16 00:19:37.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151951.787,,,,,0,,,,,,,,*78
02-16 00:19:37.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151951.787,A*0F
02-16 00:19:37.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:37.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:37.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151951.787,,,,,,,,150210,,E*3B
02-16 00:19:38.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151952.787,,,,,0,,,,,,,,*7B
02-16 00:19:38.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151952.787,A*0C
02-16 00:19:38.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:38.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:38.600: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151952.787,,,,,,,,150210,,E*38
02-16 00:19:39.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151953.787,,,,,0,,,,,,,,*7A
02-16 00:19:39.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151953.787,A*0D
02-16 00:19:39.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:39.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:39.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151953.787,,,,,,,,150210,,E*39
02-16 00:19:39.686: DEBUG/dalvikvm(3604): GC freed 87 objects / 3320 bytes in 133ms
02-16 00:19:40.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151954.787,,,,,0,,,,,,,,*7D
02-16 00:19:40.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151954.787,A*0A
02-16 00:19:40.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:40.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:40.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151954.787,,,,,,,,150210,,E*3E
02-16 00:19:41.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151955.787,,,,,0,,,,,,,,*7C
02-16 00:19:41.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151955.787,A*0B
02-16 00:19:41.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:41.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:41.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151955.787,,,,,,,,150210,,E*3F
02-16 00:19:42.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151956.787,,,,,0,,,,,,,,*7F
02-16 00:19:42.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151956.787,A*08
02-16 00:19:42.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:42.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:42.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151956.787,,,,,,,,150210,,E*3C
02-16 00:19:43.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151957.787,,,,,0,,,,,,,,*7E
02-16 00:19:43.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151957.787,A*09
02-16 00:19:43.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:43.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:43.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151957.787,,,,,,,,150210,,E*3D
02-16 00:19:44.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151958.787,,,,,0,,,,,,,,*71
02-16 00:19:44.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151958.787,A*06
02-16 00:19:44.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:44.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:44.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151958.787,,,,,,,,150210,,E*32
02-16 00:19:45.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,151959.787,,,,,0,,,,,,,,*70
02-16 00:19:45.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,151959.787,A*07
02-16 00:19:45.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:45.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:45.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,151959.787,,,,,,,,150210,,E*33
02-16 00:19:46.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152000.787,,,,,0,,,,,,,,*76
02-16 00:19:46.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152000.787,A*01
02-16 00:19:46.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:46.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:46.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152000.787,,,,,,,,150210,,E*35
02-16 00:19:47.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152001.787,,,,,0,,,,,,,,*77
02-16 00:19:47.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152001.787,A*00
02-16 00:19:47.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:47.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:47.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152001.787,,,,,,,,150210,,E*34
02-16 00:19:48.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152002.787,,,,,0,,,,,,,,*74
02-16 00:19:48.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152002.787,A*03
02-16 00:19:48.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:48.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:48.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152002.787,,,,,,,,150210,,E*37
02-16 00:19:49.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152003.787,,,,,0,,,,,,,,*75
02-16 00:19:49.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152003.787,A*02
02-16 00:19:49.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:49.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:49.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152003.787,,,,,,,,150210,,E*36
02-16 00:19:50.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152004.787,,,,,0,,,,,,,,*72
02-16 00:19:50.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152004.787,A*05
02-16 00:19:50.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:50.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:50.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152004.787,,,,,,,,150210,,E*31
02-16 00:19:51.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152005.787,,,,,0,,,,,,,,*73
02-16 00:19:51.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152005.787,A*04
02-16 00:19:51.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:51.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:51.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152005.787,,,,,,,,150210,,E*30
02-16 00:19:52.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152006.787,,,,,0,,,,,,,,*70
02-16 00:19:52.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152006.787,A*07
02-16 00:19:52.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:52.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:52.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152006.787,,,,,,,,150210,,E*33
02-16 00:19:53.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152007.787,,,,,0,,,,,,,,*71
02-16 00:19:53.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152007.787,A*06
02-16 00:19:53.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:53.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:53.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152007.787,,,,,,,,150210,,E*32
02-16 00:19:54.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152008.787,,,,,0,,,,,,,,*7E
02-16 00:19:54.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152008.787,A*09
02-16 00:19:54.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:54.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:54.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152008.787,,,,,,,,150210,,E*3D
02-16 00:19:55.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152009.787,,,,,0,,,,,,,,*7F
02-16 00:19:55.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152009.787,A*08
02-16 00:19:55.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:55.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:55.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152009.787,,,,,,,,150210,,E*3C
02-16 00:19:56.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152010.787,,,,,0,,,,,,,,*77
02-16 00:19:56.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152010.787,A*00
02-16 00:19:56.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:56.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:56.632: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152010.787,,,,,,,,150210,,E*34
02-16 00:19:57.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152011.787,,,,,0,,,,,,,,*76
02-16 00:19:57.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152011.787,A*01
02-16 00:19:57.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:57.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:57.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152011.787,,,,,,,,150210,,E*35
02-16 00:19:58.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152012.787,,,,,0,,,,,,,,*75
02-16 00:19:58.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152012.787,A*02
02-16 00:19:58.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:58.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:58.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152012.787,,,,,,,,150210,,E*36
02-16 00:19:59.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152013.787,,,,,0,,,,,,,,*74
02-16 00:19:59.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152013.787,A*03
02-16 00:19:59.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:19:59.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:19:59.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152013.787,,,,,,,,150210,,E*37
02-16 00:20:00.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152014.787,,,,,0,,,,,,,,*73
02-16 00:20:00.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGLL,,,,,152014.787,A*04
02-16 00:20:00.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGSA,A,1,,,,,,,,,,,,,,,*1E
02-16 00:20:00.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPVTG,0.0,T,,M,0.0,N,0.0,K*60
02-16 00:20:00.624: INFO/MotGpsHal(1321): Sending nmea string to App $GPRMC,152014.787,,,,,,,,150210,,E*30
02-16 00:20:00.858: DEBUG/SUPLJ(1321): Result of select(): 0
02-16 00:20:00.858: ERROR/SUPLJ(1321): Timeout
02-16 00:20:00.928: ERROR/SUPLJ(1321): IOException
02-16 00:20:00.928: ERROR/SUPLJ(1321): java.io.IOException: Connect failed
02-16 00:20:00.928: ERROR/SUPLJ(1321): at com.motorola.android.locationproxy.SuplDataService.openPlainTextConnection(SuplDataService.java:290)
02-16 00:20:00.928: ERROR/SUPLJ(1321): at com.motorola.android.locationproxy.SuplDataService.handleMessage(SuplDataService.java:113)
02-16 00:20:00.928: ERROR/SUPLJ(1321): at android.os.Handler.dispatchMessage(Handler.java:99)
02-16 00:20:00.928: ERROR/SUPLJ(1321): at android.os.Looper.loop(Looper.java:123)
02-16 00:20:00.928: ERROR/SUPLJ(1321): at com.android.server.LocationProxyService.run(LocationProxyService.java:344)
02-16 00:20:00.928: ERROR/SUPLJ(1321): at java.lang.Thread.run(Thread.java:1096)
02-16 00:20:00.952: WARN/System.err(1321): java.io.IOException: Connect failed
02-16 00:20:00.960: WARN/System.err(1321): at com.motorola.android.locationproxy.SuplDataService.openPlainTextConnection(SuplDataService.java:290)
02-16 00:20:00.975: WARN/System.err(1321): at com.motorola.android.locationproxy.SuplDataService.handleMessage(SuplDataService.java:113)
02-16 00:20:00.975: WARN/System.err(1321): at android.os.Handler.dispatchMessage(Handler.java:99)
02-16 00:20:00.991: WARN/System.err(1321): at android.os.Looper.loop(Looper.java:123)
02-16 00:20:00.991: WARN/System.err(1321): at com.android.server.LocationProxyService.run(LocationProxyService.java:344)
02-16 00:20:00.999: WARN/System.err(1321): at java.lang.Thread.run(Thread.java:1096)
02-16 00:20:01.014: DEBUG/SUPLJ(1321): findAndRemoveRequestFromList: Found REQUEST: id=56
02-16 00:20:01.014: INFO/SUPLJ(1321): Request:OPEN_SOCK_RES
02-16 00:20:01.030: INFO/SUPLJ(1321): Session [1], transaction [29]
02-16 00:20:01.030: DEBUG/SUPLJ(1321): package:
02-16 00:20:01.030: DEBUG/SUPLJ(1321): [ 0x50 0x00 0x10 0x0a 0x01 0x1d 0x00 0x00 ]
02-16 00:20:01.046: DEBUG/SUPLJ(1321): [ 0x00 0x01 0xff 0xff 0xff 0xff 0xcf 0xb0 ]
02-16 00:20:01.046: INFO/SUPLJ(1321): writing packet: 16 bytes
02-16 00:20:01.053: INFO/DumpStateReceiver(1321): Added state dump to 1 crashes
02-16 00:20:01.616: INFO/MotGpsHal(1321): Sending nmea string to App $GPGGA,152
적으신 문제는 메소드의 문제보다는 수신이 안되는 문제인것 같습니다. 적어도 업데이트가 되려면 위치정보가 수신이 되어야하니까요.
이 문제는 실내이고, wifi가 잡히는 위치라면 AP의 위치정보를 가져올수 있는데, 그걸 이용하시면 됩니다.
매니페스트에서 ACCESS_COARSE_LOCATION 퍼미션을 추가해주시고, 소스상에서 Criteria 클래스로 정보제공자 선택하는 부분이있는데 그곳에서도 FINE_LOCATION을 COARSE_LOCATION으로 수정해주시면 됩니다.
마지막으로, 모토로이 쓰신다면 설정에 가서셔 위치 및 보안(?) 들어가시면 상위에 세가지 옵션있는데 모두 체크해주세요.
도움이 되셨길 바랍니다..
비슷 한 경험인지 모르겠지만 저는 겔럭시S 2대를 돌력 보고 있는 중입니다.
겔럭시S 프로요 버전은 onStatusChanged(String arg0, int arg1, Bundle arg2)을 정상적으로 호출 하고 있지만
겔럭시S 진저 버전은 onStatusChanged(String arg0, int arg1, Bundle arg2)을 호출을 하지 못하고 있습니다.
어떤 문제인지 저도 찾아 보고 있지만 답을 알 수가 없네요.
문제 푸실 때 이 자료도 참고 하시면 좋을 듯 싶네요.
저도 열심히 찾아 보겠습니다.
에뮬에서 정상적으로 동작하는데, 실제 폰에 넣고해보니 onLocationChanged 이 호출되지 않았습니다.
모토로이는 아니고 실제 개발중인 폰이 였는데, 문제는 모뎀에서 정상적으로 위도, 경로를 읽어오지만 masking 을 정상적으로
하지 않아 frameworks(JNI) 에서 위도, 경도를 전달해주는 callback 함수를 호출하지 못하여 발생한 문제였습니다.
결국 모뎀쪽을 수정해서 위도, 경도는 정상적으로 가져오도록 했습니다.
모토로이가 아니라 님께서 질문하신 문제와는 일치하지 않지만, application layer 아랫단의 문제로 인하여 어플이케이션이 동작하지
않는 경우도 있다는 것을 알려드릴려고 몇자 적습니다.
재밌는 것은 모토로이는 nmea를 MotGpsHal(아마도 android 의 HAL) 에서 올려주고 있네요. ^^
도움이 되었는지 모르겠습니다.