Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/jsActions/mobile-resources-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- Fixed an issue where the `TakePicture` and `TakePictureAdvanced` actions failed to capture photos on Android.

## [12.1.0] Native Mobile Resources - 2026-6-10

- Updated react-native from version 0.83.4 to 0.84.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@

function storeFile(imageObject: mendix.lib.MxObject, uri: string): Promise<boolean> {
return new Promise((resolve, reject) => {
fetch(uri)
.then(response => response.blob())
.then(blob => {
NativeModules.MxFileSystem.read(uri.replace("file://", ""))
.then((nativeBlob: unknown) => {
const blob = new Blob();
Object.assign(blob, { data: nativeBlob });
// eslint-disable-next-line no-useless-escape
const filename = /[^\/]*$/.exec(uri)![0];
const filePathWithoutFileScheme = uri.replace("file://", "");
Expand Down Expand Up @@ -322,7 +323,7 @@
);
}

function handleImagePickerV4Error(errorCode: ErrorCode, errorMessage?: string) {

Check warning on line 326 in packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts

View workflow job for this annotation

GitHub Actions / Unit tests

Missing return type on function
switch (errorCode) {
case "camera_unavailable":
showAlert("The camera is unavailable", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@

function storeFile(imageObject: mendix.lib.MxObject, uri: string): Promise<boolean> {
return new Promise((resolve, reject) => {
fetch(uri)
.then(response => response.blob())
.then(blob => {
NativeModules.MxFileSystem.read(uri.replace("file://", ""))
.then((nativeBlob: unknown) => {
const blob = new Blob();
Object.assign(blob, { data: nativeBlob });
// eslint-disable-next-line no-useless-escape
const filename = /[^\/]*$/.exec(uri)![0];
const filePathWithoutFileScheme = uri.replace("file://", "");
Expand Down Expand Up @@ -385,7 +386,7 @@
});
}

function handleImagePickerV4Error(errorCode: ErrorCode, errorMessage?: string) {

Check warning on line 389 in packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts

View workflow job for this annotation

GitHub Actions / Unit tests

Missing return type on function
switch (errorCode) {
case "camera_unavailable":
showAlert("The camera is unavailable.", "");
Expand Down
Loading