Skip to content

Commit

Permalink
Merge pull request #112 from radarlabs/android-3.18.11
Browse files Browse the repository at this point in the history
bump versions
  • Loading branch information
nickpatrick authored Jan 4, 2025
2 parents 7d31091 + 1e8dbef commit d0fffad
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'io.radar:sdk:3.18.8'
implementation 'io.radar:sdk:3.18.11'
}

5 changes: 2 additions & 3 deletions android/src/main/java/io/radar/capacitor/RadarPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void initialize(PluginCall call) {
String publishableKey = call.getString("publishableKey");
SharedPreferences.Editor editor = this.getContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
editor.putString("x_platform_sdk_type", "Capacitor");
editor.putString("x_platform_sdk_version", "3.14.0");
editor.putString("x_platform_sdk_version", "3.15.0");
editor.apply();
Radar.initialize(this.getContext(), publishableKey);
call.resolve();
Expand Down Expand Up @@ -423,8 +423,7 @@ public void setExpectedJurisdiction(final PluginCall call) {
String countryCode = call.getString("countryCode");
String stateCode = call.getString("stateCode");

// TODO: when Android Sdk fixes this method to be static, uncomment
// Radar.setExpectedJurisdiction(countryCode, stateCode);
Radar.setExpectedJurisdiction(countryCode, stateCode);
call.resolve();
}

Expand Down
2 changes: 1 addition & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ class App extends React.Component<AppProps, AppState> {

Radar.trackVerified().then((result) => {
this.logOutput(`trackVerified: ${JSON.stringify(result)}\n`);
const { user } = result;
if (user?.fraud?.passed && user?.country?.allowed && user?.state?.allowed) {
const { token } = result;
if (token?.passed) {
// allow access to feature
} else {
// deny access to feature, show error message
Expand Down
2 changes: 1 addition & 1 deletion ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class RadarPlugin: CAPPlugin, RadarDelegate, RadarVerifiedDelegate {
return
}
UserDefaults.standard.set("Capacitor", forKey: "radar-xPlatformSDKType")
UserDefaults.standard.set("3.14.1", forKey: "radar-xPlatformSDKVersion")
UserDefaults.standard.set("3.15.0", forKey: "radar-xPlatformSDKVersion")
Radar.initialize(publishableKey: publishableKey)
call.resolve()
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "capacitor-radar",
"version": "3.14.1",
"version": "3.15.0",
"description": "Capacitor plugin for Radar, the leading geofencing and location tracking platform",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
Expand Down
11 changes: 5 additions & 6 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ export interface RadarPlugin {
requestLocationPermissions(options: { background: boolean }): void;
getLocation(options: { desiredAccuracy: RadarTrackingOptionsDesiredAccuracy }): Promise<RadarLocationCallback>;
trackOnce(options?: Location | { desiredAccuracy: RadarTrackingOptionsDesiredAccuracy, beacons: boolean}): Promise<RadarTrackCallback>;
trackVerified(options?: { beacons?: boolean }): Promise<RadarTrackCallback>;
getVerifiedLocationToken(): Promise<RadarTrackTokenCallback>;
// TODO: when Android Sdk fixes this method to be static, uncomment
// setExpectedJurisdiction(options?: { countryCode: string, stateCode: string }): void;
startTrackingVerified(options: { token?: boolean, interval: number, beacons: boolean }): void;
trackVerified(options?: { beacons?: boolean }): Promise<RadarTrackVerifiedCallback>;
getVerifiedLocationToken(): Promise<RadarTrackVerifiedCallback>;
setExpectedJurisdiction(options?: { countryCode: string, stateCode: string }): void;
startTrackingVerified(options: { interval: number, beacons: boolean }): void;
startTrackingEfficient(): void;
startTrackingResponsive(): void;
startTrackingContinuous(): void;
Expand Down Expand Up @@ -75,7 +74,7 @@ export interface RadarTrackCallback {
events?: RadarEvent[];
}

export interface RadarTrackTokenCallback {
export interface RadarTrackVerifiedCallback {
status: string;
token?: RadarVerifiedLocationToken;
}
Expand Down

0 comments on commit d0fffad

Please sign in to comment.