CameraPlay – adding camera feature in a react-native app.

I’m going to play around and embed a camera feature in a mobile app using React Native.

so going ahead and start firing ( in your terminal )

create-react-native-app CameraPlay

Since we need to use native modules into the app, we will simply eject the expo part by doing

npm run eject

Now run the basic app (depending on your OS, you must have required libraries already setup up) with
react-native run-android or react-native run-ios

If above command does not gets the output to your phone/simulator/emulator, then there is no point of moving further. Fix this and follow up next.

So we are going to make this first screen as camera input, after user clicks a photo, we will forward it to next screen to play with the photo.

So lets go ahead and install the react-native-camera package by issuing

npm install react-native-camera --save

react-native link react-native-camera

Only if there is any problem, and app does no compile after this, you need to do the linking manually, follow instructions at React-native-camera github.

I also got some issues while compiling the RNCamera. So I took help from these two comments

https://github.com/react-native-community/react-native-camera/issues/1530#issuecomment-385752864

https://github.com/react-native-community/react-native-camera/issues/1530#issuecomment-386572593

Now, open the App.js code file and include
import { RNCamera } from 'react-native-camera';
Now, you can use the RNCamera component inside return you must now be able to see the camera inside your application, if not, there might be some problem in linking the module, try again linking.

more to follow, stay tuned in.

Present of life

Insects in nature's lap

It was a fine Monday morning and 9 AM when I woke up, and dark and dense clouds lifted my eyelids towards them as I slept under the stars in the open. A deep breath, and I get to know that rain is coming. I rushed down, and went out on bicycle. After a couple of minutes it started raining, and I was heading towards the city. We all know cities are in rush in the morning, people are going to their work places. With more rain, the streets became empty and people took shelter to avoid getting wet, how unfortunate it may be. These are the most hot and humid days of summer, and all people wish for the rain.. more rain, more rain.

But, when the rain finally came, people started to take shelter. All look at me bathing and cycling in the rain, like I am an alien. Everyone must have their reasons to avoid the rain, but what they miss is far greater, divine and healing then any of their reasons.

People have tendency to seek what they desire and not looking at what they have already. They spend all their lives chasing their desires, and never take a moment to notice what current time is offering them. Chasing your desires is good, it gives purpose to your life, but along with that, one may also learn to see what they have been given at the moment, it is a crucial element to enjoy every moment of life, fully.

Featured Image: is from our kitchen garden, insects trying to hide under a corn leaf. Just like humans take shelter when the rain comes.

 

 

Satisfation?! friend or foe?

I wrote an article, and I mentioned about success, when you read that, you’ll know that success is a really simple thing. One may feel very lazy and doing like nothing when you know you are successful in living a life, and may not want to add anything to life as everything start to seem perfect. The thought of this satisfaction is like a medicine to long time pained mind and everything relaxes after this medicine. You’re at peace and this medicine heals you. Its good when you get taste of this medicine, but you you know what they say, excess of everything is bad.

When you are already lazy enough due to thought of being successful and you also get worried about something that you want to do, then you have a purpose to serve. Its something meant to be done by you. If this happens, you have to get up and work that out. All of a sudden this success will seem boring too, and you may love to try things which are beyond your reach.

Now, what is satisfaction to you? 😉