16219
UnityPlayerActivityからonCreateが呼ばれません。  
原因をご存知のかたいらっしゃいましたらご教授下さい。

jar

```

    package a.b.c;
    
    import com.unity3d.player.UnityPlayerActivity;
    
    public class testActivity extends UnityPlayerActivity {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            Log.d("UnityPlayerActivity", "Call onCreate");
        }
    }
    
```

unity AndroidManifest.xml

```

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="a.b.c" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
      <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
      <application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true" android:isGame="true" android:banner="@drawable/app_banner">
        <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
          <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
          </intent-filter>
          <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
        <activity android:name="a.b.c.testActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
      </application>
      <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22" />
      <uses-feature android:glEsVersion="0x00020000" />
      <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="android.permission.READ_PHONE_STATE" />
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
      <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
      <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
      <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
    </manifest>
    
```
CC BY-SA 3.0
2015-08-20T12:11:17.190
14676
2015-09-04T03:05:17.700
8876
question
android unity3d
UnityPlayerActivity onCreateが呼ばれない
起動時に呼ばれるActivityがUnityPlayerActivityのため  
testActivity#onCreateが呼ばれていないようです。

AndroidManifest.xmlの

```

    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    
```

を

```

    <activity android:name="a.b.c.testActivity"
    
```

と変更することで、起動時にtestActivity#onCreateは呼ばれるかと思います。
CC BY-SA 3.0
2015-09-04T03:05:17.700
16219
2015-09-04T03:05:17.700
2150
14676
answer