Category : react-native

How should I upload my pictures to laravel server using fetch method in react native? I am using react-native-image-picker in my react native project and follow that package https://aboutreact.com/example-of-image-picker-in-react-native/ and my response is like that base64 -> undefined LOG uri -> file:///data/user/0/proj_name/cache/rn_image_picker_lib_temp_e100eb14-7efc-4aee-aea9-dc9d05a61b51.jpg LOG width -> 300 LOG height -> 400 LOG fileSize -> 13813 LOG ..

Read more

I am creating app in react native with laravel backend.So as I want to get api from laravel server so i run laravel with that command php artisan serve –host=some-domain.test –port=anyPort I create api like that way Route::get(‘users’,’[email protected]_users’); function get_users() { return Response()->json(User::get(),200); } In react native I call that api in that way constructor() ..

Read more

First of all I create my laravel project and create api to get all users. My laravel controller and routes are like that function get_users() { return Response()->json(User::get(),200); } Route::get(‘users’,’[email protected]_users’); And run my laravel server with that command php artisan serve –host=192.168.100.107 –port=8081 Then Create React native app. and in App.js file I code like ..

Read more

I am developing an react-native app where users will upload big resolution images.I want to compress images without losing image quality like Facebook ,Instagram. But I don’t understand I will do it in mobile front-end or in back-end server. But if I do it back-end server then it will kill more data for clients. Still ..

Read more

Step 1: After the system login api response token was added local storage using setItem(). window.localStorage.setItem("user", result.token); Step 2: After the token added local storage getItem() working fine. localStorage.getItem("user") Step 3: Then we used page reload window.location = window.location.origin; Step 5: Now the situation local storage getItem() is not working. It’s show as "NULL" value. ..

Read more

There is the following information. React Native version "react-native": "0.63.4" I am using the below library for image capture using the device camera. "react-native-camera": "^3.42.2" import {RNCamera} from ‘react-native-camera’ Below is my function, when capturing the image from the camera const onImagePressed = () => { const options = { title: ‘Camera’, takePhotoButtonTitle: ‘Take Photo…’, ..

Read more

I have a problem when i´m sending data from react-native to my laravel api, if i write something like this "araña" i get this into my database "arau00f1a", this is my code, how can i fix that?. method: ‘POST’, headers: { ‘Accept’: ‘application/json’, ‘Content-Type’: ‘application/json’, ‘charset’: ‘charset=UTF-8’, ‘Authorization’: ‘Bearer ‘+ result }, Sourc..

Read more

I have a React Native Firebase app, with firebase authentication, I want to save the users’ profiles in MySQL using Laravel, so I want to attach the auth user’s token with the request I’m sending to the Laravel API route. I required ‘kreait/laravel-firebase’ library in my Laravel project and followed these steps: https://morrislaptop.medium.com/laravel-firebase-auth-cff892b116a2 but requests ..

Read more