@rodrigo7/react-native-beacons-manager 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.flowconfig +21 -0
  2. package/.nvmrc +1 -0
  3. package/.prettierignore +4 -0
  4. package/.prettierrc +12 -0
  5. package/.vscode/settings.json +24 -0
  6. package/LICENSE +21 -0
  7. package/README.md +246 -0
  8. package/ReactNativeBeaconsManager.podspec +13 -0
  9. package/android/.project +17 -0
  10. package/android/.settings/org.eclipse.buildship.core.prefs +2 -0
  11. package/android/build.gradle +108 -0
  12. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  13. package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  14. package/android/gradle/wrapper/gradle.properties +2 -0
  15. package/android/gradlew +160 -0
  16. package/android/gradlew.bat +90 -0
  17. package/android/src/main/AndroidManifest.xml +8 -0
  18. package/android/src/main/java/com/mackentoch/beaconsandroid/BeaconsAndroidModule.java +457 -0
  19. package/android/src/main/java/com/mackentoch/beaconsandroid/BeaconsAndroidPackage.java +29 -0
  20. package/index.js +10 -0
  21. package/ios/RNiBeacon/RNiBeacon/ESSBeaconScanner.h +41 -0
  22. package/ios/RNiBeacon/RNiBeacon/ESSBeaconScanner.m +204 -0
  23. package/ios/RNiBeacon/RNiBeacon/ESSEddystone.h +117 -0
  24. package/ios/RNiBeacon/RNiBeacon/ESSEddystone.m +352 -0
  25. package/ios/RNiBeacon/RNiBeacon/ESSTimer.h +72 -0
  26. package/ios/RNiBeacon/RNiBeacon/ESSTimer.m +107 -0
  27. package/ios/RNiBeacon/RNiBeacon/RNiBeacon.h +16 -0
  28. package/ios/RNiBeacon/RNiBeacon/RNiBeacon.m +467 -0
  29. package/ios/RNiBeacon/RNiBeacon.xcodeproj/project.pbxproj +290 -0
  30. package/jsconfig.json +9 -0
  31. package/lib/next/module.types.js +169 -0
  32. package/lib/next/new.module.android.js +451 -0
  33. package/lib/next/new.module.ios.js +176 -0
  34. package/package.json +65 -0
  35. package/typings/index.d.ts +174 -0
  36. package/typings.json +7 -0
  37. package/yarn-error.log +4182 -0
