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
0
votes
1 answer

NativeActivty will not start - Unable to load native library

I created another question because all of the others were answered with a solution that was similar but unrelated. I have also ensured that it's not a symbol stripping issue. I'm getting the dreaded error: D/AndroidRuntime(16487): Shutting down…
Mike Weir
  • 3,094
  • 1
  • 30
  • 46
0
votes
1 answer

Android OpenGL stuttering - vsync?

I've a Problem with my Rendering Loop. During moving object's I see a Little stutter that Looks like eglSwapBuffers swap's same buffer twice. My FPS is constantly between 59 - 60 FPS. The movement takes deltaTime into account at calculate new…
0
votes
2 answers

"dlopen: Invalid argument" when loading native activity

I'm using the following bootstrapping code to load my native activity (jngl-test): #include #include #include #include #include const std::string LIB_PATH =…
jhasse
  • 2,379
  • 1
  • 30
  • 40
0
votes
1 answer

Set my home screen as default programmatically

Assume that I have multiple home screen installed in my android device. When booting or pressing the HOME key, a dialog is shown to the user to select desired HOME screen and a check box to set this action as default. I would like to know the code…
Praga
  • 86
  • 8
0
votes
2 answers

How can i get natural (default) android device orientation from native code?

I use accelerometer in my application, but on several devices senor axes is different (depends on default device orientation is portrait or landscape). in AndroidMaifest.xml:
Artem Romanov
  • 166
  • 1
  • 14
0
votes
1 answer

Obfuscated information using Android NDK Input

While hacking with the NDK and NativeActivity, I've been unable to get useful information for touch input - I just get obfuscated information for the flags. This is a snippet of the relevant code (edited from plasma.c from the sample): static…
Alyssa Haroldsen
  • 3,652
  • 1
  • 20
  • 35
0
votes
2 answers

Build and use static library in Android NDK

I'm trying to build a library for my NativeActivity app and use it, but it is giving me an error: Having these files: -jni/ --android.mk --application.mk --main.cpp --png/ ---android.mk ---lodepng.c ---lodepng.h The android.mk in jni/png/ is…
0
votes
1 answer

Hardware scaling the OpenGL surface with NativeActivity

We're trying to run a complex OpenGL app on a device whose native screen size is 1080p. Unfortunately, the device's 3D chipset isn't really good enough for a decent frame rate at this size. What we'd much prefer to do is the render at 720p (or less)…
David Given
  • 13,277
  • 9
  • 76
  • 123
0
votes
1 answer

Android NDK crash when reading/writing files

I have ported a very large application to Android. It receives binary data over TCP/IP, and writes it to files which it uses now and then in the application. The directory to which it saves the files is by default set to ./file_cache. It goes wrong…
Jake
  • 660
  • 1
  • 7
  • 18
0
votes
3 answers

draw text in Android native activity

Hell o all, I made native activity and i want to draw some text. what is the easiest way to do this? can i do this by using openGL and if yes how? Thanks for help.
InflexCZE
  • 722
  • 1
  • 14
  • 30
0
votes
0 answers

How to interact with ActionBar from NativeActivity with Java-side window content (Xperia Play)?

For the Xperia Play prior to ICS, the only way to get input from the touchpad is through a NativeActivity (not a plain old Activity). Unfortunately, all drawing in a NativeActivity, as the name suggests, is done on the native-side, not Java-side. …
-1
votes
1 answer

Can i load a dynamic library using JNI in a android native activity?

I am trying to create an application that uses Android Native Activity in order to avoid explosing my function code in java, but i meet a problem that i also want to use my another written dynamic library which uses JNI. I want to know whether i can…
1 2 3
8
9