Skip to main content

Posts

Showing posts with the label expo

React native Expo get current location of a user

Expo get current location of a user  Expo is a very useful tool to create a mobile application using react native. it handles many complicated things like publish, generate certificates ,access camera , location etc. To get the location of a user , we need to install expo-location package so to install it please open terminal/cmd in current project folder and run below command   expo install expo-location above command will install expo location package. This package handles ask location permission, get long/lat details , get last location , current location etc. How it works ? To get access of user's current location we need to ask for permission to user by using Location.requestPermissionsAsync() function , this function will show a permission popup to user so user can allow it, If user reject it then we cannot get current location. Once user allow us to access location then we will use location package another function Location.getCurrentPositionAsync(), this function will ...

How to install React native expo cli properly in windows

How to install React native expo in windows   Hello today we learn how to install react native  expo-cli in windows system. Expo Expo-CLI  is a React Native tool that creates a development server on local so we can create react native apps and run locally for testing. Please follow below steps to install expo-cli on your local server:- 1) Install Node JS    To create and run react native apps, we need NodeJS . You can check our other tutorials to learn how to install node JS. Here we will focus on Expo. 2) Open Terminal as administrator 3)  Run the below command    npm install -g expo-cli The above command will install expo globally and you can access expo by using >expo in command prompt(CMD).   If you face any issue like " expo is not recognized as an internal or external command,operable program or batch file. " then click here . I hope it will be helpful for many readers. Thanks :)