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.

Why do I hustle? and so should you!

Radha Nagar Beach Sunset

My grandfather, Dr. Gurcharan Singh Muhay was clerk in is early job days in Delhi in 1970s. He used to go to library after his job, and used to read until 3AM everyday. Later on he cleared IPS exam and became Chief of Traffic police Delhi, he also served as an editor-in-chief in Sainik Samachar – The military news magazine of Govt of India(and many other reputed jobs). He served indian government for more than 40 years, which requires a different blog post though.

To sum it up, he worked for many govt agencies and I’ve never met anyone like him. The way he lived his life and the hustle he did everyday until he died is spectacular and mind blowing. He completed his Ph.D. from GNDU Amritsar at the Age of 72, and when he went to receive the degree, he was on a wheelchair and couldn’t walk. Me and my father picked the wheelchair from each side to get the wheelchair on the stage where he was going to be awarded the degree. The Government official who was chief guest to award the degrees; came on his knees to come at the wheelchair level, placed his hands on my grandpa’s knees gently, and said, “You, Sir, are an inspiration for the young!”, the whole convocation hall stood up in honor, I was all teary standing against the wall.

Next, my father, is a different kind of hustler, he doesn’t care what anyone thinks and does what he feels is right. He was a clerk whole his life, but don’t let the title confuse you, the state level officials used to call him directly regarding work status of the office he used to work at, because he was so good at the work he did and the whole circle knew him on first name basis including the top level officials. If he was writing a letter, it would be so detailed but still so crisp at the same time. Officials also loved him for the work ethics he had. I remember vividly, he missed his lunch  80% of the time, whole office used to have lunch break, but he enjoyed his work so much, and was so dedicated to it, that nothing could interrupt him. He had maintained a garden outside his office and used to take care of plants regularly because he was not working for a mere paycheck..

Until this day, I have never been to a hospital for any kind of disease, I had no vaccinations ( polio etc ), because my father never let that happen, as he believed anyone who is fit and fine, does not need vaccinations based on the books he read regarding these things. He is an avid reader and learner, we have a huge pile of books at home (more than 500 or 1000, never counted). A pile that keeps increasing all the time, because my father likes to read a lot just like my Grandfather.

Lastly, my mother, does job and also has huge contribution to household works. She’s not the one who would like to sit while someone e else is working. When I have to go  some place early in the morning, she would wake up and get me food. She gets me food at anytime of the day or night because she wants me to eat fresh. I now avoid these things as I am a grown up and can cook by myself, but point is about the Hustle she does everyday until this day, even when her body doesn’t allow, and she likes to push herself to the limit for the people she cares.

This string of Hustlers that I have in my parenting have taught me to hustle without even talking about it, kids learn what they see, and I’ve seen hustle from everyone here. This is the kind of parenting I have.

I’m grateful for the legacy and parenting I have and I’d like to contribute to that chain of hustle, not only for myself but also for the generations which are yet to come. All this somehow made me realize the importance of hustle.

Let’s consider some things which automatically happen when you hustle:

  1. You get better constantly
  2. You get confidence because you know stuff.
  3. You get respected for your work ethic.
  4. You get to make best out of your time, because its gonna run out eventually.
  5. You learn to mind your own business, which is good for you and others too.
  6. You earn good.
  7. Money becomes a secondary variable and that is very important.

All of these contribute to your happiness index eventually, and you become happier in life.

Caveat: Don’t forget, work is not life, work is a small part of life. And hustle not just about work, it’s a way of living, when you get your hands on something, you better make sure you do it good with the time and resources you have.

Hustle is about calling best shots all the time without comparing it to anyone else.

What is hustle for you? Feel free to share over comments. 🙂

PS: Featured Image is a click I love click at Radha Nagar Beach, Havelock Island, Andaman & Nicobar islands.

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.