Questions tagged [native-activity]

NativeActivity is a convenience class provided by the Android SDK that notifies native code of any activity lifecycle callbacks and makes it possible to write Android application without any Java code at all.

The Android SDK provides the NativeActivity class, which is a convenience class that notifies your native code of any activity lifecycle callbacks (onCreate(), onPause(), onResume(), etc). You can implement the callbacks in your native code to handle these events when they occur. Applications that use native activities must be run on Android 2.3 (API Level 9) or later. You cannot access features such as Services and Content Providers natively, so if you want to use them or any other framework API, you can still write JNI code to do so.

http://developer.android.com/sdk/ndk/overview.html

http://developer.android.com/reference/android/app/NativeActivity.html

132 questions
5
votes
3 answers

How to call native activity from java activity?

I know we can call an activity from another android activity as described in this question. My question is can we call a native activity from android activity through an intent or by using any other way? If yes, how? Android.mk file of my native…
Haris Hasan
  • 29,856
  • 10
  • 92
  • 122
5
votes
1 answer

How do I enable full screen immersive mode for a Native Activity NDK app?

Reading the documentation at https://developer.android.com/training/system-ui/immersive.html I can't seem to find any information on how to set full screen immersive mode in a Native Activity NDK app (without using JNI) as it seems full screen…
5
votes
2 answers

Hiding the navigation bar in pure android native

I've seen articles and articles on hiding the navigation bar for android application through java. However, what I would like to know, is how do I remove the navigation bar through a pure android c++ native-activity application for a full-screen…
MightyMoo
  • 101
  • 6
5
votes
0 answers

NativeActivity displayed under status bar

I have an Android game, which has NativeActivity and some Java code in it. My app displayed in fullscreen, but now I need to show status bar and make my app display correctly. I know how to show status bar, I tried 2 methods: Android.xml: using…
NoAngel
  • 1,072
  • 2
  • 18
  • 27
5
votes
1 answer

How to add Physical Android Device to Visual Studio 2015 Preview

I have installed Visual Studio 2015 Preview and started new Project - Naive Activity Application (Android). I would like to run the application against physical device, but there is only emulator in the target. I can see from some screenshot that it…
Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
5
votes
2 answers

Crash when closing soft keyboard while using native activity

We are developing an indie game for android and would like the user to choose his nickname. We have chosen to use the Native Activity that is provided by the NDK as that seemed to be the easiest way to go. The first problem we've encountered with…
Peter Jankuliak
  • 3,464
  • 1
  • 29
  • 40
5
votes
2 answers

Keyboard input in android NDK using NativeActivity

I'm looking for a way of getting input from the software keyboard from a Android NativeActivity. I found this, that provides some sample code of how to get the software keyboard out (and it works), but lacks a few points of interest: How to get…
4
votes
5 answers

Obtaining the name of an Android APK using C++ and the NativeActivity class

I'm writing an Android app using the NDK and NativeActivity. My app depends on a few bits of third party code that are shipped as assets. Currently I'm working on trying to extract those assets while keeping the folder structure intact. I've tried…
rstat1
  • 158
  • 2
  • 14
4
votes
0 answers

Android NDK Set Screen Orientation

I want to programmatically set screen orientation using Native only. I know I can set/lock orientation in AndroidManifest.xml file with android:screenOrientation="landscape", but this means I have to rebuild each time I want different orientation…
Slide
  • 91
  • 1
  • 5
4
votes
1 answer

APP_CMD_WINDOW_RESIZED is not called but native window is resized

I've native app, which is configured to not destroy activity on device orientation change. When the devices orientation…
deimus
  • 9,565
  • 12
  • 63
  • 107
4
votes
0 answers

How do I find all connected input devices in a native activity?

In my android native activity, I would like to find all of the game controllers connected to the android device. In input.h, there is a comment above AInputEvent_getDeviceId() that says /* * An input device id of 0 indicates that the event didn't…
Martin
  • 93
  • 1
  • 6
4
votes
1 answer

Can I use NativeActivity with ActivityGroup?

I know ActivityGroup is deprecated. But I am trying to combine user interface of NativeActivty with some Java/Android API Views. I am trying to make one hybrid user interface where a part of the screen is from NativeActivity. I used this example and…
4
votes
0 answers

Advantages of using NativeActivity over JNICALL callbacks?

For the development of a cross platform OpenGL game engine, Is there a performance advantage from using: NativeActivity or android_native_app_glue over: Defining an Activity, creating a GLSurfaceView, and setting the renderer to call native…
4
votes
1 answer

FrameBuffers with GLSurfaceView pattern in OpenGLES 1.1 on android ndk

in Android NDK, is it possible to make OpenGL ES 1.1 work with the typical java-side GLSurfaceView pattern (overriding methods from GLSurfaceView.Renderer onDrawFrame, onSurfaceCreated, etc.) while using in the C++ side the frame, color and depth…
Jserra
  • 159
  • 1
  • 9
4
votes
1 answer

android ndk data save/load

I'm working on porting PC OpenGL application onto Android. I've chosen to use that NDK android_native_app_glue framework stuff. As I understood, it would allow to me stay on C++ and write no even single JAVA code line. And it sounded promising. The…
Nick
  • 3,205
  • 9
  • 57
  • 108
1
2
3
8 9