react-native-device-settings's People
Forkers
adriaanvanrossum christophby cheehieu dennisjaamann khalidhussain jslz tranvinhtruong steve-else spysonic igorlira isimicic sandfox jogamais esxiel krizroring dalugoda andrewhavens northofyou dorreharay hans00react-native-device-settings's Issues
[Android] Undefined is not an object (evaluating 'RNOpenSettings.generalSettings')
Hi, I've got an issue using this library, I followed the manual installation section and when I want to open the settings:
import DeviceSettings from 'react-native-device-settings';
class Toto extends React.Component {
openSettings = () => {
DeviceSettings.open();
};
render() {
<Button onClick={this.openSettings}>
Open settings
</Button>
}
}
I get a red screen error saying:
undefined is not an object (evaluating 'RNOpenSettings.generalSettings')
My MainActivity.java
:
package com.MyApp.app;
import com.facebook.react.ReactActivity;
import com.rjblopes.opensettings.OpenSettingsPackage;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "MyApp";
}
}
I've got these lines on my settings.graddle
:
[...]
include ':react-native-device-settings'
project(':react-native-device-settings').projectDir = new File(settingsDir, '../node_modules/react-native-device-settings/android')
[...]
And in my project-level build.gradle
:
dependencies {
[...]
compile project(':react-native-device-settings')
[...]
}
RN: 0.55.3
Library npm version: 1.2.0
Android device: Xiaomi Redmi Note 4X
Android simulator: API 27
[EDIT]
I fixed it, instead of doing what Readme.md
is saying, I put:
import com.rjblopes.opensettings.OpenSettingsPackage; // Add this import
[...]
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new OpenSettingsPackage(), // Add this line
[...]
);
}
[...]
on MainApplication.java
and removed:
import com.rjblopes.opensettings.OpenSettingsPackage;
from MainActivity.java
how to open mobile network (cellular)?
How can I open the mobile network?
The user can turn it on if there is no wifi
Android build fails
.../node_modules/react-native-device-settings/android/src/main/java/com/rjblopes/opensettings/OpenSettingsPackage.java:15: error: method does not override or implement a method from a supertype
@Override
^
1 error
My project has:
"react": "16.0.0-alpha.12",
"react-native": "0.47.1",
I did the setup via npm i react-native-device-settings --save && react-native link react-native-device-settings
.
Everything works well on iOS.
Update npm version
Thank you for this library! It's been working great for me. Do you think you could publish a new version of the package on npm that includes the Android @Override
change from this commit?
Referencing the git tag does, of course, work, but it's certainly not as clear as using semver.
Thanks again!
Open Location settings
Is there any support for this screen right now? really need it for my works. I don't see it in the market now. Thanks.
mobile network and mobile data
Hi, Is it possible to open mobile network for turn on mobile data with this library ?
Open app permissions?
I was wondering if it's possible to open app permissions page in Android instead of just app settings?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.