Skip to content

Commit

Permalink
Merge pull request #11 from boterop/v2.5
Browse files Browse the repository at this point in the history
v2.5.1
  • Loading branch information
boterop authored Apr 28, 2024
2 parents 9520895 + 83dc63c commit 080d1f4
Show file tree
Hide file tree
Showing 10 changed files with 15,622 additions and 3,088 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Publish Package to npmjs
on:
release:
types: [published]
pull_request:
branches:
- main
types: closed

jobs:
build:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
branches:
- main
- master
types: closed

jobs:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.5.1 (27.04.2014)

- Update scope to correct installations

## 2.5.0 (27.04.2024)

- Remove NativeEventEmitter warning
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ Emit event periodically (even when app is in the background).
2. Install React Native Background Timer package.

```bash
yarn add react-native-background-timer
yarn add @boterop/react-native-background-timer
# or using npm
npm install react-native-background-timer --save
npm install @boterop/react-native-background-timer --save
```

3. Link React Native Background Timer library. This step is not necessary when you use React Native >= 0.60 (and your app is not ejected from Expo).

```bash
react-native link react-native-background-timer
react-native link @boterop/react-native-background-timer
```

4. If you use CocoaPods or React Native >= 0.60 (and your app is not ejected from Expo) or your app is ejected from Expo, then before running your app on iOS, make sure you have CocoaPods installed and run:
Expand Down Expand Up @@ -57,7 +57,7 @@ Link the library manually if you get errors:
- `android/app/src/main/java/com/your-app/MainApplication.java`

```diff
+ import com.ocetnik.timer.BackgroundTimerPackage;
+ import io.boterop.timer.BackgroundTimerPackage;
@Override
protected List<ReactPackage> getPackages() {
Expand All @@ -75,15 +75,15 @@ Link the library manually if you get errors:
- `ios/Podfile`

```diff
+ pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
+ pod '@boterop/react-native-background-timer', :path => '../node_modules/@boterop/react-native-background-timer'
```

</details>

## Usage

```js
import BackgroundTimer from 'react-native-background-timer';
import BackgroundTimer from '@boterop/react-native-background-timer';
```

### Crossplatform
Expand Down Expand Up @@ -157,7 +157,7 @@ import {
Platform,
} from 'react-native';
import BackgroundTimer from 'react-native-background-timer';
import BackgroundTimer from '@boterop/react-native-background-timer';
```
```js
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ocetnik.timer">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.boterop.timer">
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ocetnik.timer;
package io.boterop.timer;

import android.os.Handler;
import android.os.PowerManager;
Expand Down Expand Up @@ -36,7 +36,7 @@ public BackgroundTimerModule(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;
this.powerManager = (PowerManager) getReactApplicationContext().getSystemService(reactContext.POWER_SERVICE);
this.wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "rohit_bg_wakelock");
this.wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "react-native-background-timer:wakelock");
reactContext.addLifecycleEventListener(listener);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ocetnik.timer;
package io.boterop.timer;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
Expand Down
Loading

0 comments on commit 080d1f4

Please sign in to comment.