Skip to content

Collects cellular signal and stores results into a feature service. iOS

License

Notifications You must be signed in to change notification settings

Esri/CellSignal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cellsignal

This repository contains Swift sample code to collect cellular data including capabilities using ArcGIS Runtime SDK for iOS. The project that can be opened in XCode and instantly run on a simulator or a device.

The master branch of this repository contains samples configured for the latest available version of ArcGIS Runtime SDK for iOS. For samples configured for older versions of the SDK, look under the Releases tab for a specific version.

Settings

Go to device settings, find the app CellSignal in the list to change the feature service layer you've created and hosted. The User ID and password settings are for using the service services.

Screen Shot

Features

The app needs to be running on the foreground to work, will measure the cell coverage and will send that information to your feature service or, when offline, store it in the device until, connection to the feature service is being restored. The user does not need to interact with the app, only needs to make sure the app is running on the foreground.

Screen Shot

The chart will show a historical view of the measurements. The scale is from 0 to 4, depending on the cell bars received. A custom map can show the intended extent as well as a simple rendering of the data.

Screen Shot

To change how we capture the cell service information, please refer to this function.

private func getSignalStrengthiOS11() -> Int {
     let application = UIApplication.shared
     if let statusBarView = application.value(forKey: "statusBar") as? UIView {

     for subbiew in statusBarView.subviews {

     if isiPhoneX() {

          return getSignalStrengthiPhoneX()

     } else {
          if subbiew.classForKeyedArchiver.debugDescription == "Optional(UIStatusBarForegroundView)" {
          for subbiew2 in subbiew.subviews {

               if subbiew2.classForKeyedArchiver.debugDescription == "Optional(UIStatusBarSignalStrengthItemView)" {

               let bars = subbiew2.value(forKey: "signalStrengthBars") as! Int

               return bars
               }
            }
         }
      }
    }
 }

 return 0 //NO SERVICE
}

Requirements

  1. Fork and then clone the repo. Don't know how? Get started here.
  2. Build and run the project to create a single app containing all of the samples.

Additional Resources

  • Want to start a new project? Setup your dev environment
  • New to the API? Explore the documentation : Guide | API Reference
  • Got a question? Ask the community on our forum

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2018 Esri

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.

A copy of the license is available in the repository's license.txt file.

About

Collects cellular signal and stores results into a feature service. iOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages