Java Code Examples for android.telephony.CellLocation#requestLocationUpdate()

The following examples show how to use android.telephony.CellLocation#requestLocationUpdate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: d.java    From letv with Apache License 2.0 6 votes vote down vote up
public final void e() {
    if (this.p == 1) {
        CellLocation.requestLocationUpdate();
        this.p = 2;
        this.l.sendEmptyMessage(1);
        if (this.s.b().isWifiEnabled()) {
            this.s.b().startScan();
            this.r = false;
        } else if (this.e) {
            this.o = System.currentTimeMillis();
            if (c && this.s.b().setWifiEnabled(true)) {
                this.r = true;
            } else {
                this.l.sendEmptyMessageDelayed(5, 8000);
            }
        } else {
            this.l.sendEmptyMessageDelayed(5, 0);
        }
    }
}
 
Example 2
Source File: MainActivity.java    From DualSIMCard with Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GsmCellLocation cl = (GsmCellLocation) CellLocation.getEmpty();
    CellLocation.requestLocationUpdate();
    System.out.println("GsmCellLocation " + cl.toString());
    MainActivity.context = getApplicationContext();
    setContentView(R.layout.activity_dual_sim_card_main);

    AdView mAdView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    mAdView.loadAd(adRequest);


    clockwise(findViewById(R.id.listView));
    //readSims();
}