2012. 8. 27. 09:14
package com.lge.gps.notification;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class GPSnotification extends Activity {
    /** Called when the activity is first created. */
 public static final String GPS_FIX_CHANGE_ACTION =
        "android.location.GPS_FIX_CHANGE";
 public static final String EXTRA_ENABLED = "enabled";
 public static final String GPS_ENABLED_CHANGE_ACTION =
        "android.location.GPS_ENABLED_CHANGE";
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button gps1 = (Button)findViewById(R.id.Button01);
        Button gps2 = (Button)findViewById(R.id.Button02);
        Button gps3 = (Button)findViewById(R.id.Button03);
        gps1.setOnClickListener(new OnClickListener() {    //fix
   @Override
   public void onClick(View v) {
    // send an intent to notify that the GPS is no longer receiving fixes.
             Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
             intent.putExtra(EXTRA_ENABLED, true);
             sendBroadcast(intent);
   }
  });
        gps2.setOnClickListener(new OnClickListener() {   //icon 없앰
   
   @Override
   public void onClick(View v) {
    Intent intent = new Intent(GPS_ENABLED_CHANGE_ACTION);
             intent.putExtra(EXTRA_ENABLED, false);
             sendBroadcast(intent);
   }
  });
        gps3.setOnClickListener(new OnClickListener() {   //gps on  깜박깜박
   @Override
   public void onClick(View v) {
    Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
             intent.putExtra(EXTRA_ENABLED, false);
             sendBroadcast(intent);
   }
  });
        

 
    }
}

'아카이브 ~2019 > GPS' 카테고리의 다른 글

WM에서의 GPS 구동 원리 설명(GPSGate 등의 사용, XTRA, SNTP)  (0) 2012.08.27
GPS 아이콘 BroadcastReceiver  (0) 2012.08.27
GPS Architecture 분석 1  (0) 2011.01.28
GPS Architecture 정리중....  (0) 2011.01.27
XTRA ?  (0) 2011.01.27
Posted by hoonihoon
2011. 7. 20. 08:55
모바일기획에 중 한 부분인 비지니스 모델에 관련하여 좋은 글을 찾게 되었다.


-SK  (???)

 구글은 크롬 웹브라우저와 OS 를 막대한 비용을 들여 만들고 꽁자로 뿌리는 이유에 대해 이렇게 설명했다.
도로를 잘 딱아 놓으면 사람들이 알아서 자동차를 많이 구매 할 것이라는 이야기이다.
구글의 오늘은 만든 '오픈,상생 정책'의 핵심이다.  이러한 오픈 정책음 21세기 IT기업들에게 중요한 화두이다.

-기술문화연구소장 (류한석)

 모바일 메시젼 카카오톡은 이용자나 트래픽 측면에서 1단계 성공을 거뒀다. 그러나 이보다 중요한것은 소셜 플랫폼인 2단계 진화이다.  광고나 쇼핑, 게임 등의 서비스가 추가돼 본격적인 수익사업을 하지 못한다면 앱의 성공을 논할 처지가 못 된다.

 위치정보 기반의 '스냅핑커'는 근처 레스토랑 위치와 메뉴를 제공하고 예약과 결제까지 동시에 이루어 진다. 
이를 통해 스냅핑거는 자여업자들에게 수수료를 받는다. Buyer와 Seller 가 만날 수 있는 공간을 제공하는 이른바 플랫폼 비즈니스 앱인것이다.


단순히 광고 넣으면 잘되겠지? 유료로 하면 돈 많이 벌 수 있겠지? 
비용에 의존하기 보다는 비지니스 앱 모델에 좀 더 초점을 맞추는게 우선일 것이다.





'아카이브 ~2019 > 모바일 정보' 카테고리의 다른 글

phone gap 앱개발  (0) 2013.03.29
개발자에게 도움될 만한 IT 기술 블로그  (0) 2013.03.14
WPS(Wi-Fi Positioning System)의 기술요소  (0) 2013.03.06
MVNO 소개  (0) 2012.08.27
MIME TYPE 개념  (0) 2012.08.27
Posted by hoonihoon
2011. 1. 28. 12:14
\frameworks\base\services\java\com\android\server\SystemServer.java
init2() 
public static final void init2() {
        Slog.i(TAG, "Entered the Android system server!");
        Thread thr = new ServerThread();
        thr.setName("android.server.ServerThread");
        thr.start();
 }

