Owner changes:

Android:
Kotlin Package: `com.apptreesoftware.barcodescan` -> `de.mintware.barcode_scan`
Manifest-Package: `com.yourcompany.barcodescan` -> `de.mintware.barcodescan`
Activity: `com.apptreesoftware.barcodescan.BarcodeScannerActivity` -> `de.mintware.barcode_scan.BarcodeScannerActivity`

iOS:
Bundle ID: `com.apptreesoftware.barcode.plugin.example` -> `de.mintware.barcode_scan.plugin.example`

Flutter:
Method channel: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`
pubspec.yaml:
 - homepage updated
 - deprecated author entry removed
 - comments removed
 - flutter.plugin.androidPackage: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`

README.md updated and UPGRADE.md added
This commit is contained in:
Julian Finkler 2020-02-19 23:19:14 +01:00
parent fd166d9915
commit 14a744d0af
20 changed files with 111 additions and 129 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ build/
ios/.generated/
packages
pubspec.lock
example/ios/Podfile.lock

View File

@ -2,13 +2,14 @@
Features:
- [Add-to-app support](https://github.com/mintware-de/flutter_barcode_reader/pull/168) - @santiihoyos
- Changed overlay to full screen in iOS 13
Bugfixes:
- [Fixed rotation on iOS](https://github.com/mintware-de/flutter_barcode_reader/pull/167) - @mintware-de
- [#61 Rotating orientation on iPhones only shows half the screen](https://github.com/mintware-de/flutter_barcode_reader/issues/61)
Changes:
- [Fix compile warning](https://github.com/apptreesoftware/flutter_barcode_reader/pull/127) - @lookfirst
- [Fix compile warning](https://github.com/mintware-de/flutter_barcode_reader/pull/127) - @lookfirst
- [Upgrade gradle](https://github.com/mintware-de/flutter_barcode_reader/pull/142) - @SuuSoJeat
- `com.android.tools.build:gradle`: 3.3.1 -> 3.5.0
- `org.jetbrains.kotlin:kotlin-gradle-plugin`: 1.3.20 -> 1.3.50
@ -16,40 +17,41 @@ Changes:
- `targetSdkVersion`: 28 -> 29
- `gradle`: 4.10.2 -> 5.4.1
- [Package description updated](https://github.com/mintware-de/flutter_barcode_reader/pull/180) - @connectety
- README.md and LICENSE.md updated
- Since the project owner has been changed, the package names are different. Checkout the [UPGRADE.md](./UPGRADE.md) for details.
## [1.0.0] - 8/30/18
## v1.0.0 - 2018-08-30
Breaking Change: Adds support for AndroidX
## [0.0.8] - 8/30/18
## v0.0.8 - 2018-08-30
* Fixes [iOS: pressing cancel doesn't stop scanning](https://github.com/apptreesoftware/flutter_barcode_reader/issues/60) thanks to @tgezginis.
* Fixes [iOS: pressing cancel doesn't stop scanning](https://github.com/mintware-de/flutter_barcode_reader/issues/60) thanks to @tgezginis.
## [0.0.7] - 8/30/18
## v0.0.7 - 2018-08-30
* Fix iOS barcodes not scanning
## [0.0.6] - 8/29/18
## v0.0.6 - 2018-08-29
* Fix android dependencies
* iOS scanner now looks like Android thanks to @dustin-graham
## [0.0.4] - 2/8/18
## v0.0.4 - 2018-02-8
* Fix missing gradle dependency (thanks to [toteto](https://github.com/apptreesoftware/flutter_barcode_reader/pull/15))
* Fix missing gradle dependency (thanks to [toteto](https://github.com/mintware-de/flutter_barcode_reader/pull/15))
* Update gradle dependencies
## [0.0.3] - 2/8/17
## v0.0.3 - 2017-02-8
* Improved permission handling (thanks to [BenSower](https://github.com/BenSower))
* Added MIT license
## [0.0.2] - 11/7/17
## v0.0.2 - 2017-11-7
* Rewrite iOS scanner in Objective-C to avoid Swift use_frameworks! conflicts with other plugins (see https://github.com/flutter/flutter/issues/10968)
## [0.0.1] - 10/29/17
## v0.0.1 - 2017-10-29
* Supports 2D & QR Codes
* Control flash while scanning

View File

@ -1,6 +1,7 @@
The MIT License
Copyright (c) 2018 AppTree Software http://www.apptreesoftware.com
Copyright (c) 2020 Julian Finkler https://www.mintware.de
Copyright (c) 2018-2019 AppTree Software http://www.apptreesoftware.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,3 +1,8 @@
[![GitHub license](https://img.shields.io/github/license/mintware-de/flutter_barcode_reader.svg)](https://github.com/mintware-de/flutter_barcode_reader/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/mintware-de/flutter_barcode_reader)](https://github.com/mintware-de/flutter_barcode_reader/stargazers)
[![Pub](https://img.shields.io/pub/v/barcode_scan.svg)](https://pub.dartlang.org/packages/barcode_scan)
[![GitHub forks](https://img.shields.io/github/forks/mintware-de/flutter_barcode_reader)](https://github.com/mintware-de/flutter_barcode_reader/network)
# Barcode Scanner
A flutter plugin for scanning 2D barcodes and QR codes.
@ -13,7 +18,6 @@ Android: https://github.com/dm77/barcodescanner
- [x] Scan QR codes
- [x] Control the flash while scanning
- [x] Permission handling
- [ ] Support multiple barcode libraries
## Getting Started
@ -24,44 +28,49 @@ For Android, you must do the following before you can use the plugin:
`<uses-permission android:name="android.permission.CAMERA" />`
* Add the BarcodeScanner activity to your AndroidManifest.xml. Do NOT modify the name.
`<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>`
* This plugin is written in Kotlin. Therefore, you need to add Kotlin support to your project. See [installing the Kotlin plugin](https://kotlinlang.org/docs/tutorials/kotlin-android.html#installing-the-kotlin-plugin).
Edit your project-level build.gradle file to look like this:
buildscript {
ext.kotlin_version = '1.3.21'
...
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
```groovy
buildscript {
ext.kotlin_version = '1.3.61'
// ...
dependencies {
// ...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// ...
```
Edit your app-level build.gradle file to look like this:
apply plugin: 'kotlin-android'
...
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
...
}
```groovy
apply plugin: 'kotlin-android'
// ...
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// ...
}
```
Now you can depend on the barcode_scan plugin in your pubspec.yaml file:
dependencies:
...
barcode_scan: any
```yaml
dependencies:
# ...
barcode_scan: any
```
Click "Packages get" in Android Studio or run `flutter packages get` in your project folder.
### iOS
To use on iOS, you must add the the camera usage description to your Info.plist
```xml
<dict>
<!-- ... -->
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
<!-- ... -->
</dict>
```

25
UPGRADE.md Normal file
View File

@ -0,0 +1,25 @@
# Upgrade from 1.0.0 to 2.0.0
The simples way for upgrading is by replacing:
- `com.apptreesoftware.barcodescan`
- `com.yourcompany.barcodescan`
- `com.apptreesoftware.barcode_scan`
With: `de.mintware.barcode_scan`
Detailed changes:
Android:
Kotlin Package: `com.apptreesoftware.barcodescan` -> `de.mintware.barcode_scan`
Manifest-Package: `com.yourcompany.barcodescan` -> `de.mintware.barcodescan`
Activity: `com.apptreesoftware.barcodescan.BarcodeScannerActivity` -> `de.mintware.barcode_scan.BarcodeScannerActivity`
iOS:
Bundle ID: `com.apptreesoftware.barcode.plugin.example` -> `de.mintware.barcode_scan.plugin.example`
Flutter:
Method channel: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`
pubspec.yaml:
- homepage updated
- deprecated author entry removed
- comments removed
- flutter.plugin.androidPackage: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`

View File

@ -1,4 +1,6 @@
group 'com.apptreesoftware.barcodescan'
package android
group 'de.mintware.barcode_scan'
version '1.0-SNAPSHOT'
buildscript {
@ -9,7 +11,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
}
}

View File

@ -1,9 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.barcodescan">
package="de.mintware.barcodescan">
<uses-permission android:name="android.permission.CAMERA" />
<application>
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity" />
<activity android:name="de.mintware.barcode_scan.BarcodeScannerActivity" />
</application>
</manifest>

View File

@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescan
package de.mintware.barcode_scan
import android.app.Activity
import android.content.Intent
@ -16,7 +16,7 @@ class BarcodeScanPlugin(private val registrar: Registrar) : MethodCallHandler, P
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "com.apptreesoftware.barcode_scan")
val channel = MethodChannel(registrar.messenger(), "de.mintware.barcode_scan")
val plugin = BarcodeScanPlugin(registrar)
channel.setMethodCallHandler(plugin)
registrar.addActivityResultListener(plugin)

View File

@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescan
package de.mintware.barcode_scan
import android.Manifest
import android.app.Activity

5
example/.gitignore vendored
View File

@ -8,3 +8,8 @@ ios/.generated/
packages
pubspec.lock
.flutter-plugins
.flutter-plugins-dependencies
ios/Flutter.podspec
ios/Flutter/Flutter.podspec
ios/Flutter/flutter_export_environment.sh
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

View File

@ -29,12 +29,12 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.yourcompany.barcodescanexample"
applicationId "de.mintware.barcode_scan_example"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.barcodescanexample">
package="de.mintware.barcode_scan_example">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
@ -16,7 +16,7 @@
android:label="barcode_scan_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name="com.apptreesoftware.barcodescanexample.MainActivity"
android:name="de.mintware.barcode_scan_example.MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"

View File

@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescanexample
package de.mintware.barcode_scan_example
import android.os.Bundle

View File

@ -1 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

View File

@ -1,29 +0,0 @@
PODS:
- barcode_scan (0.0.1):
- Flutter
- MTBBarcodeScanner
- Flutter (1.0.0)
- MTBBarcodeScanner (5.0.11)
DEPENDENCIES:
- barcode_scan (from `/Users/matthew/AppTree/plugins/barcode_scan/ios`)
- Flutter (from `/Users/matthew/Library/flutter/bin/cache/artifacts/engine/ios`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- MTBBarcodeScanner
EXTERNAL SOURCES:
barcode_scan:
:path: "/Users/matthew/AppTree/plugins/barcode_scan/ios"
Flutter:
:path: "/Users/matthew/Library/flutter/bin/cache/artifacts/engine/ios"
SPEC CHECKSUMS:
barcode_scan: 33f586d02270046fc6559135038b34b5754eaa4f
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
PODFILE CHECKSUM: 407db753d18e8726329521f96a8fa0bebaef3f42
COCOAPODS: 1.6.1

View File

@ -180,7 +180,6 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = RTZBJSE8E8;
LastSwiftMigration = 0830;
};
};
@ -274,7 +273,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../../../../../../Library/flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
"${PODS_ROOT}/../../../../../development/flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@ -416,7 +415,6 @@
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = RTZBJSE8E8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@ -428,7 +426,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.apptreesoftware.barcode.plugin.example;
PRODUCT_BUNDLE_IDENTIFIER = de.mintware.barcode_scan.plugin.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -443,7 +441,6 @@
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = RTZBJSE8E8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@ -455,7 +452,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.apptreesoftware.barcode.plugin.example;
PRODUCT_BUNDLE_IDENTIFIER = de.mintware.barcode_scan.plugin.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;

View File

@ -3,7 +3,7 @@
@implementation BarcodeScanPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:@"com.apptreesoftware.barcode_scan"
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:@"de.mintware.barcode_scan"
binaryMessenger:registrar.messenger];
BarcodeScanPlugin *instance = [BarcodeScanPlugin new];
instance.hostViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
@ -22,10 +22,12 @@
- (void)showBarcodeView {
BarcodeScannerViewController *scannerViewController = [[BarcodeScannerViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:scannerViewController];
if (@available(iOS 13.0, *)) {
[navigationController setModalPresentationStyle:UIModalPresentationFullScreen];
}
scannerViewController.delegate = self;
[self.hostViewController presentViewController:navigationController animated:NO completion:nil];
}
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithResult:(NSString *)result {
if (self.result) {
self.result(result);

View File

@ -6,6 +6,6 @@ class BarcodeScanner {
static const CameraAccessDenied = 'PERMISSION_NOT_GRANTED';
static const UserCanceled = 'USER_CANCELED';
static const MethodChannel _channel =
const MethodChannel('com.apptreesoftware.barcode_scan');
const MethodChannel('de.mintware.barcode_scan');
static Future<String> scan() async => await _channel.invokeMethod('scan');
}

View File

@ -1,8 +1,7 @@
name: barcode_scan
description: A flutter plugin for scanning 2D barcodes and QRCodes via camera.
version: 1.0.0
author: Matthew Smith<matthew.smith@apptreesoftware.com>
homepage: https://github.com/apptreesoftware/flutter_barcode_reader
homepage: https://github.com/mintware-de/flutter_barcode_reader
dependencies:
flutter:
@ -11,42 +10,7 @@ dependencies:
environment:
sdk: ">=2.0.0-dev.58.0 <3.0.0"
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
plugin:
androidPackage: com.apptreesoftware.barcodescan
androidPackage: de.mintware.barcode_scan
pluginClass: BarcodeScanPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.io/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.io/custom-fonts/#from-packages