Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.aproject
- import android.app.Activity
- import android.content.Intent
- import android.os.Bundle
- import android.os.PersistableBundle
- import android.view.WindowManager
- import com.facebook.react.ReactActivity
- import com.facebook.react.ReactActivityDelegate
- class MainActivity : ReactActivity() {
- /**
- * Returns the name of the main component registered from JavaScript.
- * This is used to schedule rendering of the component.
- */
- override fun getMainComponentName(): String? {
- return "AProject"
- }
- override fun createReactActivityDelegate(): ReactActivityDelegate {
- return MainActivityDelegate(this, mainComponentName!!)
- }
- inner class MainActivityDelegate(val activity: Activity, val mainComponentName: String): ReactActivityDelegate(activity, mainComponentName) {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- // Do what you need to do
- }
- override fun onNewIntent(intent: Intent?): Boolean {
- // Do what you need to do
- return super.onNewIntent(intent)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement