I'm writing an application that should work without internet connection, so all my pictures (jpeg) are distributed with application itself. I'm using:
const IMAGES = [
require('../../images/animals/agamaKocincinska/01.jpg'),
require('../../images/animals/agamaKocincinska/02.jpg'),
];
and lated I render them:
<Image
source={this.props.thumbnails[this.props.index]}
resizeMode='cover'
style={this.props.imageStyle}
/>
This works perfectly with iOS (simulator+real device), images are loaded consistently on Android simulator too. On the real devices (multiple, various Android releases) images are mostly shown after application starts but after few scenes, they are not displayed. This happends quite randomly but with increased occasionality. Displaying images is not consistent even on one phone. Do you have any ideas, how to test, where is the issue?
This happens due to memory issue.
Open android manifest file and add below code in your application tag.
android:largeHeap="true"
Related
I am creating an app using Expo/RN where the first screen has a fair amount (~20) images loaded, as the result of a network call. I am only working in iOS.
My issue is that the images load extremely slowly, most taking around a minute to load, and some never load but stay black. I am using the built in Image component, with a url supplied in the source object. The images load immediately when the mobile website is loaded in Safari.
Furthermore, the built-in caching seems to not work at all. When an image has loaded and should be shown in multiple places, it often doesn't appear in the second place at all. I have tried using "force-cache" with no effect.
I have tried the packages react-native-fast-image, which wouldn't run, and react-native-expo-image-cache, which gave me some results but memory leak issues and UI freezes.
Is there any solution? Should I just create my own caching component?
EDIT: The images are loaded in a FlatList. Each item is rendered by a custom component including an . The image simply takes the url as
<Image
style={[styles.image, smallCell ? { width: smallCellWidth } : {}]}
source={{ uri: project.imageUrl, cache: "force-cache" }}
opacity={0.85}
/>
It turns out the biggest issue was not on the RN side, but the API call used. I was downloading the original sized images from the server, rather than the resized ones, and they were so large that I was getting the above result.
However, using force-cache did have good results for me.
I'm trying to add a local image in my Xamarin app, but it's not working. Do you know what I could've have missed?
I have added the XAML and c# code but that still does not work.
XAML - <Image x:Name="Background_Image" Source="backgroundimage.png"/>
C# - var image = new Image { Source = "backgroundimage.png" };
I have followed the proper practices to a tee from the Xamarin Images documentation, but it's still not working. Link to Xamarin Documentation on Images - (https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=vswin#Local_Images)
I have made sure the file name is
All in lowercase,
The build action is AndroidResource of the image
The image has been placed in the Resources/drawable folder.
Which are all the conventions you must follow, but it doesn't seem to work.
The image's file size is 1.28mb and resolution is 1920x1080 if that matters. I have tested with a much smaller 4KB image but does not work either.
I am using the Xamarin Live Player to show the app, the phone uses API 19, Android 4.4
I apologise if this is a duplicate, but I have read many topics here but I have not been able to fix it.
It does seem to be a issue or limitation with Xamarin's own Live player. I have launched the App with the Android Emulator and the Image is displaying, I'll report it as a bug.
I am developing Phonegap Application and my application has scenarios where camera is used very frequently.
In my application I have used custom camera plugin (https://www.npmjs.com/package/cordova-camera-custom) to take picture and use it in my application.
Now when I capture images from this camera 30 times by opening camera and capturing again and again the app goes to crash.
The app just crashes so I am not able to identify the root cause of the crash.
I am not an iOS Programmer though I have tried to check the plugin code but I was not able to find the cause.
You can even check the plugin code on your end if needed.
I have also posted this issue to DevExtreme, the framework which I am using to develop hybrid applications at following link:
https://www.devexpress.com/support/center/Question/Details/T480068
and they found that issue indeed is related to memory shortage. The error message was with bug_type: 298 and fault cause: vm_pageshortage.
Please help me on this, I am struggling on it since long before.
Any Help is greatly appreciated.
I've read a number of similar Q&As regarding this subject but none have provided me with a working solution.
All my images are PNG.
My deployment target is 8.3 for iPhone.
I'm using Xcode 6.3
I am using an image catalog.
I've tried using -568h in the image name and tried not using it. I tried changing the filename to "Default-568h#2x.png".
I've deleted all images from the image catalog and dragged them back in again.
I've created a new launch images catalog.
No mater what I've done, the same error message appears when I attempt to upload to the App Store:
EDIT:
On the off chance that lacking iPad launch images might have triggered this issue, I also added all launch images for iPad. I also renamed all the image file names, created a new launch image catalog (again) and imported all images. Still getting the same error message.
Resolved the issue but not sure on the exact reason behind it.
The Launch Screen File field had LaunchScreen selected.
The correct selection should have been Main.
This solved the issue and I was able to submit the app without the error message.
I'm working on a project using IBM Worklight and any time I build and deploy my project on any simulator or device, I have this busy indicator spinner in the middle of the screen. Its always there, on every page and its there in the ios, windows, web and android simulators as well as one android device we've tested on. Has anyone seen this before and if so how would I get rid of it.
Jquery-mobile was the problem, it was continuously displaying the indicator for seemingly no good reason. Deleting Jquery mobile fixed the problem
I already used the native worklight loading.It is very good and I tested it on different platforms, devices. But it is necessary to close it when you leave the function that opened it.
Example:
var busyInd = new WL.BusyIndicator ("content", {text: "Please wait..."});
function consult(){
busyInd.show();
//impl
busyInd.hide();
}