Releases: smikhalevski/racehorse
v1.8.0
Changelog: android-racehorse-v1.7.1...android-racehorse-v1.8.0
- Software keyboard animation is seamlessly propagated to the web app if
KeyboardPlugin
is enabled:
import { useKeyboardAnimation, runAnimation } from '@racehorse/react';
useKeyboardAnimation((animation, signal) => {
// Run the animation in sync with the native keyboard animation.
runAnimation(
animation,
{
onProgress(animation, fraction, percent) {
const keyboardHeight = animation.startValue + (animation.endValue - animation.startValue) * fraction;
document.body.style.paddingBottom = keyboardHeight + 'px';
}
},
signal
);
});
-
Added
useKeyboardHeight
anduseWindowInsets
hooks. -
Event marshalling was optimized for better performance. Class member cache was added in
KotlinTypeAdapter
. -
GetKeyboardStatusEvent
,KeyboardStatusChangedEvent
were deprecated, useGetKeyboardHeightEvent
andKeyboardAnimationStartedEvent
instead. -
Renamed
Download.lastModifiedTimestamp
toDownload.lastModifiedTime
. -
Added hooks that provide managers.
-
Fixed keyboard height pixel density.
v1.7.0
Changelog: android-racehorse-v1.6.5...android-racehorse-v1.7.0
- Added contacts plugin:
import { contactsManager } from 'racehorse';
contactsManager.pickContact();
// ⮕ Promise<Contact | null>
contactsManager.getContact(42);
// ⮕ Contact | null
- Added file system plugin:
import { fsManager, Directory } from 'racehorse';
const uri = fsManager.resolve(Directory.CACHE, 'temp.txt');
const file = fsManager.File(uri);
await file.writeText('Hello world!');
await file.readDataUri();
// ⮕ 'data:text/plain;base64,SGVsbG8gd29ybGQh'
EvergreenManager
allows to read extended bundle info:
import { evergreenManager } from 'racehorse';
const { masterDir } = evergreenManager.getBundleInfo();
- Store images and videos in the gallery app after they were captured through file chooser:
import org.racehorse.FileChooserPlugin
import org.racehorse.GalleryCameraFileFactory
EventBus.getDefault().register(
FileChooserPlugin(
activity,
GalleryCameraFileFactory(
activity,
activity.externalCacheDir ?: activity.cacheDir,
BuildConfig.APPLICATION_ID + ".provider"
)
)
)
-
Fixed Google Pay event typings.
-
Fixed SecurityException in addDownload with data URI.
-
Fixed missing MIME types for camera pictures in file chooser.
v1.6.0
-
Version details in activity info.
-
Multiple handlers in the asset loader plugin.
-
LocalhostDevPathHandler
was replaced withProxyPathHandler
. -
Fixed update bundle unzip to support Android 34.
-
Updated dependencies.
v1.5.0
-
Biometric enrollment support for API >= 26.
-
Custom secret keys on-demand configuration.
-
Added operations scheduler.
-
Catch key not authenticated exception.
-
Return empty insets for detached views.
-
Removed
LifecyclePlugin
. -
Moved lifecycle to
ActivityPlugin
and reduced it to background, foreground, and active:
activityManager.subscribe('background', () => {
// Activity is now in the background
});
-
Added
EventBridge.enable()
that injects JS interface to theWebView
. -
Replaces
ChainableEvent.tryRespond()
withChainableEvent.respond()
which always executes block and posts an event. -
EventBridge
doesn't throw ifevent.requestId
is -1.
Other changes
Events that throw an exception if the app is in the background
StartActivityEvent
StartActivityForResultEvent
SetBiometricEncryptedValueEvent
GetBiometricEncryptedValueEvent
EnrollBiometricEvent
FacebookLogInEvent
FacebookShareLinkEvent
GooglePayViewTokenEvent
GooglePayPushTokenizeEvent
GooglePayTokenizeEvent
GooglePayRequestSelectTokenEvent
GooglePayRequestDeleteTokenEvent
GooglePayCreateWalletEvent
GoogleSignInEvent
AskForPermissionEvent
API methods that share the same scheduler (calls are deferred until the preceding operation is completed)
activityManager.startActivityForResult
biometricEncryptedStorageManager.set
biometricEncryptedStorageManager.get
biometricManager.enrollBiometric
facebookLoginManager.logIn
facebookShareManager.shareLink
googlePayManager.viewToken
googlePayManager.pushTokenize
googlePayManager.tokenize
googlePayManager.requestSelectToken
googlePayManager.requestDeleteToken
googlePayManager.createWallet
googleSignInManager.signIn
permissionsManager.askForPermission
v1.4.0
Added BiometricPlugin
and BiometricEncryptedStoragePlugin
.
v1.0.0
The first stable public release.