GithubHelp home page GithubHelp logo

kavi707 / notifyme Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 4.0 941 KB

Location base Notification android app. Research project for location detecting in android. Specially using Network Cells

Java 100.00%

notifyme's Introduction

#NotifyMe

This is a demo application for pick your current location (longitude & latitude) from your Android device without using GPS (Without On Location Service in the device).

When you on Location Service in the device, It is using more & more battery in your device. Most of Android devices you can use battery for a one day after full charge. In that case, with location service, it will reduce like a half a day or less than that.

What we are doing here?

In this application we grab the location through GPS and Network Cells. If device's location service is enabled, then we use GPS to get the location. We use the normal Android SDK's method to get the longitude & latitude. If device's location services are not enabled, then we use our alternative way 'Locations from Network Cells' method to pick relative current location.

Sample Application

NotifyMe - Google Play. You can download the sample application from Google Play and try it your self.

Application Flow

alt tag

What are these 'Network cells'?

In the globe we all covered from GSM network. Through that we are doing calls, sms, data & etc. If you have a mobile phone, then you also under this network.

Basically from 3 points we can create an area then according to that case, if we think about 3 GSM towers, we can create an area of Network. Simply that area can be call as a Network cell.

In the globe all of these cells are uniquely named & gives an unique Ids. You guys can get more information about this from Cellular Network Wiki.

How we pick location from this 'Network Cell'?

If you visit to following OpenCellID, you guys also can play with it. If you guys can provide the parameters they request, then you can get the location according to the parameters you provide.

We are working with cell locations, therefore select Search Location -> cell location from Left menu. From there you can see, its asking MCC, MNC, LAC & Cell ID to get the location.

Parameter Description
MCC Mobile Country Code
MNC Mobile Network Code
LAC Location Area Code
Cell ID Network cell's unique Id

This MCC & MNC are given for your Network provider. You can get your network provider's those details from Mobile Country Code Wiki.

Then this LAC & Cell ID need to get from your mobile. In Android (Java), you can grab those details from following code snippet.

protected Map<String, Integer> getCellInfo(Context context) {
    GsmCellLocation location;
    Map<String, Integer> cellInfo = new HashMap<String, Integer>();

    TelephonyManager tm = (TelephonyManager) context.getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
    location = (GsmCellLocation) tm.getCellLocation();

    cellInfo.put("cellId", location.getCid());
    cellInfo.put("lac", location.getLac());

    return cellInfo;
}

If you have all above parameters then you can try in OpenCellID.

Then how we get longitude & latitude to mobile with above parameters?

If you have above parameters then you have to do a POST request to [http://www.google.com/glm/mmap] for get the longitude & latitude. This is done in the code. You can easily find in the code [Connector.java :sendHttpPostReq].

notifyme's People

Contributors

kwijewardana avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

notifyme's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.