Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A Android-IMSI-Catcher-Detector
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 162
    • Issues 162
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CellularPrivacy
  • Android-IMSI-Catcher-Detector
  • Merge requests
  • !894

Import OCID data from cell_towers.csv

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/theirix/feature-celltowers-import into development Aug 15, 2016
  • Overview 17
  • Commits 9
  • Pipelines 0
  • Changes 9

Created by: theirix


Agreements

  • I have reviewed and accepted the guidelines for contributing to this project.
  • I have reviewed and closely followed the Style Guide for this Android app.

Overview

Allow to import locally downloaded OCID data from cell_towers.csv.gz


Classification

  • Bugfix (non-breaking change which fixes an existing issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor (restructuring of existing code without changing its external functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Note Also slightly refactored RealmHelper without change of functionality.


References

PR possibly fixes an issue #435 .

Related to discussion in issue #854 about cell_towers.csv .


Screenshots

screenshot

  1. Added a new menu item "Import CellTowers Data". Choosing this menu launches a standard file chooser intent.
  2. A few new toasted notifications added (not shown).

Patch description

Rationale OCID allows to download a full daily dump of cell data in cell_towers.csv.gz or daily incremental data. Due to bad stability of OCID API it is useful to be able to locally import cell_towers.csv.

Proposed changes

  1. Added a drawer menu "Import CellTowers Data" which launches an intent to choose a CSV file or gzipped CSV file with CellTowers data.
  2. Async loader in ImportTask that reads a full dump and filters it locally with MCC, MNC, cell location just like RequestTask does by the API call.
  3. ImportTask converts data from CellTowers format (documented) to the OCID API CSV format and inserts it to the database with help of the RealmHelper.
  4. RealmHelper is slightly refactored to allow directly insert data without an intermediate file.
  5. Added a wrapper around GZIPInputStream because Android implementation of GZIPInputStream cannot read files larget than 2 GiB.

Testing Tested on Motorola XT1562, Android 6.0.1. Import from cell_towers.csv.gz fetches approx 1000 records (Moscow) from 29 millions total and took about twenty minutes on debug version. Unarchived version is much faster.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/theirix/feature-celltowers-import