access_settings_menu 0.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new50

access_settings_menu

A flutter plugin to open Android settings menus programatically.

This plugin in only for Android.

The IOS section has not been implemented.

Usage

To use this plugin, add access_settings_menu as a dependency in your pubspec.yaml file.

List of Android settings menu can be found at here. Please refer to contants variable starting by ACTION (e.g. ACTION_ACCESSIBILITY_SETTINGS refers to accessibility settings menu).

Followin action menus have not been implemented as they are deprecated:

  • ACTION_DATA_USAGE_SETTINGS
  • ACTION_FINGERPRINT_ENROL
  • ACTION_STORAGE_VOLUME_ACCESS_SETTINGS

Example

// Import package
import 'package:access_settings_menu/access_settings_menu.dart';

// create an async void to call the API function with settings name as parameter
openSettingsMenu(settingsName) async {
    var resultSettingsOpening = false;

    try {
      resultSettingsOpening =
          await AccessSettingsMenu.openSettings(settingsType: settingsName);
    } catch (e) {
      resultSettingsOpening = false;
    }
}

//call the function to open the desired Android menu
openSettingsMenu("ACTION_ACCESSIBILITY_SETTINGS");

0.0.1

  • Initial release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:access_settings_menu/access_settings_menu.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var _settingsTypes = <String>[
    'ACTION_ACCESSIBILITY_SETTINGS',
    'ACTION_ADD_ACCOUNT',
    'ACTION_AIRPLANE_MODE_SETTINGS',
    'ACTION_APN_SETTINGS',
    'ACTION_APPLICATION_DETAILS_SETTINGS',
    'ACTION_APPLICATION_DEVELOPMENT_SETTINGS',
    'ACTION_APPLICATION_SETTINGS',
    'ACTION_APP_NOTIFICATION_SETTINGS',
    'ACTION_BATTERY_SAVER_SETTINGS',
    'ACTION_BLUETOOTH_SETTINGS',
    'ACTION_CAPTIONING_SETTINGS',
    'ACTION_CAST_SETTINGS',
    'ACTION_CHANNEL_NOTIFICATION_SETTINGS',
    'ACTION_DATA_ROAMING_SETTINGS',
    'ACTION_DATA_USAGE_SETTINGS',
    'ACTION_DATE_SETTINGS',
    'ACTION_DEVICE_INFO_SETTINGS',
    'ACTION_DISPLAY_SETTINGS',
    'ACTION_DREAM_SETTINGS',
    'ACTION_FINGERPRINT_ENROLL',
    'ACTION_HARD_KEYBOARD_SETTINGS',
    'ACTION_HOME_SETTINGS',
    'ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS',
    'ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS',
    'ACTION_INPUT_METHOD_SETTINGS',
    'ACTION_INPUT_METHOD_SUBTYPE_SETTINGS',
    'ACTION_INTERNAL_STORAGE_SETTINGS',
    'ACTION_LOCALE_SETTINGS',
    'ACTION_LOCATION_SOURCE_SETTINGS',
    'ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS',
    'ACTION_MANAGE_APPLICATIONS_SETTINGS',
    'ACTION_MANAGE_DEFAULT_APPS_SETTINGS',
    'ACTION_MANAGE_OVERLAY_PERMISSION',
    'ACTION_MANAGE_UNKNOWN_APP_SOURCES',
    'ACTION_MANAGE_WRITE_SETTINGS',
    'ACTION_MEMORY_CARD_SETTINGS',
    'ACTION_NETWORK_OPERATOR_SETTINGS',
    'ACTION_NFCSHARING_SETTINGS',
    'ACTION_NFC_PAYMENT_SETTINGS',
    'ACTION_NFC_SETTINGS',
    'ACTION_NIGHT_DISPLAY_SETTINGS',
    'ACTION_NOTIFICATION_LISTENER_SETTINGS',
    'ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS',
    'ACTION_PRINT_SETTINGS',
    'ACTION_PRIVACY_SETTINGS',
    'ACTION_QUICK_LAUNCH_SETTINGS',
    'ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS',
    'ACTION_REQUEST_SET_AUTOFILL_SERVICE',
    'ACTION_SEARCH_SETTINGS',
    'ACTION_SECURITY_SETTINGS',
    'ACTION_SETTINGS',
    'ACTION_SHOW_REGULATORY_INFO',
    'ACTION_SOUND_SETTINGS',
    'ACTION_STORAGE_VOLUME_ACCESS_SETTINGS',
    'ACTION_SYNC_SETTINGS',
    'ACTION_USAGE_ACCESS_SETTINGS',
    'ACTION_USER_DICTIONARY_SETTINGS',
    'ACTION_VOICE_CONTROL_AIRPLANE_MODE',
    'ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE',
    'ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE',
    'ACTION_VOICE_INPUT_SETTINGS',
    'ACTION_VPN_SETTINGS',
    'ACTION_VR_LISTENER_SETTINGS',
    'ACTION_WEBVIEW_SETTINGS',
    'ACTION_WIFI_IP_SETTINGS',
    'ACTION_WIFI_SETTINGS',
    'ACTION_WIRELESS_SETTINGS',
    'ACTION_ZEN_MODE_PRIORITY_SETTINGS',
  ];

  @override
  initState() {
    super.initState();
  }

  openSettingsMenu(settingsName) async {
    var resultSettingsOpening = false;

    try {
      resultSettingsOpening =
          await AccessSettingsMenu.openSettings(settingsType: settingsName);
    } catch (e) {
      resultSettingsOpening = false;
    }
  }

  @override
  Widget build(BuildContext context) {
    var dropdown = new ListView(
      children: [
        new Column(
          children: <Widget>[
            new Text('Choose your setting type'),
            new DropdownButton<String>(
              items: _settingsTypes.map((String value) {
                return new DropdownMenuItem<String>(
                  value: value,
                  child: new Text(value),
                );
              }).toList(),
              onChanged: (selectedValue) {
                openSettingsMenu(selectedValue);
              },
            ),
          ],
        ),
      ],
    );

    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Access settings example app'),
        ),
        body: new Center(
          child: dropdown,
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  access_settings_menu: "^0.0.1"

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:access_settings_menu/access_settings_menu.dart';
  
Version Uploaded Documentation Archive
0.0.1 May 23, 2018 Go to the documentation of access_settings_menu 0.0.1 Download access_settings_menu 0.0.1 archive

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3
  • Flutter: 0.5.4

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50
Learn more about scoring.

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.6 1.14.10
meta 1.1.5
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6 2.0.7