Skip to content

Commit

Permalink
Merge pull request #21 from mriddle/rename-package-to-avoid-conflicts
Browse files Browse the repository at this point in the history
Rename from the default package name of react-native libraries
  • Loading branch information
mkuczera authored Oct 25, 2018
2 parents c893bb4 + ff135e2 commit 545ab20
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.reactlibrary.RNReactNativeHapticFeedbackPackage;` to the imports at the top of the file
- Add `import com.mkuczera.RNReactNativeHapticFeedbackPackage;` to the imports at the top of the file
- Add `new RNReactNativeHapticFeedbackPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
Expand All @@ -48,4 +48,4 @@ ReactNativeHapticFeedback.trigger('impactLight', true);
Argument | Description
------ | ------
`method` | Possible values are "selection", "impactLight", "impactMedium", "impactHeavy", "notificationSuccess", "notificationWarning", "notificationError" (default: "selection")
`enableVibrateFallback` | iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s)
`enableVibrateFallback` | iOS only. if haptic feedback is not available (iOS < 10 OR Device < iPhone6s), vibrate with default method (heavy 1s)
4 changes: 2 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactlibrary">
package="com.mkuczera">
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
</manifest>

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package com.reactlibrary;
package com.mkuczera;

import android.os.Vibrator;
import android.content.Context;
Expand Down Expand Up @@ -54,4 +54,4 @@ public void trigger(String type) {
v.vibrate(durations, -1);

}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package com.reactlibrary;
package com.mkuczera;

import java.util.Arrays;
import java.util.Collections;
Expand All @@ -25,4 +25,4 @@ public List<Class<? extends JavaScriptModule>> createJSModules() {
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
}

0 comments on commit 545ab20

Please sign in to comment.