Skip to content

Commit

Permalink
#42: Add fix for TransactionTooLargeException to README
Browse files Browse the repository at this point in the history
  • Loading branch information
moberwasserlechner committed Jul 5, 2023
1 parent cd267d4 commit 1bba282
Show file tree
Hide file tree
Showing 5 changed files with 2,186 additions and 1,748 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.1] - 2023-07-10

### Fixed

- Add Android config to readme. [#42](https://github.com/moberwasserlechner/capacitor-filesharer/issues/42)

## [4.0.0] - 2022-09-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Michael Oberwasserlechner
Copyright (c) 2023 Michael Oberwasserlechner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@ On Web/PWA the plugin is registered **automatically** by Capacitor.

Prerequisite: [Capacitor Android Docs](https://capacitor.ionicframework.com/docs/android/configuration)

### Configure

Add `outState.clear()` to your `MainActivity`. This fixes `android.os.TransactionTooLargeException` when sharing larger files.

```java
package com.company.project;

import android.os.Bundle;
import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.clear();
}
}
```

### Register plugin
On Android the plugin is registered **automatically** by Capacitor.

Expand All @@ -116,12 +136,6 @@ See [CHANGELOG](https://github.com/moberwasserlechner/capacitor-filesharer/blob/

MIT. Please see [LICENSE](https://github.com/moberwasserlechner/capacitor-filesharer/blob/main/LICENSE).

## BYTEOWLS Software & Consulting

This plugin is powered by [BYTEOWLS Software & Consulting](https://byteowls.com).

If you need extended support for this project like critical changes or releases ahead of schedule. Feel free to contact us for a consulting offer.

## Disclaimer

We have no business relation to Ionic.
Loading

0 comments on commit 1bba282

Please sign in to comment.