Skip to content

Commit

Permalink
Merge branch 'master' into bump_targetSdk_to_34
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilay-squareup committed Sep 16, 2024
2 parents e1bcc4a + 1def276 commit 1442195
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## Changelog

### v5.0.0 Aug 22st, 2023
### v4.0.1 Aug 29st, 2024

* Upgrade to Reader SDK 1.7.7 on Android.
* Support CompileSDK and targetSDK 33 on Android
* Support CompileSDK and targetSDK 34 on Android
* Fixed the [issue](https://github.com/square/reader-sdk-flutter-plugin/pull/116) with resuming the app after process is killed on Android.

### v4.0.0 Sep 1st, 2022

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ private void initializeReaderSdk() {
return;
}

ReaderSdk.initialize(currentActivity.getApplication());
sdkInitialized = true;
try {
ReaderSdk.initialize(currentActivity.getApplication());
sdkInitialized = true;
} catch (IllegalStateException e) {
// allow double-initialization; devs _should_ init in Application.onCreate,
// but to be non-breaking we try here also in case they didn't.
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
*/
package com.example.flutter.squareup.sdk.reader;

import io.flutter.embedding.android.FlutterActivity
import androidx.annotation.NonNull;

class MainActivity: FlutterActivity() {
import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
*/
package com.example.flutter.squareup.sdk.reader;

import io.flutter.app.FlutterApplication
import com.squareup.sdk.reader.ReaderSdk;
import io.flutter.app.FlutterApplication;

class MainApplication: FlutterApplication() {
import io.flutter.view.FlutterMain;


public class MainApplication extends FlutterApplication {

@Override
public void onCreate() {
super.onCreate();
ReaderSdk.initialize(this);
FlutterMain.startInitialization(this);
}
}

0 comments on commit 1442195

Please sign in to comment.