Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Post build script to modify UnityPlayerActivity.java

Discussion in 'Android' started by defic, Jan 18, 2016.

  1. defic

    defic

    Joined:
    Apr 29, 2013
    Posts:
    18
    Is it somehow possible to modify UnityPlayerActivity.java file when building apk with a script, so I don't need to modify it everytime I build? I need access to onNewIntent(Intent intent) method of activity, but I don't want to make a plugin extending UnityPlayerActivity, because the package name needs to match the one in AndroidManifest.

    Can anyone provide me a sample if this is possible?
     
  2. wgt_jimmy

    wgt_jimmy

    Joined:
    Dec 22, 2014
    Posts:
    39
  3. defic

    defic

    Joined:
    Apr 29, 2013
    Posts:
    18
    Thanks a lot sir! I will take a look. I was hoping I could make it without plugins made by others, but I guess it is too complicated.
     
  4. wgt_jimmy

    wgt_jimmy

    Joined:
    Dec 22, 2014
    Posts:
    39