ServerThread 에는 powermanager, usbobserver, notificationmanager 외에 모든 서비스를 생성하네요.특히 GPS와 관련된  LocationManagerService 을 생성 합니다.
try {
                location = new LocationManagerService(context);
                ServiceManager.addService(Context.LOCATION_SERVICE, location);
            } catch (Throwable e) {
                Slog.e(TAG, "Failure starting Location Manager", e);
   }

LocationManagerService.java
이곳에서는 Cell-ID/WIFI 를 사용할수있는 coogle 패키지 명을 받아 오네요.
/frameworks/base/core/res/res/values/config.xml   이쪽에서 패키지 값을 가져옵니다.

예전에  froyo 버전에서는 @null 값으로 되어있었네요.  이 부분을 다음과 같이 바꿔주시면 됩니다.

<string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string>

<String name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>

    public LocationManagerService(Context context) {
        super();
        mContext = context;
        Resources resources = context.getResources();
        mNetworkLocationProviderPackageName = resources.getString(
                com.android.internal.R.string.config_networkLocationProvider);
        mGeocodeProviderPackageName = resources.getString(
                com.android.internal.R.string.config_geocodeProvider);
        mPackageMonitor.register(context, true);

        if (LOCAL_LOGV) {
            Slog.v(TAG, "Constructed LocationManager Service");
        }
    }



SMS 분석 때문에 ... 잠시 정리를 미룰께요...



'아카이브 ~2019 > GPS' 카테고리의 다른 글

GPS 아이콘 BroadcastReceiver  (0) 2012.08.27
GPS 아이콘을 변경 예제  (0) 2012.08.27
GPS Architecture 정리중....  (0) 2011.01.27
XTRA ?  (0) 2011.01.27
Android Location Providers – gps, network, passive  (0) 2011.01.27
Posted by hoonihoon
2011. 1. 27. 15:02
frameworks\base\services\java\com\android\server\LocationManagerService.java

\frameworks\base\services\java\com\android\server\location

android\frameworks\base\services\jni\com_android_server_location_GpsLocationProvider.cpp

frameworks\base\location\java\com\android\internal\location

frameworks\base\location\java\android\location



'아카이브 ~2019 > GPS' 카테고리의 다른 글

GPS 아이콘을 변경 예제  (0) 2012.08.27
GPS Architecture 분석 1  (0) 2011.01.28
XTRA ?  (0) 2011.01.27
Android Location Providers – gps, network, passive  (0) 2011.01.27
what is gpsOne? and gpsOne can operate in 4 modes  (0) 2011.01.27
Posted by hoonihoon
2011. 1. 27. 14:33
 My Location 위치를 알려면 GPS가 위성이 있는 위치를 잡아야 하는데, 위성은 초당 50 Bit 만의 정보를 보낼수 있기 때문에 GPS 를 off 했다고 다시 on 하는 경우 수분의 스타트 시간이 걸릴수도 있습니다. 

 XTRA는 위성의 궤적이 일정하다는 원리에서 착안 하여, 인터넷 서버에 위성 궤적을 기록한 40KB 정도 용량의 파일을 올려 놓으면, 이파일은 다운로드 받고 참조해서 위성의 위치를 보다 빨리 잡아 낼수 있습니다.


XTRA 를 받아 오는 native 함수가 있습니다.
private native void native_inject_xtra_data(byte[] data, int length)

XTRA server 는 제조사에서 정해놓았네요.  gps.conf 파일에 있네요. (소스는 공개 불가능)


My ideas..
 GPS 를 가장 빨리 받는 방법은?  XTRA DATA 를 받아오고  cell ID 를 이용해서 위치를 받은다음에  AGP로 위치를 측정 하면 가장 빠르고 정확한 데이터를 얻을수 있지 않을까 생각해 봅니다.


