Upload image from React Native App to Google Cloud Storage - react-native

Is it possible to directly upload an image taken with the camera in a React Native App to a Google Cloud Bucket? If not, what would be the best approach?
Thanks in advance!

I've found out that it is possible to directly upload an image to Google Cloud. But, I've not tested yet. Here's the link https://medium.com/google-cloud/upload-images-to-google-cloud-storage-with-react-native-and-expressjs-61b8874abc49. I hope it might help you.
Alternative solution is uploading to firebase storage using react-native-firebase. This is the way I used in my application.

Related

Google Play Reject: Is there a way to use Firebase Analytics without using background location?

I've uploaded my react-native app to Google Play and it has been rejected due to using background location permission.
The rejection email from Google Play
Google Play won't allow any background location usage without valid proof of using it, which is a thing I cannot even prove.
After drilling it down, I found out that the only entity that's using this permission is Firebase Analytics (I guess it's the Google Play Services plugin).
Does anybody know how to bypass it?
I'm using the most updated react-native & expo versions.
Thank you for your assistance

Best practise to upload image to cloudinary in React Native?

What is the best method to upload image in a react native app to cloudinary API?. Should I install their SDK from https://www.npmjs.com/package/cloudinary and use it inside the app after installing. Wont it cause any problems after compiling to apk?
Or should I use the manual way? With the fetch api in react native and sent a post request to the cloudinary API? Isn't that a bit too much work and at the same time not so secure, because API keys are exposed right? Whats your opinion?
While the React Native SDK is currently unavailable, it is recommended to use the direct call to the upload Rest API as implemented at the client-side of your application (see sample implementation in React). And you could pass the Cloudinary account parameters from your server-side code to your frontend as an option to manage the credentials.

What structure to implement for a document based app on react native

I’m a newbie to the programming world,
I’m building an app on react native for iOS and Android
The objective of the app is to give subscribers access to different pdf/word documents.
My question is to understand what structure is to be implemented for an efficient app. The question is ?
Should I develop an api which gives me The ability to upload documents and subscribers to the app can ‘Download’ PDFs. Should I use Google drive api or develop my own?
Or is there any other more efficient way to achieve the objective.
Thank you
You can use react-native-fs if your application includes the document read, download, and upload(to any URL). If you'll use Google Drive you'll be relying too much on Google services, but this package allows you to add custom operations.
Edit
You can use downloadFile for downloading a file from URL and uploadFiles for uploading.

Sharing a sound in reactnative

I've created an app, inside I use react-native-sound to play sounds.
I embedded sounds inside the app. If a user wants to play that sounds, he/she needs to open the app and play it. How can I enable users to share this sound in WhatsApp or other applications? Is there any 3rd party library exist?
Facebook this functionality in their core api to share the content on other applications. read it here
You can use react-native-share with react-native-fetch-blob to share any file.
react-native-fetch-blob making file access and data transfer easier and more efficient for React Native developers.
With react-native-share you can share file, checkout the github issue here.

Implementing Google Analytics in iOS App, if Firebase is already integrated for Push Notifications

I am having an iOS App in which Firebase is already integrated for the purpose of Push Notifications. So, I am having a GoogleService-Info.Plist file at the root of my target.
Now, I am adding Google Analytics SDK through pods and the tutorial is asking me to download another GoogleService-Info.plist file which is having a tracking ID. So, I am confused now that how to use Google Analytics in this case as I am already having a plist file.
I want to use google analytics as I want to do screen tracking which is not that efficient in FireBase Analytics.
Please can anybody guide me through the process of integrating Google Analytics when Firebase is already present in the app?
Thanks in advance.
This should help you with a common tutorial online FireBase Analytics Docs.
Use these docs to follow along in a tutorial that firebase has. For what I know about firebase is almost all the tutorials and help are written in swift and is kinda annoying if your writing in objective-c like I do. There is also sample projects on their website so it might be helpful to start at a sample project and work from there.