Skip to content

Releases: smikhalevski/racehorse

v1.8.0

10 Oct 14:47
Compare
Choose a tag to compare

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 and useWindowInsets hooks.

  • Event marshalling was optimized for better performance. Class member cache was added in KotlinTypeAdapter.

  • GetKeyboardStatusEvent, KeyboardStatusChangedEvent were deprecated, use GetKeyboardHeightEvent and KeyboardAnimationStartedEvent instead.

  • Renamed Download.lastModifiedTimestamp to Download.lastModifiedTime.

  • Added hooks that provide managers.

  • Fixed keyboard height pixel density.

v1.7.0

12 Jun 15:15
Compare
Choose a tag to compare

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

05 Feb 12:57
Compare
Choose a tag to compare
  • Version details in activity info.

  • Multiple handlers in the asset loader plugin.

  • LocalhostDevPathHandler was replaced with ProxyPathHandler.

  • Fixed update bundle unzip to support Android 34.

  • Updated dependencies.

v1.5.0

05 Feb 12:55
Compare
Choose a tag to compare
  • 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 the WebView.

  • Replaces ChainableEvent.tryRespond() with ChainableEvent.respond() which always executes block and posts an event.

  • EventBridge doesn't throw if event.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

06 Dec 13:00
Compare
Choose a tag to compare

v1.0.0

28 Aug 12:45
Compare
Choose a tag to compare

The first stable public release.