Posted by hoonihoon
2011. 1. 27. 11:16

Introduction

There are 3 network providers in Android (ranging from 1.5 to 2.2). They are:

  1. gps –> (GPS, AGPS) 
    Name of the GPS location provider. This provider determines location using satellites. Depending on conditions, this provider may take a while to return a location fix. Requires the permission android.permission.ACCESS_FINE_LOCATION.
  2. network –> (AGPS, CellID, WiFi MACID) 
    Name of the network location provider. This provider determines location based on availability of cell tower and WiFi access points. Results are retrieved by means of a network lookup. Requires either of the permissions android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION.
  3. passive –> (CellID, WiFi MACID) 
    A special location provider for receiving locations without actually initiating a location fix. This provider can be used to passively receive location updates when other applications or services request them without actually requesting the locations yourself. This provider will return locations generated by other providers. Requires the permission android.permission.ACCESS_FINE_LOCATION, although if the GPS is not enabled this provider might only return coarse fixes.

This is what Android calls these location providers, however, the underlying technologies to make this stuff work is mapped to the specific set of hardware and telco provided capabilities (network service).

Here is a table that maps/lists the underlying technologies in a different way:

Accuracy

Power Usage

Technology

20ft

High

Autonomous GPS, Provider: gps

  1. uses GPS chip on the device
  2. line of sight to the satellites
  3. need about 7 to get a fix
  4. takes a long time to get a fix
  5. doesn’t work around tall buildings

200ft

Medium – Low

Assisted GPS (AGPS), Provider: network

  1. uses GPS chip on device, as well as assistance from the network (cellular network) to provide a fast initial fix
  2. very low power consumption
  3. very accurate
  4. works without any line of sight to the sky
  5. depends on carrier and phone supporting this (even if phone supports it, and network does not then this does not work)

5300ft / 1mile

Low

CellID lookup/WiFi MACID lookup, Provider: network or passive

  1. very fast lock, and does not require GPS chip on device to be active
  2. requires no extra power at all
  3. has very low accuracy; sometimes can have better accuracy in populated and well mapped areas that have a lot of WiFi access points, and people who share their location with Google

Android layers these underlying techniques and technologies into the 3 network providers listed above. There is no good way know exactly what Android will use, since all phones are different. Eg, on VZW network, the LG Ally does NOT have AGPS! The Droid 2 has all providers (AGPS, GPS, CellID, etc). On ATT network, almost all phones tend to have AGPS enabled by default, etc. Varies by network, by coverage area, and by country, and by device. Also, on VZW, the passive provider ends up using Verizon Location Services, which are very inaccurate (less accurate than 1 mile).


Summary

The best way to handle GPS is to use the “network” or “passive” provider first, and then fallback on “gps”, and depending on the task, switch between providers. This covers all cases, and provides a lowest common denominator service (in the worst case) and great service (in the best case).


copy - ScreamingToaster LLC  

thank you!

'아카이브 ~2019 > GPS' 카테고리의 다른 글

GPS 아이콘을 변경 예제  (0) 2012.08.27
GPS Architecture 분석 1  (0) 2011.01.28
GPS Architecture 정리중....  (0) 2011.01.27
XTRA ?  (0) 2011.01.27
what is gpsOne? and gpsOne can operate in 4 modes  (0) 2011.01.27
Posted by hoonihoon
2011. 1. 27. 11:07
Definition

gpsOne is the brand name for a cell phone chipset manufactured by Qualcomm that allows cell phones to more accurately plot a user’s position.

Using a technology referred to as A-GPS or Assisted-GPS. For differences between GPS and A-GPS methods

Standalone
  
GPS를 통해 자신의 위치를 측정하는방식으로 기지국이나 다른장치를이용하지 않고 스스로 자기위치를 파악.여러개의 위성신호를 직접 수신하면서 위치를 파악해낸다.  휴대폰 GPS의 경우 gps를 켜도 초기 측정시간이 1분정도 걸리나1초당 1회 위치를 측정할 수 있어 네비게이션 응용에 적용될수있다.


