Skip to content

Commit ebb000d

Browse files
authored
Merge pull request #1 from jhomlala/master
Feat/0.0.84 (jhomlala#1307)
2 parents f6a77cf + 40e88b9 commit ebb000d

File tree

84 files changed

+701
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+701
-688
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
## 0.0.84
2+
* [BREAKING_CHANGE] Updated min. Flutter version to 3.3.0 and min. Dart version to 3.0.0.
3+
* Recreated example project.
4+
* Replaced wakelock with wakelock plus.
5+
* Updated other dependencies.
6+
* Updated metadata.
7+
18
## 0.0.83
2-
* Updated dependencies
3-
* Fixed Flutter 3.0 issues
9+
* Updated dependencies.
10+
* Fixed Flutter 3.0 issues.
411

512
## 0.0.82
613
* Updated ExoPlayer version to 2.17.1.
@@ -563,7 +570,7 @@ setBetterPlayerGlobalKey.
563570
* Updated documentation.
564571

565572
## 0.0.2
566-
* Moved example project from better_player_example to example.
573+
* Moved example project from example to example.
567574

568575
## 0.0.1
569576
* Initial release.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![pub package](https://img.shields.io/github/license/jhomlala/betterplayer.svg?style=flat)](https://github.com/jhomlala/betterplayer)
88
[![pub package](https://img.shields.io/badge/platform-flutter-blue.svg)](https://github.com/jhomlala/betterplayer)
99

10-
Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run.
10+
Advanced video player. It solves many typical use cases and it's easy to run.
1111

1212
<table>
1313
<tr>

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
```yaml
66
dependencies:
7-
better_player: ^0.0.83
7+
better_player: ^0.0.84
88
```
99
1010
2. Install it

docs/notificationconfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ Important note for android:
4646
You need to add special service in android native code. Service will simply destroy all remaining notifications.
4747
This service need to be used to handle situation when app is killed without proper player destroying.
4848
Check `BetterPlayerService` in example project to see how to add this service to your app.
49-
https://github.com/jhomlala/betterplayer/blob/feature/player_notifications/example/android/app/src/main/kotlin/com/jhomlala/better_player_example/BetterPlayerService.kt
49+
https://github.com/jhomlala/betterplayer/blob/feature/player_notifications/example/android/app/src/main/kotlin/com/jhomlala/example/BetterPlayerService.kt
5050

5151
Here is an example of player with notification: https://github.com/jhomlala/betterplayer/blob/feature/player_notifications/example/lib/pages/notification_player_page.dart

example/.gitignore

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,36 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml
1415
*.ipr
1516
*.iws
1617
.idea/
17-
.vscode/
1818

1919
# The .vscode folder contains launch configuration and tasks you configure in
2020
# VS Code which you may wish to be included in version control, so this line
2121
# is commented out by default.
2222
#.vscode/
2323

2424
# Flutter/Dart/Pub related
25-
pubspec.lock
2625
**/doc/api/
26+
**/ios/Flutter/.last_build_id
2727
.dart_tool/
2828
.flutter-plugins
2929
.flutter-plugins-dependencies
30-
.packages
3130
.pub-cache/
3231
.pub/
3332
/build/
3433

35-
# Web related
36-
lib/generated_plugin_registrant.dart
34+
# Symbolication related
35+
app.*.symbols
3736

38-
# Exceptions to above rules.
39-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
37+
# Obfuscation related
38+
app.*.map.json
4039

40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release

example/.metadata

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 9f5ff2306bb3e30b2b98eee79cd231b1336f41f4
8-
channel: stable
7+
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
17+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
18+
- platform: android
19+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
20+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
21+
- platform: ios
22+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
23+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
24+
- platform: linux
25+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
26+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
27+
- platform: macos
28+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
29+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
30+
- platform: web
31+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
32+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
33+
- platform: windows
34+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
35+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/.vscode/launch.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

example/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# better_player_example
1+
# example
22

3-
A new Flutter application.
3+
Example to showcase use cases of Better Player.
44

55
## Getting Started
66

77
This project is a starting point for a Flutter application.
88

99
A few resources to get you started if this is your first Flutter project:
1010

11-
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313

14-
For help getting started with Flutter, view our
15-
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
1616
samples, guidance on mobile development, and a full API reference.

example/analysis_options.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

example/android/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,58 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
6+
}
7+
18
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
9+
def localPropertiesFile = rootProject.file("local.properties")
310
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localPropertiesFile.withReader("UTF-8") { reader ->
512
localProperties.load(reader)
613
}
714
}
815

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
1517
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
18+
flutterVersionCode = "1"
1719
}
1820

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
def flutterVersionName = localProperties.getProperty("flutter.versionName")
2022
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
23+
flutterVersionName = "1.0"
2224
}
2325

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2826
android {
29-
compileSdkVersion 31
27+
namespace = "pl.hasoft.example"
28+
compileSdk = flutter.compileSdkVersion
29+
ndkVersion = flutter.ndkVersion
3030

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
33-
}
34-
35-
lintOptions {
36-
disable 'InvalidPackage'
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
3734
}
3835

