Hi All. for ComposeMultiplatform (iOS, Android and...
# compose-web
b
Hi All. for ComposeMultiplatform (iOS, Android and Web wasmjs). There is a moko-permissions library but it doesn't support Web/wasmJs. is there a better library to handle Permisions (Location, Camera, Photos)? Also Can you define the browser window size for the Web target? (or some browers simulate being an iPhone or Android Phone and thus resize to phone proportions. Thanks In advance
a
would be better to split unrelated questions to separate messages so that people can start threads Re the permissions - no idea, but you could use the library in the targets that you need to use it so that you dont have build issues. Re window size - are you asking if you can resize the window? I dont think that browsers allow resizing via an api, so probably no. check if there is a javascript API for it
b
Will do going forward. on the Window size not resize but set/force the browser to be a set size. 400 x 940. not whatever is the screen size
c
Depending on what browser you use, in the developer console you can switch to a handheld like screen size.
I.e. for chrome
a
@Barry Fawthrop not possible afaik. what is your usecase exactly? maybe you could set a fixed size on your app (compose level) and when the user shrinks the window more than a certain point they would need to scroll to see everything
@Chrimaeon's suggestion is good for devving. i am assuming Barry is asking for app scenarios
c
also for end-users its possible. just define your
viewport
https://developer.mozilla.org/de/docs/Web/HTML/Guides/Viewport_meta_element
but I’m pretty sure @Barry Fawthrop is talking about the development use case. the end-user restriction does not really make sense in any scenario.
a
also for end-users its possible
how does that look like? cant find screenshots/images of that
c
well, just tried it out. it’s not doing what I thought it should do. 😅 at least not on desktop browsers 🤷🏼‍♂️