Good day. Actually, this is my problem. There is an activity with OpenGL. Everything is rendered great. Most of the functions are in the library and the methods are marked as native. But at a certain point I would like the user to enter data: login, password. This data is used for identification. I have been fighting for almost a week, I can’t think of anything sensible.

  • Greetings !. The same problems. On the PowerVR forum and in the NDK newsgroups I saw a couple of such threads. They say that it is necessary to insert the second normal activity over the first native activity and to pump user input from it through JNI. Nevertheless, no one left a working solution / example. If you find any solution, leave a link in the thread, please. - igumnov
  • At first I thought to program the text window and keyboard into the native activity in the forehead, but then I realized that I still couldn’t cope with the output of the advertisement and decided to wait until there was a normal solution for this issue. - igumnov

1 answer 1

I don’t understand why you can’t just lift over 1 more activi. Transparent on the sides and with the boxing dialogue in the center?


Intent intent = new Intent(openGLactivity, YourLoginPasswordActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); openGLactivity.startActivity(intent); 
  • Is it possible to do this somehow through NDK? I just have a cross-platform engine. For the iOS platform, the necessary functionality is implemented in creating a transparent UiView over OpenGL, and I need the text or input fields I need for this UiView at the right moment. Because I need them both for creating the Registration screen, and for entering the login and password of an account already registered. So I'm trying to find a solution for Android that would be suitable. That is, I need to manage a transparent layer through NDK and dynamically create the necessary content on it. - Lucky_spirit
  • Why do you need NDK for this? You have activations - do anything transparent in it. - DroidAlex
  • Unfortunately, it is necessary to do this through NDK, because the cross-platform engine will be used in other projects (games). - Lucky_spirit
  • 1) Drop the link to the engine or title. I am sure you will save the creation of a transparent layer on this engine. 2) Not all parts can be cross-platform, although to strive for this you should not forget that there are differences in the platforms. - DroidAlex
  • Engine samopisny, exclusive. :-) I work in a company, so I can’t give references — the secret of the company. Simply, the entire code of the entire game is written in C ++, so the text fields, input fields on certain screens were created not native for each platform, but "moving" ones. But in the engine, these inputs are compiled inheriting from native to each platform. Mngoe is wrapped with #ifdef macros. That's why I need to do this through NDK. - Lucky_spirit