@@ -0,0 +1,174 @@
1
+ declare module '@rodrigo77777/react-native-beacons-manager' {
2
+
3
+ class Beacons {
4
+ ///////////////////////////////////////////////////////
5
+ // iOS only
6
+ ///////////////////////////////////////////////////////
7
+
8
+ requestAlwaysAuthorization(): void;
9
+
10
+ requestWhenInUseAuthorization(): void;
11
+
12
+ allowsBackgroundLocationUpdates(
13
+ allow: boolean
14
+ ): void;
15
+
16
+ getAuthorizationStatus(
17
+ callback: (status: AuthorizationStatus) => any
18
+ ): any;
19
+
20
+ startUpdatingLocation(): void;
21
+
22
+ stopUpdatingLocation(): void;
23
+
24
+ shouldDropEmptyRanges(
25
+ drop: boolean
26
+ ): void;
27
+
28
+ ///////////////////////////////////////////////////////
29
+ // android only
30
+ ///////////////////////////////////////////////////////
31
+ ARMA_RSSI_FILTER: string;
32
+ RUNNING_AVG_RSSI_FILTER: string;
33
+ PARSER_IBEACON: string;
34
+ PARSER_ESTIMOTE: string;
35
+ PARSER_ALTBEACON: string;
36
+ PARSER_EDDYSTONE_TLM: string;
37
+ PARSER_EDDYSTONE_UID: string;
38
+ PARSER_EDDYSTONE_URL: string;
39
+
40
+ setHardwareEqualityEnforced(
41
+ flag: boolean
42
+ ): void;
43
+
44
+ detectIBeacons(): void;
45
+
46
+ detectAltBeacons(): void;
47
+
48
+ detectEstimotes(): void;
49
+
50
+ detectEddystoneUID(): void;
51
+
52
+ detectEddystoneURL(): void;
53
+
54
+ detectEddystoneTLM(): void;
55
+
56
+ detectCustomBeaconLayout(
57
+ parser: number
58
+ ): void;
59
+
60
+ setBackgroundScanPeriod(
61
+ period: number
62
+ ): void;
63
+
64
+ setBackgroundBetweenScanPeriod(
65
+ period: number
66
+ ): void;
67
+
68
+ setForegroundScanPeriod(
69
+ period: number
70
+ ): void;
71
+
72
+ setRssiFilter(
73
+ filterType: number,
74
+ avgModifier: number
75
+ ): void;
76
+
77
+ getRangedRegions(): Promise<any>;
78
+
79
+ getMonitoredRegions(): Promise<Array<BeaconRegion>>;
80
+
81
+ checkTransmissionSupported(): Promise<number>;
82
+
83
+ ///////////////////////////////////////////////////////
84
+ // common iOS and Android
85
+ ///////////////////////////////////////////////////////
86
+
87
+ startMonitoringForRegion(
88
+ region: BeaconRegion
89
+ ): Promise<any>;
90
+
91
+ /** IOS ONLY */
92
+ startRangingBeaconsInRegion(
93
+ region: BeaconRegion
94
+ ): Promise<BeaconRangingResponse>;
95
+
96
+ /** ANDROID ONLY */
97
+ startRangingBeaconsInRegion(
98
+ // We can't simply reuse BeaconRegion as BeaconRegion.uuid is mandatory, whereas the uuid in this method is optional
99
+ region: {
100
+ identifier: string,
101
+ uuid?: string
102
+ }
103
+ ): Promise<BeaconRangingResponse>;
104
+
105
+ /** ANDROID ONLY */
106
+ startRangingBeaconsInRegion(
107
+ regionId: string,
108
+ beaconsUUID?: string
109
+ ): Promise<BeaconRangingResponse>;
110
+
111
+ stopMonitoringForRegion(
112
+ region: BeaconRegion
113
+ ): Promise<any>;
114
+
115
+ /** IOS ONLY */
116
+ stopRangingBeaconsInRegion(
117
+ region: BeaconRegion
118
+ ): Promise<any>;
119
+
120
+ /** ANDROID ONLY */
121
+ stopRangingBeaconsInRegion(
122
+ regionId: string,
123
+ beaconsUUID?: string
124
+ ): Promise<any>;
125
+
126
+ /** ANDROID ONLY */
127
+ stopRangingBeaconsInRegion(
128
+ // We can't simply reuse BeaconRegion as BeaconRegion.uuid is mandatory, whereas the uuid in this method is optional
129
+ region: {
130
+ identifier: string,
131
+ uuid?: string
132
+ }
133
+ ): Promise<any>;
134
+
135
+ requestStateForRegion(
136
+ region: BeaconRegion
137
+ ): void;
138
+ }
139
+
140
+ const beacons: Beacons;
141
+ export default beacons;
142
+
143
+ declare namespace Beacons {
144
+ export interface BeaconRegion {
145
+ identifier: string,
146
+ uuid: string,
147
+ minor?: number,
148
+ major?: number
149
+ }
150
+
151
+ export type AuthorizationStatus =
152
+ | 'authorizedAlways'
153
+ | 'authorizedWhenInUse'
154
+ | 'denied'
155
+ | 'notDetermined'
156
+ | 'restricted';
157
+
158
+ export type Beacon = {
159
+ distance: number;
160
+ major: number;
161
+ minor: number;
162
+ proximity: 'immediate' | 'near' | 'far';
163
+ rssi: number;
164
+ uuid: string;
165
+ }
166
+
167
+ export type BeaconRangingResponse = {
168
+ beacons: Beacon[];
169
+ identifier: string;
170
+ uuid: string;
171
+ }
172
+
173
+ }
174
+ }
package/typings.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@rodrigo77777/react-native-beacons-manager",
3
+ "dependencies": {},
4
+ "globalDependencies": {
5
+ "node": "registry:dt/node#7.0.0+20170322231424"
6
+ }
7
+ }