flutter_android 0.2.3

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

Android Bindings for Flutter

Project license Pub package Dartdoc reference Travis CI build status

This is a Flutter plugin for Android platform-specific APIs.

Features

  • Implements bindings to a growing set of Android's platform-specific APIs.

  • Reduces duplication of effort by centralizing Android bindings in a single package.

Compatibility

Android only.

Reference

android

import 'package:flutter_android/android.dart' as android;

android_app

import 'package:flutter_android/android_app.dart' as android_app;

android_content

import 'package:flutter_android/android_content.dart' as android_content;

android_database

import 'package:flutter_android/android_database.dart' as android_database;

android_os

import 'package:flutter_android/android_os.dart' as android_os;

Cross-Reference

AndroidFlutter
android.appandroid_app
android.app.Activityandroid_app.Activity
android.app.ActivityManagerandroid_app.ActivityManager
android.app.AlarmManagerandroid_app.AlarmManager
android.app.AuthenticationRequiredExceptionandroid_app.AuthenticationRequiredException
android.app.DownloadManagerandroid_app.DownloadManager
android.app.KeyguardManagerandroid_app.KeyguardManager
android.app.Notificationandroid_app.Notification
android.app.Notification.Actionandroid_app.NotificationAction
android.app.Notification.Builderandroid_app.NotificationBuilder
android.app.NotificationManagerandroid_app.NotificationManager
android.app.PendingIntentandroid_app.PendingIntent
android.app.SearchManagerandroid_app.SearchManager
android.app.WallpaperColorsandroid_app.WallpaperColors
android.app.WallpaperInfoandroid_app.WallpaperInfo
android.app.WallpaperManagerandroid_app.WallpaperManager
android.bluetoothandroid_bluetooth
android.contentandroid_content
android.content.ActivityNotFoundExceptionandroid_content.ActivityNotFoundException
android.content.ComponentNameandroid_content.ComponentName
android.content.ContentValuesandroid_content.ContentValues
android.content.Contextandroid_content.Context
android.content.Intentandroid_content.Intent
android.content.IntentFilterandroid_content.IntentFilter
android.content.SharedPreferencesandroid_content.SharedPreferences
android.databaseandroid_database
android.database.Cursorandroid_database.Cursor
android.database.CursorIndexOutOfBoundsExceptionandroid_database.CursorIndexOutOfBoundsException
android.database.DatabaseUtilsandroid_database.DatabaseUtils
android.database.MatrixCursorandroid_database.MatrixCursor
android.database.SQLExceptionandroid_database.SQLException
android.graphics.Colordart-ui.Color
android.graphics.drawable.Iconflutter.Icon
android.hardwareandroid_hardware
android.locationandroid_location
android.mediaandroid_media
android.netandroid_net
android.nfcandroid_nfc
android.osandroid_os
android.os.BatteryManagerandroid_os.BatteryManager
android.os.Buildandroid_os.Build
android.os.Bundleandroid_os.Bundle
android.os.Environmentandroid_os.Environment
android.os.HardwarePropertiesManagerandroid_os.HardwarePropertiesManager
android.os.Parcelandroid_os.Parcel
android.os.Parcelableandroid_os.Parcelable
android.os.PowerManagerandroid_os.PowerManager
android.os.Processandroid_os.Process
android.os.StatFsandroid_os.StatFs
android.os.SystemClockandroid_os.SystemClock
android.os.UserManagerandroid_os.UserManager
android.os.VibrationEffectandroid_os.VibrationEffect
android.os.Vibratorandroid_os.Vibrator
android.providerandroid_provider
android.securityandroid_security
android.speechandroid_speech
android.telephonyandroid_telephony
android.viewandroid_view
java.util.Localedart-ui.Locale

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.2.3 - 2018-12-10

Added

  • android_content.Context.getSharedPreferences() method
  • android_content.SharedPreferences class

0.2.2 - 2018-12-08

Changed

  • Made android_database.Cursor iterable

0.2.1 - 2018-12-06

Changed

  • Enhanced the example application and added a screenshot

0.2.0 - 2018-12-05

Changed

  • android_database.Cursor#getBlob() now returns a Uint8List, not a ByteBuffer

0.1.14 - 2018-12-04

Added

  • android_content.ContentValues class

0.1.13 - 2018-11-23

