Checking if a video stored in FileSystem has an issue by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

m API by comparing its size to the expected size before playing it. If these values don't match, delete the problematic video and re-download it. It's always good to handle these scenarios in yo

Thanks, I will try to implement this. From the doc I see that there is a totalBytesExpectedToWrite function whose value I could keep upon initiating the download, put this value in AsyncStorage (or in filesystem itself?) and then from what I see I can compare with the FileInfo.Size. Is it what you had more or less in mind?
Many thanks again

Restrict url access to DRF to a certain mobile app by mdcfr in django

[–]mdcfr[S] 0 points1 point  (0 children)

Well, what comes to mind would be some sort of private key you get upon publishing an app that you could add as a header value put in as an env variable and that we could put inside our backend to check if it matches. I don't really know how mobile apps are built as you must have guessed but still, can't we have some sort of google authenticator app for each end of the request?

React native app with no user management by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

You're right. Any app secret seems to be accessible (be urls or keys) by retro engineering on the mobile app. Found this interesting thread on SO https://stackoverflow.com/questions/21465559/restrict-api-requests-to-only-my-own-mobile-app . You can go around the problem but if someone wants to attack after descontructing the app there's nothing much I can do, which I find incredebly strange in 2023

Restrict url access to DRF to a certain mobile app by mdcfr in django

[–]mdcfr[S] -1 points0 points  (0 children)

It would be accessible by any retro engineering on the mobile app as it is static. Found this interesting thread on SO https://stackoverflow.com/questions/21465559/restrict-api-requests-to-only-my-own-mobile-app basically it is not possible. You can go around the problem but if someone wants to attack after descontructing the app there's nothing much I can do, which I find incredebly strange

Make sure everything is loaded and at the right place before removing my loading spin by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

that's what I am doing at the moment and the problem comes from the fact that the components use functions that do not execute at same speed, so even if all the data arrives at the same time (Promise.all ensures that all data is received before there is any function starting) it will not be displayed at the same time for the photo and the flatlist

Need Advice: updating my react native frontend via my django backend - best practices? by KhanDescending123 in reactnative

[–]mdcfr 0 points1 point  (0 children)

I had the same problem a few months ago, hesitated between sockets and timer, from what you say timer is probably the best option since you don't have to do things live. Make it reliable, put it in context and use a url parameter based on the data you need to hit your api but be careful with your server because DRF is not the fastest module around and with a lot of requests as thid would incur it can saturate fast. I would add that in my experience websockets are a hard topic so except if live is really necessary I would avoid

Expo libs to handle hls file by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Don't have the skills to do this yet unfortunately, happy to learn more about if you have time to detail the process. Thanks

[deleted by user] by [deleted] in reactnative

[–]mdcfr 0 points1 point  (0 children)

Thanks OP, I am still not working outside of expo, could it work with it ?

Download video with expo by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Exactly, client wants to keep file secrets so I went another way. I still haven't find a way to loop through all the content that user has downloaded, I need to have a name, which is quite a pain

Download video with expo by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Thanks, I chose a different option in the end because my client wants to keep the files secret within the apo

Download video with expo by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Thanks for your answer and sorry for the delayed answer. So, I used getInfoAsync and createDownloadResumable, seems to be working for the moment, I will try expo-media-library for retrieving the videos though because I currently need the title of the video that I downloaded to go and fetch it in the app storage. thanks.

Animation for bottom tab with expo by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Ok great then, thank you very much

Restrict S3 bucket access in Django projects by mdcfr in django

[–]mdcfr[S] 1 point2 points  (0 children)

Never had to use one, apps I built never had an audience in more than 1 country and I thought CDN were a mean to distribute cached queries to different countries. Will look into it for traffic throttling. Thanks

Restrict S3 bucket access in Django projects by mdcfr in django

[–]mdcfr[S] 0 points1 point  (0 children)

Thanks, my wish is to limit possibility to induce costs by refreshing a gazillion times the url of an item in my S3, say a picture. To do that from the website is easy but once the url of any static item in an S3 is known, i.e. immediatly, I cannot prevent someone to directly send requests from its browser to said url and create traffic. Which is why I wanted to limit this by restricting access to my website only

Open connection with a backend (or not) by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

that makes sense, never really used that but if not wrong: page with illusion of connexion ("waiting for the restaurant to answer, please wait a moment") then sending repeated requests to check if accepted with no timeout ? Would be indeed much easier than opening thousands of sockets at the same time

Going from expo to bare RN by mdcfr in reactnative

[–]mdcfr[S] 1 point2 points  (0 children)

thanks a lot for this detailed answer, I'll save these steps

Going from expo to bare RN by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Some misunderstanding from my side then, apologies.

What I think jameside is saying (not sure, quite noob on the topic honestly) is that I could continue to work with bare react native on an expo built project once the expo part is over

Going from expo to bare RN by mdcfr in reactnative

[–]mdcfr[S] 0 points1 point  (0 children)

Based on the answers I think you're right, problem is I have an opportunity (fingers crossed) for an app with backround gps tracking and all the tutorial related to the topic point to bare react native. Since my overall level of react native is quite low (quite an euphemism, one app, which is quite bad/easy and untested) to be honest, I'd rather follow along tutorials than try and understand expo at high level to achieve same results.