Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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