MS-Based

Cold start 에서 first fix 시간이 1분 정도 걸린다. 그러므로 first fix  사용되는 보조 데이터를 네트워크의 위치결정서버 PDE(position determinnation entity)에서 수신하게 되면 first fix 시간을 수초내에 수행할 수 있는데 이러한 기능을  지원하는 것이  MS-based (mobile station-based) GPS 모드 이다GPS를 통해 자신의 위치를 찾을 때 휴대폰에서 스스로 위치를 찾아내는 방식으로 계속적으로 PDE와 통신해야하는 MS-Assisted 방식에 비해 위치 검색 속도가 2-5초 정도로 단축된 것이 특징이다. 네트워크의 PDE에서 송신되는 보조 정보는 휴대폰의 상당한 거리를 움직였을 경우 수신 가능한 GPS 위성도 바뀌게 되므로 이러한 정보를 갱신해주기 위해 일정 시간간격마다 보내진다.


MS-Assisted

 GPS 모드는 First Fix 시간을 줄이기 위해 보조정보를 서버로 부터 수신 받는 기능과 함께 GPS 위성정보에 기반 한 현재 위치계산까지 네트워크에 위치한 서버를 통해 계산하는 방법이다GPS 위성에서 보내는 정보를 단말기에 내장된 칩이 수신해 다시 휴대전화 기지국에 알려주고 단말기는 기지국으로부터 다시 위치에 대한 데이터를 받아 최종적으로 위치를 확인하게 된다.  네트워크를 통해 위치를 확인하기 때문에 First Fix 보조 정보를 수신하고 GPS 위성신호를 수신하여 네트워크의 PDE로 보내는 통신 시간이 많은 부분을 차지한다. 통신 속도 등을 감안할 때 위치 측정 속도 역시 평균 20초 정도 걸리는 것으로 알려져 있으며 자체 GPS 위성신호의 연산이 어려운 저기능 GPS 내장 휴대폰이나 1회성 위치 검색 서비스에 주로 사용된다.


MS-Assisted GPS/Hybrid

  건물이 많고 복잡한 도심이나 건물 내에서는 GPS의 위성 신호를 수신하지 못하여 위치를 찾지 못하는 경우가 많은데 이것을 보완하기 위해 기지국에 수신된 신호 정보를 이용하여 네트워크 기반 측위나 다른 측위 기법을 결합하여 사용하는 MS-assisted/Hybrid 모드이다.

 MS-assisted GPS 모드와 휴대폰 신호 삼각측량 하는 네트워크 기반 측위의 결과 위치정보를 하이브리드 하여 계산하는 예를 보이고 있다. 이 모드에서 GPS 기반 측위와 네트워크 기반 측위를 항상 동시에 수행하는 것은 아니다. 필요에 따라 GPS위성신호에 기반해서 먼저 측위를 수행한 후 이것이 실패하면 네트워크 기반 측위를 할수도 있으며, 그 반대의 경우도 가능하다.

또한, 네트워크 기반 측위가 항상 삼각측량을 의미하는 것은 아니다. 경우에 따라 세개 이상의 기지국에서 휴대폰 신호를 수신하지 못할 수 있으며 삼각측량이 이 경우에는 Cell-ID 기반의 위치를 전달할 수 있다. 또 다른 예외의 경우는 위와 같이 네트워크 기반 측위를 이용하지 않고 MS-Assisted GPS와 단말 기반의 Finger Print 기법을 하이브리드 하여 사용할 수도 있다. 단말기반의 Finger Print 방식은 단말에 수신되는 기지국 신호의 전파강도와 수신되는 기지국의 위치에 대한 정보에 기반하여 위치를 계산하게 된다.

'아카이브 ~2019 > GPS' 카테고리의 다른 글

GPS 아이콘을 변경 예제  (0) 2012.08.27
GPS Architecture 분석 1  (0) 2011.01.28
GPS Architecture 정리중....  (0) 2011.01.27
XTRA ?  (0) 2011.01.27
Android Location Providers – gps, network, passive  (0) 2011.01.27
Posted by hoonihoon