Search Unity

Android Manifest Addting Activity

Discussion in 'Android' started by domdev, Dec 16, 2018.

  1. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    hi I need help I need to add new activity in my existing android manifest.. I existing manifest was for showing the status bar..then now the second was for local notification.. this is how my existing manifest looks like..

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.company.productname">
    3.   <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true" />
    4.   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/UnityTransparentStatusBarTheme">
    5.     <activity android:label="@string/app_name" android:name="com.unity3d.nostatusbar.UnityPlayerActivityStatusBar">
    6.       <intent-filter>
    7.         <action android:name="android.intent.action.MAIN" />
    8.         <category android:name="android.intent.category.LAUNCHER" />
    9.         <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    10.       </intent-filter>
    11.       <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    12.     </activity>
    13.     <provider
    14.     android:name="com.yasirkula.unity.UnitySSContentProvider"
    15.     android:authorities="com.yasirkula.unity.UnitySSContentProvider"
    16.     android:exported="false"
    17.     android:grantUriPermissions="true" />
    18.   </application>
    19.   <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26" />
    20. </manifest>
    then this instruction was for the 2nd activity that I want too add

    Untitled11.png
    base in the instruction I just need to add
    com.unity3d.player.UnityPlayerActivity... but when Itry to add like this
    <activity android:label="@String/app_name" android:name="com.unity3d.player.UnityPlayerActivity" >
    the notification works but when I tap the notification in status bar the app crashed.. anyone can help me??
     
  2. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375