Skip to content

Commit

Permalink
Added some key details about the SDK's SIM APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
davkutalek committed Nov 1, 2019
1 parent 7cd1006 commit cece630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
}
</code></pre></figure>

Get the READ_PHONE_STATE permission from the user, then call `Hover.updateSimInfo(context)` which will populate the library's SIM database. Then you can use the static methods on the SimInfo object to load them from the database. Documentation can be found in the [javadoc](http:https://maven.usehover.com/releases/com/hover/android-sdk/1.4.1/android-sdk-1.4.1-javadoc.jar).
Get the READ_PHONE_STATE and CALL_PHONE (you must have both) permissions from the user, then call `Hover.updateSimInfo(context)` which will populate the library's SIM database. This is async and can take a few seconds, and when it is finished it fires a LocalBroadcast with the action `YOUR.PACKAGE.NAME.NEW_SIM_INFO_ACTION`. Then you can use the static methods on the SimInfo object to load them from the database. More documentation can be found in the [javadoc](http:https://maven.usehover.com/releases/com/hover/android-sdk/1.4.1/android-sdk-1.4.1-javadoc.jar).

Hover provides its list of network operators via a public HTTP API: https://www.usehover.com/api/world_operators. This endpoint provides the name, country alpha2, mobile country code (MCC) and mobile network codes (MNCs) of each network. The MCC + MNC together are called the Home Network Identifier (HNI) and are also the first 5-6 digits of the IMSI. One network can have multiple MNCs, [Wikipedia](https://en.wikipedia.org/wiki/Mobile_country_code) has a useful summary and list. Hover also provides a list of countries for completeness: https://www.usehover.com/api/countries.

Expand Down

0 comments on commit cece630

Please sign in to comment.