Giter VIP home page Giter VIP logo

react-native-android-open-settings's Issues

Battery optimisation

Hello,

can you please add one more setting is battery optimisation, so i can add and remove app from battery optimisation.

thanks

Could not find method implementation() for arguments [com.facebook.react:react-native:+]

"react-native": "^0.54.3",
"react-native-android-open-settings": "^1.2.0",
  • What went wrong:
    A problem occurred evaluating project ':react-native-android-open-settings'.

Could not find method implementation() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

in node_modules/react-native-android-open-settings/android/build.gradle

modify

dependencies {
    implementation 'com.facebook.react:react-native:+'
}

to

dependencies {
    compile 'com.facebook.react:react-native:+'
}

and it works

Add appPermissionSettings method

Would be great if you could add a method to open the App Permissions screen directly.

screen shot 2019-02-22 at 8 52 37 pm

That way we can directly prompt the user to turn on calendar permission (that's my use case right now)

But overall, awesome library! I am using the appDetailsSettings and it does exactly what it's supposed to do. Thanks!

Return promises?

Sometimes is useful to be able to run some code after you return from settings. Currently have a JavaScript helper I was using based on AppState. Not sure if there is a better 'native' way to do this, but happy to make PR to wrap the exported functions or include as a helper if this is useful to anyone. Thanks for lib!

e.g.

openDroidSetting(AndroidOpenSettings.appDetailsSettings).then(() => {
    // back from settings!
    // re-check permission and do stuff..
});

function openDroidSetting(settingFunc) {
  return new Promise((resolve, reject) => {
    const listener = (state) => {
      if (state === 'active') {
        AppState.removeEventListener('change', listener);
        resolve();
      }
    };
    AppState.addEventListener('change', listener);
    try {
      settingFunc();
    }
    catch (e) {
      AppState.removeEventListener('change', listener);
      reject(e);
    }
  });
}

settings not being opened on button click.

Hi I am using this in my react-native project.
on button click I am setting the AndroidOpenSettings.locationSourceSettings()
method. So as per the docs, it should open the location settings which it is not moving to the settings screen.
please clarify this error.
Thanks in advance.

Proposal: Add an open source license

Thanks for sharing this project! We'd love to use it as part of the Mattermost open source project (https://mattermost.com/) in our React Native mobile app (which uses an Apache 2.0 license).

Would you consider adding either an MIT or an Apache 2.0 license?

To do so, in GitHub you can hit "Create new file" and name a file LICENSE.txt.

If you use either an MIT license or an Apache 2.0 license it would make it easy to add your work to other open source projects, and we'd love to include your work in ours.

Thanks kindly for your consideration.

App info settings

How can I access my app's specific settings, where I can view permissions, storage, data usage and so on?

TypeError: null is not an object (evaluating 'RNAndroidOpenSettings.generalSettings')

Screenshot_1620028699

ERROR TypeError: null is not an object (evaluating 'RNAndroidOpenSettings.generalSettings')

This error is located at:
in Settings (at Setalarm.js:197)
in RCTView (at View.js:34)
in View (at Setalarm.js:196)
in RCTView (at View.js:34)
in View (at Setalarm.js:203)
in Setalarm (at SceneView.tsx:122)
in StaticContainer
in EnsureSingleNavigator (at SceneView.tsx:114)
in SceneView (at useDescriptors.tsx:153)
in RCTView (at View.js:34)
in View (at BottomTabView.tsx:55)
in SceneContent (at BottomTabView.tsx:172)
in RNSScreen (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at src/index.native.tsx:127)
in Screen (at ResourceSavingScene.tsx:30)
in ResourceSavingScene (at BottomTabView.tsx:166)
in RNSScreenContainer (at src/index.native.tsx:165)
in ScreenContainer (at BottomTabView.tsx:146)
in SafeAreaProviderCompat (at BottomTabView.tsx:145)
in BottomTabView (at createBottomTabNavigator.tsx:45)
in BottomTabNavigator (at Tabs.js:14)
in Tabs (at SceneView.tsx:122)
in StaticContainer
in EnsureSingleNavigator (at SceneView.tsx:114)
in SceneView (at useDescriptors.tsx:153)
in RCTView (at View.js:34)
in View (at CardContainer.tsx:245)
in RCTView (at View.js:34)
in View (at CardContainer.tsx:244)
in RCTView (at View.js:34)
in View (at CardSheet.tsx:33)
in CardSheet (at Card.tsx:573)
in RCTView (at View.js:34)
in View (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at Card.tsx:555)
in PanGestureHandler (at GestureHandlerNative.tsx:13)
in PanGestureHandler (at Card.tsx:549)
in RCTView (at View.js:34)
in View (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at Card.tsx:544)
in RCTView (at View.js:34)
in View (at Card.tsx:538)
in Card (at CardContainer.tsx:206)
in CardContainer (at CardStack.tsx:623)
in RNSScreen (at createAnimatedComponent.js:217)
in AnimatedComponent (at createAnimatedComponent.js:278)
in AnimatedComponentWrapper (at src/index.native.tsx:127)
in Screen (at Screens.tsx:74)
in MaybeScreen (at CardStack.tsx:616)
in RNSScreenContainer (at src/index.native.tsx:165)
in ScreenContainer (at Screens.tsx:50)
in MaybeScreenContainer (at CardStack.tsx:498)
in CardStack (at StackView.tsx:462)
in KeyboardManager (at StackView.tsx:458)
in RNCSafeAreaProvider (at SafeAreaContext.tsx:76)
in SafeAreaProvider (at SafeAreaProviderCompat.tsx:42)
in SafeAreaProviderCompat (at StackView.tsx:455)
in GestureHandlerRootView (at GestureHandlerRootView.android.tsx:26)
in GestureHandlerRootView (at StackView.tsx:454)
in StackView (at createStackNavigator.tsx:87)
in StackNavigator (at App.js:12)
in EnsureSingleNavigator (at BaseNavigationContainer.tsx:409)
in BaseNavigationContainer (at NavigationContainer.tsx:91) in ThemeProvider (at NavigationContainer.tsx:90)
in NavigationContainer (at App.js:11)
in App (at renderApplication.js:47)
in RCTView (at View.js:34)
in View (at AppContainer.js:107)
in RCTView (at View.js:34)
in View (at AppContainer.js:134)
in AppContainer (at renderApplication.js:40)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.