# Android. Native view in UE4.

**URL:** <https://forums.unrealengine.com/t/android-native-view-in-ue4/88616>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [March 27, 2017, 12:40pm UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616 "2017-03-27T12:40:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tapocheck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tapocheck](https://forums.unrealengine.com/u/Tapocheck)\
**Post date:** [March 27, 2017, 12:40pm UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616/1 "2017-03-27T12:40:38Z")

</div>

Native ad of many networks requires to use something like registerForInteraction method with a View object as a parameter (without this method user will not be able to click on ad). Of course, implementation of this method is hidden, so it’s not possible to rewrite the functionality in c++.  
I want to create wrapper for unreal engine to show native ads. Is it possible to convert Actor of UE4 to View of Android? Or maybe to send View, which is created in java as a container for Actors (like text fields)?

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [March 28, 2017, 2:24pm UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616/2 "2017-03-28T14:24:23Z")

</div>

Take a look at GameActivity.java in Engine/Build/Android/Java/src/com/epicgames/ue4. You can add new code to this with Unreal Plugin Language (UPL). There are some examples like GearVR\_APL.xml and documentation at the top of UnrealPluginLanguage.cs. You can talk to Java with JNI.

---

<div class="post-metadata">

**Author:** ![Tapocheck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tapocheck](https://forums.unrealengine.com/u/Tapocheck)\
**Post date:** [March 28, 2017, 3:31pm UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616/3 "2017-03-28T15:31:09Z")

</div>

Thanks for your answer!  
\>You can talk to Java with JNI.  
I know it. But it’s basically about calling java functions from C++ and sending primitives. I want to send an Actor instance to java code (in case if Actor class extends android’s View class) or to create new java class which exnends Actor and can be used as Actor (if it’s possible of course).

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [March 28, 2017, 8:12pm UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616/4 "2017-03-28T20:12:11Z")

</div>

You cannot send a C++ Actor to use in Java.

---

<div class="post-metadata">

**Author:** ![Tapocheck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tapocheck](https://forums.unrealengine.com/u/Tapocheck)\
**Post date:** [March 29, 2017, 5:41am UTC](https://forums.unrealengine.com/t/android-native-view-in-ue4/88616/5 "2017-03-29T05:41:08Z")

</div>

Ok, thanks for your help!
