Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support to open sim profile settings #3330

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ private static String convertAction(String action) {
return Settings.ACTION_LOCATION_SOURCE_SETTINGS;
case "action_application_details_settings":
return Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
case "action_manage_all_sim_profiles_settings":
return Settings.ACTION_MANAGE_ALL_SIM_PROFILES_SETTINGS;
default:
return action;
}
Expand Down
12 changes: 12 additions & 0 deletions packages/android_intent_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ class ExplicitIntentsWidget extends StatelessWidget {
intent.launch();
}

void _openSimSettings() {
const AndroidIntent intent = AndroidIntent(
action: 'action_manage_all_sim_profiles_settings',
);
intent.launch();
}

void _openApplicationDetails() {
const intent = AndroidIntent(
action: 'action_application_details_settings',
Expand Down Expand Up @@ -304,6 +311,11 @@ class ExplicitIntentsWidget extends StatelessWidget {
'Tap here to open gmail app with details',
),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => _openSimSettings(),
child: const Text('Tap here to open sim profiles.'),
),
],
),
),
Expand Down