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

Execute flow each time a custom event is fired

I need to execute Show created file name each time Watch files fires an event WatchFilesActivity : NativeActivity protected override void Execute(NativeActivityContext context) { var fileSystemWatcher = new…
Davi Fiamenghi
  • 1,237
  • 12
  • 28
0
votes
1 answer

Android NDK native-audio example crashes

I've built the native-audio example and downloaded it to my Galaxy Tab 10.1, but it doesn't work. It looks like it's going to start (i.e. the window name appears across the top), but then crashes hard. I'm hoping someone might have an idea as to…
ALF
  • 1
  • 1
  • 1
0
votes
0 answers

NativeActivity vs NDK JNI vs SDK

Sorry, tell me please if I understand correctly that in a general sense, this is the case: -Code written on the basis of NDK + JNI is an application based on Java which can call compiled C ++ code through some JNI interface? -Code written on the…
Optimus1
  • 444
  • 2
  • 13
0
votes
1 answer

Cannot find function in by Android Native Activity

I was thinking of studying OpenGL ES with Android Native Activity, but when I use the API of OpenGL ES 2.0 even though I can use OpenGL ES 1.0, I get a message saying "Undefined symbo l !!" OpenGL ES 2.0…
0
votes
1 answer

How do I get Visual Studio to debug an Android app?

I'm using Visual Studio 2017 to build and deploy a NativeActivity to my Android device. It builds and deploys with no issues, but I cannot set breakpoints. Before running, I can add a breakpoint to a line (the first line of android_main() for…
Bungles
  • 1,969
  • 2
  • 25
  • 54
0
votes
0 answers

I'm trying to draw shapes using opengles in Android Native Activity. But it's not drawn

I'm trying to draw shapes using opengles in Android Native Activity. However, I found that the shape was not drawn and that there was a problem with the function below. void GLObject::draw() { glPushMatrix(); if (_isVisible) { if…
no name
  • 51
  • 6
0
votes
1 answer

AndroidStudio endless 'Scanning files to index...'

I've faced an issue that AndroidStudio has a problem with indexing files that are in the NDK package. So, for example, if we take the standard AndroidStudio example of the NativeActivity (code is also available on GitHub) and activate files indexing…
Mykola Khyliuk
  • 1,234
  • 1
  • 9
  • 16
0
votes
0 answers

Unknown type name 'va_list'

Using Android Studio 4.1 with ndk version 21.3.6528147 and c++, experiencing the following errors during the build process: In file included from…
IUnknown
  • 559
  • 6
  • 12
0
votes
0 answers

change android studio project package name and title?

My android studio project is monolithic. It uses the NDK along with a NativeActivity. I'm wanting to be able to release multiple apps via this same project. I don't want to copy it and certainly not have to create new ones and start from scratch. I…
cyb3rcolby
  • 53
  • 7
0
votes
1 answer

Pure NativeActivity: Unable to start activity; Unable to load native library

Once the APK launches, I get this error: E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.engine001.test/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to load native library: …
Mike Weir
  • 3,094
  • 1
  • 30
  • 46
0
votes
1 answer

How is an image size calculated natively/internally?

When we pass Options with inJustDecodeBounds=true to the BitmapFactory.decodeStream method, it decodes only the file size(Height and width). How does android calculate the size (height and width)? Does it download the full file and then calculates…
0
votes
0 answers

how to invoke workflow on same thread as calling thread

I'm using WF to run activities and I would like to invoke the activity synchronously on the same thread as the calling thread. How would I do that using WorkflowInvoker.Invoke? The following is my code snippet: public int…
0
votes
0 answers

Avoid to use ALooper

Is it possible to avoid using ALooper in NativeActivity? I'm writing a native activity without app glue and I want to skip the ALooper thing, I can implement something like that, that is more specific for my case, but it is important for me to not…
Hossein Noroozpour
  • 1,091
  • 1
  • 13
  • 26
0
votes
1 answer

Build NativeActivity using ndk-build

I am trying to launch native activity after launching it normally from java(I need to load another library that's why I am launching NativeActivity from java). How would I build the sample using Android.mk? the original sample uses gradle. I tried…
0
votes
0 answers

Trying to make java UI via JNI

I have an app that is based on NativeInterface, and so is primarily written in C++. I'd like to have some standard UI elements on the screen though, so I've written a small java class, with methods that should put UI on the screen when invoked. …
Montoli
  • 1
  • 1
1 2 3
8 9