Added

  • android_app.ActivityManager.isRunningInTestHarness getter

0.1.12 - 2018-11-22

Changed

  • Corrected the return value for android_database.Cursor#moveToNext()

0.1.11 - 2018-11-21

Added

  • android_database.MatrixCursor class

Changed

  • Corrected return values for android_database.Cursor#moveTo*() methods

0.1.10 - 2018-11-21

Added

  • android_database.DatabaseUtils static methods

0.1.9 - 2018-11-21

Added

  • android_app.Notification class
  • android_app.NotificationAction class

0.1.8 - 2018-11-20

Added

0.1.7 - 2018-11-15

Added

  • android_database.Cursor#get() method

Changed

  • android_database.CursorIndexOutOfBoundsException constructor

0.1.6 - 2018-11-15

Added

  • android_database.Cursor interface
  • android_database.CursorIndexOutOfBoundsException exception
  • android_database.DatabaseUtils class
  • android_database.SQLException exception

0.1.5 - 2018-11-15

Added

  • android_app.WallpaperColors class
  • android_content.ComponentName class
  • android_content.Intent class
  • android_os.Bundle class

0.1.4 - 2018-11-14

Added

  • android_bluetooth library
  • android_database library
  • android_hardware library
  • android_location library
  • android_media library
  • android_net library
  • android_nfc library
  • android_provider library
  • android_security library
  • android_speech library
  • android_telephony library
  • android_view library

0.1.3 - 2018-11-14

Added

  • android_content.Context.*_SERVICE constants
  • android_content.Context.getSystemService() method

Changed

  • All plugin code is now protected by a LocalPlatform().isAndroid assertion
  • The appropriate classes now implement android_os.Parcelable

0.1.2 - 2018-11-14

Added

0.1.1 - 2018-11-03

Added

  • android_os library
  • android_os.Environment.dataDirectory getter
  • android_os.Environment.downloadCacheDirectory getter
  • android_os.Environment.externalStorageDirectory getter
  • android_os.Environment.externalStorageState getter
  • android_os.Environment.rootDirectory getter
  • android_os.Environment.isExternalStorageEmulated getter
  • android_os.Environment.isExternalStorageRemovable getter

0.1.0 - 2018-11-03

Added

  • android_content library
  • android_content.Context.cacheDir getter
  • android_content.Context.codeCacheDir getter
  • android_content.Context.dataDir getter
  • android_content.Context.externalCacheDir getter
  • android_content.Context.externalFilesDir getter
  • android_content.Context.filesDir getter
  • android_content.Context.noBackupFilesDir getter
  • android_content.Context.packageCodePath getter
  • android_content.Context.packageName getter
  • android_content.Context.packageResourcePath getter

example/README.md

flutter_android_example

Demonstrates how to use the flutter_android plugin.

Screenshot

Screenshot

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_android: ^0.2.3

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:flutter_android/android.dart';
import 'package:flutter_android/android_app.dart';
import 'package:flutter_android/android_bluetooth.dart';
import 'package:flutter_android/android_content.dart';
import 'package:flutter_android/android_database.dart';
import 'package:flutter_android/android_hardware.dart';
import 'package:flutter_android/android_location.dart';
import 'package:flutter_android/android_media.dart';
import 'package:flutter_android/android_net.dart';
import 'package:flutter_android/android_nfc.dart';
import 'package:flutter_android/android_os.dart';
import 'package:flutter_android/android_provider.dart';
import 'package:flutter_android/android_security.dart';
import 'package:flutter_android/android_speech.dart';
import 'package:flutter_android/android_telephony.dart';
import 'package:flutter_android/android_view.dart';
  
