using Flutter device_preview package MediaQueryData size didnot reflect - media-queries

Currently i am using device_preview flutter package.
after i preview different device screen, MediaQuery.of(context).size.width will change according to the preview device, but for MediaQueryData.fromWindow(WidgetsBinding.instance.window) size is still showing emulator screen size.
i need to inherit MediaQueryData as well when device preview screen change

Related

The screen resolution in the application at React Native in Expo does not match the screen resolution of the phone

The screen resolution of the phone is 1920x1080, the screen resolution in the application is 640x360. How to fix it? Or should it be? The application is launched through Expo.
There are lots of devices that have unique resolution. Usually i pick some number of the most popular devices and check my app there.
You should write flexible code that will look great on most part of devices. Use flexbox and adaptive design my friend!
Dimensions in React Native are measured in density-independent pixels (dp) rather than pixels (px). This allows the user to see it at the same size regardless of the device resolution. So, while your phone is 1920x1080 in px, it is 640x360 in dp.

Under exposed images when using webcam as a camera on an Emulator

I have been using android studio and its AVD for a long time. I have used the webcam as the back camera with no problems.
I had a working app that took a pictures with the phones camera and updated an image view with the returned bitmap thumbnail.
I then decided to try and use files rather than bitmaps to improve the quality of the image by following the following tutorial..
Android tutorial: Taking Photos Simply
I did not manage to get it to work so reverted back to using the bitmap thumbnail.
My problem is, now when I use my mac book webcam to take a picture using the emulator, the image is so under exposed that it is returning just a black square (unless I am pointing it directly at a light source.
Has anyone any idea of what could have happened and how to fix it?
(I do not think this is related to my app as even when creating a new emulator and just running the built in camera app I get the same problem)

React native Expo: Change application configuration

I'm wondering how to change an expo app's configurations. Examples of what I mean by configurations:
Make the app only available for tablets, require location/wi-fi connection/bluetooth connection, specify multiple icon sizes, etc ...
I'm asking this because I generated an ipa, tried to build it with Application Loader but I got this error:
Missing required icon file. The bundle does not contain an app for
iPhone / iPod Touch of exactly '120x120' pixels, in .png format for
iOS versions >= 7.0
Does this have anything to do with exp.json ?
Thanks!
Set application icon in this pixel
Most likely your watchKit app icons are not of the correct size. You need follow the instructions in above image
Resizing the Icon to have square values (width = height) did the trick. The icon has to be a square.
See https://github.com/expo/expo/issues/278#issuecomment-309078847

Is it possible to download my app preview images from iTunesConnect?

I created an app, that supports all the resolutions of apple devices. As a result, I have app preview images in the following resolutions:
iphone 6 plus
iphone 6
iphone 5
iphone 4 and below aspect ratio
ipad
The problem is, I deleted the images from my hard drive, and need the exact same images as I am adding app store descriptions in new languages. It would be very tedious to create the images again. Is there a way I can download the images I uploaded in their original resolution ?
EDIT: If I log into itunesconnect and try to right click on the images and copy / download, the images downloaded are of much lower resolution. Any suggestions ?
You can copy/download an app preview image with the same resolution as you added it. Click on the image in iTunesConnect and then you will see your image with original resolution in full screen mode.

screen resolution dependent image source

I am developing a Windows 8 metro (yeah!) app. How do i provide a screen resolution dependent image source ?
As per these guidelines, we can achieve it using image naming convention too.
I have an image control as show below.
<Image Source="Assets/test.jpeg"/>
I also have test.scale-100.jpg, test.scale-140.jpg & test.scale-180.jpg images in asset folder. Each image having different icon color to identify which image is loaded.
If i run the app in simulator and change screen resolutions, i still see test.scale-100.jpg for any resolution. Why is this happening ? In which case will the OS load test.scale-140.jpg or test.scale-180.jpg image ?
EDIT: I got it working. Once your app starts in simulator, close it by pressing home buton & uninstall it. In VS, right click on Project and click on Deploy. App should be now deployed to simulator. Change the resolution and start the app. You should now see correct image loaded by OS. Rinse and repeat to test other resolutions.
The scaling is automatic. If your images are correctly named, and you change resolution in the simulator you must restart the app to see scaled images. It doesn't happen on the fly, IIRC.
Finally got it working. close the app and uninstall it from
simulator.
In VS, right click the project and click deploy.
Change to desired screen resolution and start the app. OS should not pick proper image as per resolution.
Rinse and repeat same to test images on various resolutions.