flutter_android_intent

Last updated:

0 purchases

flutter_android_intent Image
flutter_android_intent Images
Add to Cart

Description:

flutter android intent

Flutter Android Intent Package #
A Flutter package to simplify handling Android intents and actions. This package provides an easy-to-use API to launch URLs, send emails, and open other apps using intents on Android.
Features #

Launch URLs
Send emails
Open apps by class name

Getting Started #
To use this package in your Flutter project, follow these steps:
1. Add Dependency #
Add the flutter_android_intent package to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
flutter_android_intent: ^1.0.0 # Check for the latest version on pub.dev

copied to clipboard
Then, run flutter pub get in your terminal.
2. Import the Package #
Import the package into your Dart file where you want to use it:
import 'package:flutter_android_intent/flutter_android_intent.dart';
copied to clipboard
3. Usage #
Launch a URL in a browser: #
await FlutterAndroidIntent.launchUrl('https://www.example.com');
copied to clipboard
To send an email: #
await FlutterAndroidIntent.sendEmail(
to: '[email protected]',
subject: 'Hello',
body: 'This is a test email.',
);
copied to clipboard
Open an app by class name: #
await FlutterAndroidIntent.openAppViaClassName(className: 'com.example.app.MainActivity');
copied to clipboard
Permissions #
Make sure to add the necessary permissions to your AndroidManifest.xml file. For example, if you want to send emails, you need to add the INTERNET and WRITE_EXTERNAL_STORAGE permissions:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abhixv.flutter_android_intent">

<application
android:label="flutter_android_intent"
android:icon="@mipmap/ic_launcher">
<!-- Add other necessary configurations -->
</application>

<!-- Required permissions -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Add more permissions if needed -->
</manifest>
copied to clipboard
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub if you have suggestions or improvements.
License
This package is licensed under the MIT License. See the LICENSE file for more details.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.