You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service running with android studio working for both background and kill state but not working after bridging with react native,,,run with react native it only work when app is an background(minimize) state.
React Native version:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 1.18 GB / 7.93 GB
Binaries:
Node: 11.11.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 23, 25, 26, 28
Build Tools: 28.0.3
System Images: android-26 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2,
NetHelper class
`public class NetHelper extends ReactContextBaseJavaModule {
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stalebot
added
the
Stale
There has been a lack of activity on this issue and it may be closed soon.
label
Jan 7, 2020
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Service running with android studio working for both background and kill state but not working after bridging with react native,,,run with react native it only work when app is an background(minimize) state.
React Native version:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 1.18 GB / 7.93 GB
Binaries:
Node: 11.11.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 23, 25, 26, 28
Build Tools: 28.0.3
System Images: android-26 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2,
NetHelper class
`public class NetHelper extends ReactContextBaseJavaModule {
ReactApplicationContext reactContext;
Context context;
Intent intent;
public NetHelper(ReactApplicationContext reactContext) {
super(reactContext);
}
@OverRide
public String getName() {
return "WifiReceiver";
}
@ReactMethod
public void NetInfo() {
IntentFilter filter = new IntentFilter();
filter.addAction("android.net.wifi.WIFI_STATE_CHANGED");
filter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
WifiReceiver wifiReceiver = new WifiReceiver();
this.reactContext.registerReceiver(wifiReceiver, filter);
}
}`
and my wifi receiver class as:
`
public class WifiReceiver extends BroadcastReceiver {
String TAG = getClass().getSimpleName();
private Context mContext;
@OverRide
public void onReceive(Context context, Intent intent) {
}`
The text was updated successfully, but these errors were encountered: