- Home /
Android Plugin Touch Issues with ForwardNativeEventsToDalvik
Hello.
I'm making an simple android plugin that adds a native image view to unity player activity in some specific events.
At the first time, it wasn't touchable after Unity 4.3.x version. So I set 'ForwardNativeEventsToDalvik' to true in Manifest.xml. It became touchable.
However, when I touch an image view on the unity game, it touch the unity objects behind of the image view too. I want to let my users touch only the android image view, not unity objects. I think the unity for android forwards touch event to both native ui and its own game objects at the same time. It never happens in iOS.
I guess it might not happen until unity 4.3.x...
Do you guys know how to fix this issue?
Thanks in advance!
Answer by Yury-Habets · Nov 12, 2014 at 11:33 AM
The answer goes the same as in this question:
"You have two possible solutions here:
create a separate window for your view, for example a Dialog;
create your own activity which shows your view.
The reason is that UnityPlayerNativeActivity consumes all these events, because the input loop is associated with Unity window."
Your answer
![](https://koobas.hobune.stream/wayback/20220613171308im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Java Plugin : Button added on UnityPlayer Activity -> touch not working 2 Answers
Android - Touch input won't work, Invisible activity in front of Unity activity 0 Answers
How can I know if I'm calling a plugin correctly? 0 Answers
Game Thrive (One Signal) causes game to crash when calling init method. 1 Answer
Help with iphone/android touch controls 2 Answers