react-native-contacts 7.0.6 → 7.0.8
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.
package/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodejs 19.2.0
|
package/android/build.gradle
CHANGED
|
@@ -20,6 +20,11 @@ android {
|
|
|
20
20
|
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
|
|
21
21
|
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
|
|
22
22
|
|
|
23
|
+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
24
|
+
if (agpVersion >= 7) {
|
|
25
|
+
namespace 'com.rt2zz.reactnativecontacts'
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
defaultConfig {
|
|
24
29
|
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
|
|
25
30
|
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
|
|
@@ -1218,7 +1218,7 @@ public class ContactsManager extends ReactContextBaseJavaModule implements Activ
|
|
|
1218
1218
|
*/
|
|
1219
1219
|
private String isPermissionGranted() {
|
|
1220
1220
|
// return -1 for denied and 1
|
|
1221
|
-
int res = getReactApplicationContext().
|
|
1221
|
+
int res = getReactApplicationContext().checkSelfPermission(PERMISSION_READ_CONTACTS);
|
|
1222
1222
|
return (res == PackageManager.PERMISSION_GRANTED) ? PERMISSION_AUTHORIZED : PERMISSION_DENIED;
|
|
1223
1223
|
}
|
|
1224
1224
|
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function getAll(): Promise<Contact[]>;
|
|
2
2
|
export function getAllWithoutPhotos(): Promise<Contact[]>;
|
|
3
|
-
export function getContactById(contactId: string): Promise<Contact>;
|
|
3
|
+
export function getContactById(contactId: string): Promise<Contact | null>;
|
|
4
4
|
export function getCount(): Promise<number>;
|
|
5
5
|
export function getPhotoForId(contactId: string): Promise<string>;
|
|
6
6
|
export function addContact(contact: Partial<Contact>): Promise<Contact>;
|
package/package.json
CHANGED
package/foo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log('hello')
|