Version Uploaded Documentation Archive
0.2.3 Dec 10, 2018 Go to the documentation of flutter_android 0.2.3 Download flutter_android 0.2.3 archive
0.2.2 Dec 8, 2018 Go to the documentation of flutter_android 0.2.2 Download flutter_android 0.2.2 archive
0.2.1 Dec 6, 2018 Go to the documentation of flutter_android 0.2.1 Download flutter_android 0.2.1 archive
0.2.0 Dec 5, 2018 Go to the documentation of flutter_android 0.2.0 Download flutter_android 0.2.0 archive
0.1.14 Dec 4, 2018 Go to the documentation of flutter_android 0.1.14 Download flutter_android 0.1.14 archive
0.1.13 Nov 23, 2018 Go to the documentation of flutter_android 0.1.13 Download flutter_android 0.1.13 archive
0.1.12 Nov 22, 2018 Go to the documentation of flutter_android 0.1.12 Download flutter_android 0.1.12 archive
0.1.11 Nov 21, 2018 Go to the documentation of flutter_android 0.1.11 Download flutter_android 0.1.11 archive
0.1.10 Nov 21, 2018 Go to the documentation of flutter_android 0.1.10 Download flutter_android 0.1.10 archive
0.1.9 Nov 21, 2018 Go to the documentation of flutter_android 0.1.9 Download flutter_android 0.1.9 archive

All 20 versions...

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

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10
  • Flutter: 1.1.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/os/build.dart. (-1 points)

Analysis of lib/src/os/build.dart reported 2 hints:

line 17 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 25 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Fix lib/src/os/user_manager.dart. (-0.50 points)

Analysis of lib/src/os/user_manager.dart reported 1 hint:

line 16 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/android.dart.

Run flutter format to format lib/android.dart.

Fix additional 27 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/android_database.dart (Run flutter format to format lib/android_database.dart.)
  • lib/src/app/activity.dart (Run flutter format to format lib/src/app/activity.dart.)
  • lib/src/app/activity_manager.dart (Run flutter format to format lib/src/app/activity_manager.dart.)
  • lib/src/app/alarm_manager.dart (Run flutter format to format lib/src/app/alarm_manager.dart.)
  • lib/src/app/download_manager.dart (Run flutter format to format lib/src/app/download_manager.dart.)
  • lib/src/app/exceptions.dart (Run flutter format to format lib/src/app/exceptions.dart.)
  • lib/src/app/keyguard_manager.dart (Run flutter format to format lib/src/app/keyguard_manager.dart.)
  • lib/src/app/notification_builder.dart (Run flutter format to format lib/src/app/notification_builder.dart.)
  • lib/src/app/notification_manager.dart (Run flutter format to format lib/src/app/notification_manager.dart.)
  • lib/src/app/search_manager.dart (Run flutter format to format lib/src/app/search_manager.dart.)
  • lib/src/app/wallpaper_info.dart (Run flutter format to format lib/src/app/wallpaper_info.dart.)
  • lib/src/app/wallpaper_manager.dart (Run flutter format to format lib/src/app/wallpaper_manager.dart.)
  • lib/src/content/component_name.dart (Run flutter format to format lib/src/content/component_name.dart.)
  • lib/src/content/context.dart (Run flutter format to format lib/src/content/context.dart.)
  • lib/src/content/intent_filter.dart (Run flutter format to format lib/src/content/intent_filter.dart.)
  • lib/src/content/shared_preferences.dart (Run flutter format to format lib/src/content/shared_preferences.dart.)
  • lib/src/database/cursor.dart (Run flutter format to format lib/src/database/cursor.dart.)
  • lib/src/database/database_utils.dart (Run flutter format to format lib/src/database/database_utils.dart.)
  • lib/src/database/matrix_cursor.dart (Run flutter format to format lib/src/database/matrix_cursor.dart.)
  • lib/src/os/battery_manager.dart (Run flutter format to format lib/src/os/battery_manager.dart.)
  • lib/src/os/environment.dart (Run flutter format to format lib/src/os/environment.dart.)
  • lib/src/os/hardware_properties_manager.dart (Run flutter format to format lib/src/os/hardware_properties_manager.dart.)
  • lib/src/os/parcel.dart (Run flutter format to format lib/src/os/parcel.dart.)
  • lib/src/os/parcelable.dart (Run flutter format to format lib/src/os/parcelable.dart.)
  • lib/src/os/power_manager.dart (Run flutter format to format lib/src/os/power_manager.dart.)
  • lib/src/os/vibration_effect.dart (Run flutter format to format lib/src/os/vibration_effect.dart.)
  • lib/src/os/vibrator.dart (Run flutter format to format lib/src/os/vibrator.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
flutter 0.0.0
meta ^1.1.6 1.1.6 1.1.7
platform ^2.2.0 2.2.0
Transitive dependencies
collection 1.14.11
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
test >=1.3.4 <2.0.0