The following are its features:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="0" width="500" cellspacing="0" cellpadding="0" data-mysignature-version="2018-10-11T12:22:01.242Z | 0"> | |
<tbody> | |
<tr> | |
<td> | |
<table border="0" cellspacing="0" cellpadding="0"> | |
<tbody> | |
<tr> | |
<td style="padding: 0 8px 0 0; vertical-align: top;" valign="top" width="100"><img style="width: 100px; moz-border-radius: 10%; khtml-border-radius: 10%; o-border-radius: 10%; webkit-border-radius: 10%; ms-border-radius: 10%; border-radius: 10%;" src="https://img.mysignature.io/p/6/e/2/6e2800cc-7625-59f0-be25-b8a354eade56.png?time=1539260519" alt="The Collective Web" width="100" /></td> | |
<td style="font-size: 1em; padding: 0 15px 0 8px; vertical-align: top;" valign="top"> | |
<table style="line-height: 1.4; font-family: Verdana, Geneva, sans-serif; font-size: 90%; color: #000001;" border="0" cellspacing="0" cellpadding="0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void printHashKey(Context pContext) { | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
String hashKey = new String(Base64.encode(md.digest(), 0)); | |
Log.i(TAG, "printHashKey() Hash Key: " + hashKey); | |
} | |
} catch (NoSuchAlgorithmException e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javaCompileOptions { | |
annotationProcessorOptions { | |
includeCompileClasspath true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GpsTracker extends Service implements LocationListener { | |
private final Context mContext; | |
// flag for GPS status | |
boolean isGPSEnabled = false; | |
// flag for network status | |
boolean isNetworkEnabled = false; | |
// flag for GPS status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LocationManager mLocationManager; | |
Location myLocation = getLastKnownLocation(); | |
private Location getLastKnownLocation() { | |
mLocationManager = (LocationManager)getApplicationContext().getSystemService(LOCATION_SERVICE); | |
List<String> providers = mLocationManager.getProviders(true); | |
Location bestLocation = null; | |
for (String provider : providers) { | |
Location l = mLocationManager.getLastKnownLocation(provider); | |
if (l == null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE); | |
//Get current location to start with | |
Location myLocation = locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER); | |
currentLatitude = myLocation.getLatitude(); | |
currentLongitude = myLocation.getLongitude(); | |
// Request location update using LocationManager.NETWORK_PROVIDER | |
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="com.example.android.courtcounter.MainActivity"> | |
<LinearLayout |