All Projects → fooock → Phone Tracker

fooock / Phone Tracker

Licence: other
Phone tracker is an Android library to gather environment signals, like cell towers, wifi access points and gps locations.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Phone Tracker

JT808Platform
简单的JT808车辆监控平台
Stars: ✭ 97 (-4.9%)
Mutual labels:  tracker, gps
Peanuts
Peanuts is a free and open source wifi tracking tool. Based on the SensePosts Snoopy-NG project that is now closed.
Stars: ✭ 34 (-66.67%)
Mutual labels:  gps, wifi
ESP32 IMU BARO GPS VARIO
GPS altimeter/variometer with LCD display, routes with waypoints, data/gps track logging, bluetooth NMEA sentence transmission, wifi AP + webpage configuration
Stars: ✭ 72 (-29.41%)
Mutual labels:  gps, wifi
Ttgo T Beam Car Tracker
TTGO-T-Beam Arduino Car Tracker - ESP32 + LoRa + GPS + GSM (optional)
Stars: ✭ 106 (+3.92%)
Mutual labels:  gps, tracker
Disco4g
4G/LTE softmod for the Parrot Disco
Stars: ✭ 273 (+167.65%)
Mutual labels:  gps, tracker
beboptwo4g
4G/LTE softmod for the Parrot Bebop 2
Stars: ✭ 50 (-50.98%)
Mutual labels:  tracker, gps
Low power TTGO T-beam
Low power consumption for TTGO t-beam
Stars: ✭ 45 (-55.88%)
Mutual labels:  gps, wifi
Dingding
免root远程钉钉打卡,支持wifi和gps定位,仅支持android系统。本项目出于学习目的,仅用于学习玩耍,请于24小时后自行删除。xposed, crack,package,dingtalk,remote control
Stars: ✭ 116 (+13.73%)
Mutual labels:  gps, wifi
SnorkTracker
GPS IoT tracker board for scanning gps and environment information and sending this to a MQTT server via GPRS.
Stars: ✭ 38 (-62.75%)
Mutual labels:  tracker, gps
AG NTRIP ESP
AG Rooftop controller with NTRIP client and IMU (ESP32 Controller)
Stars: ✭ 25 (-75.49%)
Mutual labels:  gps, wifi
surger
⚡ Is there surge pricing around me right now?
Stars: ✭ 20 (-80.39%)
Mutual labels:  gps, wifi
Esp32 Paxcounter
Wifi & BLE driven passenger flow metering with cheap ESP32 boards
Stars: ✭ 844 (+727.45%)
Mutual labels:  gps, wifi
teltonika-fm-parser
Teltonika fm xxxx protocol encoder and decoder
Stars: ✭ 45 (-55.88%)
Mutual labels:  tracker, gps
Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (+461.76%)
Mutual labels:  gps, wifi
Potato Library
Easy to use Utility library for Android
Stars: ✭ 45 (-55.88%)
Mutual labels:  gps, wifi
Deautherdroid
Additional android app for SpaceHunn's ESP8266 DeAuther.
Stars: ✭ 93 (-8.82%)
Mutual labels:  wifi
Locokit
Location, motion, and activity recording framework for iOS
Stars: ✭ 1,353 (+1226.47%)
Mutual labels:  gps
Wifi Spam
✉️📡 Spam thousands of WiFi access points with custom SSIDs
Stars: ✭ 92 (-9.8%)
Mutual labels:  wifi
Phpgpx
Simple library for reading and creating GPX files written in PHP.
Stars: ✭ 92 (-9.8%)
Mutual labels:  gps
Lamp
A simple controller of craft lamp for Android.
Stars: ✭ 99 (-2.94%)
Mutual labels:  wifi

Phone tracker

Download Android Arsenal

Phone tracker is an Android library to gather environment signals, like cell towers, wifi access points and gps locations. You can configure how to scan. Also you can make hot configuring updates, and be notified when the configuration is updated, among other things.

Installation

For gradle based projects you need to add to your build.gradle

