Search Unity

Is it possible to call a android native activity in unity?

Discussion in 'Android' started by kalamangstudio, Oct 23, 2018.

  1. kalamangstudio

    kalamangstudio

    Joined:
    Sep 9, 2018
    Posts:
    2
    I do not know if it's possible But I think it may be possible to work out of that by bringing the aar file from the android studio plugin into the unity and then calling the activity from aar to overlay the game screen like a popup and when it's done. It's off native.

    Work process
    1. Make library in android stduio for get AAR file.
    2. Throw AAR file to Asset folder in unity "Asset/Plugins/Android/"
    3. Unity call function show activity in AAR

    can be possible?
     
  2. FANTASISTA_INC

    FANTASISTA_INC

    Joined:
    Feb 5, 2019
    Posts:
    1
    I want to do the exact same thing.
    1. Create a native plugin.
    2. Call Android library from native plugin.
    3. Call native activity from native plugin.
    I can do up to step 2, but I can't do step 3.
    Create two AAR files with AndroidStudio and build with Unity
    I'm stuck there with a bunch of "Duplicate class" errors.
    Does anyone know of a (preferably recent) case of successfully calling a native activity from Unity?