Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreground tracking #55

Merged
merged 20 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.10.0

- Bump iOS version from 3.9.14 to 3.15.0
- Bump Android version from 3.9.8 to 3.15.0

# 3.9.1

- Bump iOS version from 3.9.7 to 3.9.14
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}

dependencies {
implementation 'io.radar:sdk:3.9.8'
implementation 'io.radar:sdk:3.15.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.google.code.gson:gson:2.8.6'
}
667 changes: 271 additions & 396 deletions android/src/main/java/io/radar/flutter/RadarFlutterPlugin.java

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.radar.example"
minSdkVersion 16
minSdkVersion flutter.minSdkVersion
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand All @@ -49,7 +49,7 @@ android {
}

dependencies {
implementation 'io.radar:sdk:3.9.8'
implementation 'io.radar:sdk:3.15.0'
implementation "com.google.android.play:integrity:1.2.0"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
25 changes: 23 additions & 2 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -149,6 +149,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
717FBB0054865DEA34CA9827 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -165,7 +166,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -208,10 +209,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -220,6 +223,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
717FBB0054865DEA34CA9827 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
8AED107CD2EAE06C6755A899 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -244,6 +264,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@
</dict>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
64 changes: 49 additions & 15 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
Radar.setLogLevel('info');
Radar.setAnonymousTrackingEnabled(false);

Radar.attachListeners();

Radar.onLocation(onLocation);
Radar.onClientLocation(onClientLocation);
Radar.onError(onError);
Expand All @@ -85,7 +83,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
Radar.onToken(onToken);

await Radar.requestPermissions(false);

await Radar.requestPermissions(true);
var permissionStatus = await Radar.getPermissionsStatus();
if (permissionStatus != "DENIED") {
Expand Down Expand Up @@ -249,7 +247,43 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
);
print("searchPlaces: $resp");
},
child: Text('searchPlaces'),
child: Text('searchPlaces()'),
),
ElevatedButton(
style: raisedButtonStyle,
onPressed: () async {
var resp = await Radar.searchGeofences(
near: {
'latitude': 40.783826,
'longitude': -73.975363,
},
radius: 1000,
limit: 10,
includeGeometry: true,
tags: List.empty(),
metadata: {},
);
print("searchGeofences: $resp");
},
child: Text('searchGeofences()'),
),
ElevatedButton(
style: raisedButtonStyle,
onPressed: () async {
var resp = await Radar.geocode(
'20 jay st brooklyn',
);
print("geocode: $resp");
},
child: Text('geocode()'),
),
ElevatedButton(
style: raisedButtonStyle,
onPressed: () async {
var resp = await Radar.reverseGeocode();
print("reverseGeocode: $resp");
},
child: Text('reverseGeocode()'),
),
ElevatedButton(
style: raisedButtonStyle,
Expand Down Expand Up @@ -339,9 +373,16 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
ElevatedButton(
style: raisedButtonStyle,
onPressed: () {
Radar.startTrackingVerified(token: true);
Radar.startTrackingVerified(30, false);
},
child: Text('startTrackingVerified(token: true)'),
child: Text('startTrackingVerified()'),
),
ElevatedButton(
style: raisedButtonStyle,
onPressed: () {
Radar.stopTrackingVerified();
},
child: Text('stopTrackingVerified()'),
),
ElevatedButton(
style: raisedButtonStyle,
Expand Down Expand Up @@ -376,16 +417,9 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
Map? resp = await Radar.trackVerified();
print("trackVerified: $resp");
},
child: Text('trackVerified'),
),
ElevatedButton(
style: raisedButtonStyle,
onPressed: () async {
Map? resp = await Radar.trackVerifiedToken();
print("trackVerifiedToken: $resp");
},
child: Text('trackVerifiedToken'),
child: Text('trackVerified()'),
),

ElevatedButton(
style: raisedButtonStyle,
onPressed: () async {
Expand Down
Loading
Loading