repositories {
    jcenter()
}

And in your dependencies block add this line

compile 'com.fooock:phone-tracker:0.2.1'

Getting started

You only need to create and instance of the PhoneTracker class and pass the Context to it

PhoneTracker phoneTracker = new PhoneTracker(this);

Now you can call the start() method from the tracker instance. The default configuration is used. For default all sensors are enabled.

Important: Note that if you are target Android 6.0 or greater, you need to grant location permissions to the application in order to gather environment data. You can listen for missing permissions from the PhoneTracker class using the PhoneTracker.PermissionListener interface:

// Listen for missing permissions
phoneTracker.addPermissionListener(new PhoneTracker.PermissionListener() {
    @Override
    public void onPermissionNotGranted(String... permission) {

    }
});

If the permissions are not granted, the tracker can't start.

To check if the tracker is running:

// Check the state of the tracker
boolean running = phoneTracker.isRunning();

To stop the tracker:

// Stop all sensors and don't receive more updates
phoneTracker.stop();

Tracker configuration

To create a default Configuration:

// Create a default configuration
Configuration configuration = new Configuration.Builder().create();

Now see how you can customize the configuration:

  • Wifi Create a Wifi configuration
// Create a new wifi configuration
Configuration.Wifi wifiConf = new Configuration.Wifi();
wifiConf.setScanDelay(3000);
  • Cell Create a cell configuration
// Create a new cell configuration
Configuration.Cell cellConf = new Configuration.Cell();
cellConf.setScanDelay(1000);
  • GPS Create a GPS configuration
// Create a gps configuration
Configuration.Gps gpsConf = new Configuration.Gps();
gpsConf.setMinDistanceUpdate(10);
gpsConf.setMinTimeUpdate(7000);

To create the new custom configuration:

// Create a new custom configuration
Configuration configuration = new Configuration.Builder()
    .useCell(true).cell(cellConf)
    .useWifi(true).wifi(wifiConf)
    .useGps(true).gps(gpsConf)
    .create();

In order to make effective the configuration:

// Set the init configuration
phoneTracker.setConfiguration(configuration);

Also, if you want to change the current configuration when the tracker is running:

// Update the current configuration
phoneTracker.updateConfiguration(configuration);

This method only loads the configuration that has changed, without stopping the tracker. You can listen for configuration changes using the PhoneTracker.ConfigurationChangeListener interface:

// Listen for configuration changes
phoneTracker.setConfigurationChangeListener(new PhoneTracker.ConfigurationChangeListener(){
    @Override
    public void onConfigurationChange(Configuration configuration) {

    }
});

Receiving data

You can setup listeners to receive wifi, gps updates and cell tower signals. See below.

  • Wifi
// Set the listener to receive wifi scans
phoneTracker.setWifiScanListener(new PhoneTracker.WifiScanListener() {
    @Override
    public void onWifiScansReceived(long timestamp, List<ScanResult> wifiScans) {

    }
});
  • GPS
// Set the listener to receive location updates from gps
phoneTracker.setGpsLocationListener(new PhoneTracker.GpsLocationListener() {
    @Override
    public void onLocationReceived(long timestamp, Location location) {

    }
});
  • Cell
// Set the listener for cell scans
phoneTracker.setCellScanListener(new PhoneTracker.CellScanListener() {
    @Override
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
    public void onCellInfoReceived(long timestamp, List<CellInfo> cells) {

    }

    @Override
    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
    public void onNeighborCellReceived(long timestamp, List<NeighboringCellInfo> cells) {

    }
});

Note if your application target from API 17 to 25 you don't need override the onNeighborCellReceived(...). For this I created an adapter class PhoneTracker.CellScanAdapter to override only the method you are interested:

phoneTracker.setCellScanListener(new PhoneTracker.CellScanAdapter() {
    @Override
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
    public void onCellInfoReceived(long timestamp, List<CellInfo> cells) {

    }
});

License

Copyright 2017 newhouse (nhitbh at gmail dot com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].