dependencies {
...
compile 'io.hypertrack:smart-scheduler:0.0.3'
...
}
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
#!benchDL | |
make_install(git = "https://github.com/erlio/vmq_mzbench.git", | |
branch = "master") | |
pool(size = numvar("connections"), | |
worker_type = mqtt_worker, | |
worker_start = linear(numvar("rate") rps)): | |
connect(host = var("sub_node"), | |
client = fixed_client_id("subscriber_pool0_1", worker_id()), |
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
// Replace startTracking API with startMockTracking | |
// [HyperTrack startTracking]; | |
[HyperTrack startMockTracking]; | |
// Replace stopTracking API with stopMockTracking | |
// [HyperTrack stopTracking]; | |
[HyperTrack stopMockTracking]; |
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
// Replace startTracking API with startMockTracking | |
// HyperTrack.startTracking() | |
HyperTrack.startMockTracking() | |
// Replace stopTracking API with stopMockTracking | |
// HyperTrack.stopTracking() | |
HyperTrack.stopMockTracking() |
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
// Replace startTracking API with startMockTracking | |
// HyperTrack.startTracking(); | |
HyperTrack.startMockTracking(new HyperTrackCallback() { | |
@Override | |
public void onSuccess(@NonNull SuccessResponse response) { | |
// Handle startMockTracking success here | |
} | |
@Override | |
public void onError(@NonNull ErrorResponse errorResponse) { |
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
/** | |
* Method to animate marker to destination location | |
* @param destination destination location (must contain bearing attribute, to ensure | |
* marker rotation will work correctly) | |
* @param marker marker to be animated | |
*/ | |
public static void animateMarker(Location destination, Marker marker) { | |
if (marker != null) { | |
LatLng startPosition = marker.getPosition(); | |
LatLng endPosition = new LatLng(destination.getLatitude(), destination.getLongitude()); |
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
/** | |
* For Build.VERSION.SDK_INT < 18 i.e. JELLY_BEAN_MR2 | |
* Check if MockLocation setting is enabled or not | |
* | |
* @param context Pass Context object as parameter | |
* @return Returns a boolean indicating if MockLocation is enabled | |
*/ | |
public static Boolean isMockLocationEnabled(Context context) { | |
return !Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION).equals("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
HyperTrack.setGnssStatusCallback(new GnssStatus.Callback() { | |
@Override | |
public void onStarted() { | |
super.onStarted(); | |
// Handle onStarted method here | |
... | |
} | |
@Override | |
public void onStopped() { | |
super.onStopped(); |
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 MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
... | |
// Check if location settings have been enabled by the user | |
checkForLocationSettings(); | |
} |
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
``` java | |
dependencies { | |
... | |
compile 'io.hypertrack:smart-scheduler:0.0.3' | |
... | |
} | |
``` |
NewerOlder