Skip to content

Instantly share code, notes, and snippets.

@EkaanshArora
Last active August 27, 2019 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EkaanshArora/eda5958646b3ed232ee956784c55918d to your computer and use it in GitHub Desktop.
Save EkaanshArora/eda5958646b3ed232ee956784c55918d to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import { View, StyleSheet, Text, TextInput, TouchableOpacity, Platform } from 'react-native';
import { Actions } from 'react-native-router-flux';
import requestCameraAndAudioPermission from './permission';
class Home extends Component {
constructor(props) {
super(props);
this.state = {
AppID: '*INSERT APP ID HERE*', //Set your APPID here
ChannelName: '', //Set a default channel or leave blank
};
if (Platform.OS === 'android') { //Request required permissions from Android
requestCameraAndAudioPermission().then(_ => {
console.log('requested!');
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment