React Native - MainActivity.java
<p>I'm trying to implement google sign in in my app which I'm making with react native. However, I have to basically change the entire MainActivity.java file.</p>

<p>I'll be changing this</p>

<pre><code>public class MainActivity extends ReactActivity {
</code></pre>

<p>to</p>

<pre><code>public class MainActivity extends AppCompatActivity implements
    GoogleApiClient.OnConnectionFailedListener,
    View.OnClickListener {
</code></pre>

<p>This changes a lot of things as it's not extending ReactActivity anymore, it's now extending AppCompatActivity. </p>

<p>My question is: Is it alright to change what MainActivity extends? Isn't ReactActivity necessary? Also, ReactActivity seems to have methods that AppCompatActivity doesn't such as <code>protected List&lt;ReactPackage&gt; getPackages() {</code>.</p>

<p>By the way, where I'm getting AppCompatActivity is 
<a href="https://github.com/googlesamples/google-services/blob/master/android/signin/app/src/main/java/com/google/samples/quickstart/signin/SignInActivity.java" rel="nofollow">https://github.com/googlesamples/google-services/blob/master/android/signin/app/src/main/java/com/google/samples/quickstart/signin/SignInActivity.java</a>
which is Google's github repo for Google Sign In.</p>

<p>Another question I had is currently, I have to change MainActivity.java in order to get Google Sign In working. When I try to implement something else, say video capturing do I create a new MainActivity.java file such as VideoActivity.java, or do I do all the changes for everything in the one MainActivity.java file.</p>

<p>Thanks</p>