This project is the mobile app version of Ogcisum made with React Native.
Ogcisum is a web app and a mobile app for a music and location based experience similar to Pokemon GO. When users are within 100 meters of a pre-defined location, they can play music when there is any.
- Computer with MacOS installed.
- React Native development environment.
- Haz API local server.
Make sure you have set up React Native development environent in your Mac. If not, follow this documentation.
After setting up the environment, follow these steps:
npm install
Attention! if you are using MacOS with Apple Silicone (e.g M1/M2), use this command:
cd ios
sudo arch -arm64 pod install
If you're using MacOS with Intel chip, use this command:
cd ios
pod install
Since this project is only the front-end part, you have to set up the Haz API back-end app before spinning up the mobile app and try its features.
Follow this documentation to set up the local server.
Before spinning up the web app, make sure to run the Haz API back-end server.
Follow this documentation to run the local server.
Navigate to the root project directory. Then, use this command:
npx react-native start
The main dependencies used in this project:
- React Navigation, for the bottom tabs navigation.
- react-native-maps, for embedding native maps.
- @react-native-community/geolocation, for getting the user’s current location.
- Geolib, to calculate distances between coordinates.
- React Native WebView, for running the sounds via Tone.js in a webpage.
- WMP COMP2140, the web for running the sounds via Tone.js in a webpage.
- React Native Image Picker, for taking & selecting photos from the system’s photo library.
- react-native-linear-gradient, for making the tab bar gradient without images.
npx react-native run-ios
- See the pre-defined locations in Map page.
- Preview samples shared with a location in Now Playing page.
- Set a profile picture and profile name in Profile page.
- See the pre-defined locations represented by purple circles.
- Each circle has a radius of 100 meters from a location's coordinate.
- See indicator at the Bottom Tab Bar when there's music to play nearby.
- See the location information.
- Play/Stop music shared with the location by clicking the
Play button
. - See profile picture and profile name.
- Add a profile picture by clicking the
Add Photo button
. - Change the profile picture by clicking the
Change Photo button
. - Set / change the profile name by typing in the
Text Input
.
Solution — Toggle / Un-toggle the Physical Silent button
on the left side of the phone in the simulator.
Solution — Toggle / Un-toggle the Connect Hardware Keyboard
in the I/O > Keyboard
setting of the simulator.