3936
defaultConfig {
40-
applicationId "com.jhomlala.better_player_example"
41-
minSdkVersion 16
42-
targetSdkVersion 31
43-
versionCode flutterVersionCode.toInteger()
44-
versionName flutterVersionName
45-
multiDexEnabled true
46-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
37+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38+
applicationId = "pl.hasoft.example"
39+
// You can update the following values to match your application needs.
40+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41+
minSdk = flutter.minSdkVersion
42+
targetSdk = flutter.targetSdkVersion
43+
versionCode = flutterVersionCode.toInteger()
44+
versionName = flutterVersionName
4745
}
4846

4947
buildTypes {
5048
release {
51-
signingConfig signingConfigs.debug
49+
// TODO: Add your own signing config for the release build.
50+
// Signing with the debug keys for now, so `flutter run --release` works.
51+
signingConfig = signingConfigs.debug
5252
}
5353
}
5454
}
5555

5656
flutter {
57-
source '../..'
58-
}
59-
60-
dependencies {
61-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
62-
implementation "androidx.multidex:multidex:$multidexVersion"
57+
source = "../.."
6358
}

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.jhomlala.better_player_example">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>
Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:tools="http://schemas.android.com/tools"
3-
package="com.jhomlala.better_player_example">
4-
<application android:usesCleartextTraffic="true"
5-
android:label="Better Player Example"
6-
android:icon="@mipmap/ic_launcher">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="example"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher"
6+
android:usesCleartextTraffic="true">
77
<activity
88
android:name=".MainActivity"
9-
android:configChanges=
10-
"screenSize|smallestScreenSize|screenLayout|orientation"
11-
android:hardwareAccelerated="true"
12-
android:launchMode="singleTask"
13-
android:resizeableActivity="true"
14-
android:supportsPictureInPicture="true"
9+
android:exported="true"
10+
android:launchMode="singleTop"
11+
android:taskAffinity=""
1512
android:theme="@style/LaunchTheme"
16-
android:windowSoftInputMode="adjustResize"
17-
android:exported="true">
13+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
14+
android:hardwareAccelerated="true"
15+
android:windowSoftInputMode="adjustResize">
16+
<!-- Specifies an Android theme to apply to this Activity as soon as
17+
the Android process has started. This theme is visible to the user
18+
while the Flutter UI initializes. After that, this theme continues
19+
to determine the Window background behind the Flutter UI. -->
20+
<meta-data
21+
android:name="io.flutter.embedding.android.NormalTheme"
22+
android:resource="@style/NormalTheme"
23+
/>
1824
<intent-filter>
19-
<action android:name="android.intent.action.MAIN" />
20-
<category android:name="android.intent.category.LAUNCHER" />
25+
<action android:name="android.intent.action.MAIN"/>
26+
<category android:name="android.intent.category.LAUNCHER"/>
2127
</intent-filter>
2228
</activity>
29+
<!-- Don't delete the meta-data below.
30+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
2331
<meta-data
2432
android:name="flutterEmbedding"
2533
android:value="2" />
26-
<service
27-
android:name=".BetterPlayerService"
28-
android:stopWithTask="false" />
29-
3034
</application>
35+
<!-- Required to query activities that can process text, see:
36+
https://developer.android.com/training/package-visibility and
37+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
3138
32-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
33-
<uses-permission android:name="android.permission.INTERNET" />
39+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
40+
<queries>
41+
<intent>
42+
<action android:name="android.intent.action.PROCESS_TEXT"/>
43+
<data android:mimeType="text/plain"/>
44+
</intent>
45+
</queries>
3446
</manifest>

0 commit comments

Comments
 (0)