Questions tagged [native-methods]

110 questions
1
vote
1 answer

How to call a function written in assembly language code from java?

hi i would like to incorporate assembly language code with java.. guys give me some idea and example programs like hello world because assembly language is new to me..
1
vote
2 answers

Change screen Orientation with powershell - Where are the registry values stored?

Hej from Sweden, I am trying out the code from the reference post: Powershell script to change screen Orientation The script works. The goal is to make sure that the rotation is either landscape - default or portrait 90 degrees clockwise. I need to…
pixelmybit
  • 103
  • 1
  • 3
  • 9
1
vote
0 answers

Windows Native codes for forward and backward

I'm a WPF developer, i have tecknet wireless mouse with me, and it have two extra buttons. when i click on them it navigates to-fro from history in browser. Interestingly, it also works on Windows Explorer, Microsoft Outlook and VisualStudio. Means…
kumar
  • 51
  • 3
1
vote
1 answer

Strange error java.lang.reflect.Method.invokeNative(Native Method) Android Studio please answer

I'm developing an app for my school with a timetable and a little calculator Here's the manifest.xml:
1
vote
1 answer

JNI trouble converting Java double to jdouble

I am trying to pass java Double to a native method in C++ which expects double as the input parameter. But the JNI wrapper method holds parameter as jobject instead of jdouble. Can anyone shed me some light on how to resolve this issue. Is it…
1
vote
0 answers

simulate what native object is not exist

Here is the situation: I have checking on existing class like: ('Promise' in window) // true/false` And I wanna force return false or true on it, can I do it? Yes, I can check it by some other way, like ` window.Promise = undefined; window.Promise…
Naitro
  • 448
  • 1
  • 3
  • 11
1
vote
1 answer

Call browser plugin from javascript

I want to perform the following task: Call a browser plugin from javascript. In turn the plugin will call C/C++ (Native code present on client machine). Moreover, I would like to know whether the aforementioned task is possible or not. If yes, how…
user2223380
1
vote
1 answer

How to use android native code inside application project

I have a requirement where I need to access native code(inside android os) and use it in my application through jni interface. For eg: Accessing void NuPlayer::HTTPLiveSource::start() {..} method inside HttpLiveSource.cpp. I have found out from…
anz
  • 1,277
  • 1
  • 11
  • 25
1
vote
1 answer

Native Method Linking error

I am trying native methods for the first time.... I had taken a simple programming from this link Click.... nativetest.java public class nativetest { static { …
Rohit
  • 545
  • 6
  • 11
  • 21
1
vote
1 answer

How does Android find out native implementations without calling System.loadLibrary?

I'm digging into Android's kernel to find out the way Binder is done in the Kernel level as well as how it is used in implementing Java's APIs. Currently I'm looking at android/os/Parcel.java, there's a lot of native functions declared as prototypes…
Yukio Fukuzawa
  • 3,514
  • 6
  • 36
  • 58
1
vote
1 answer

Error when generating a certificate: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

When calling this: Check(NativeMethods.CryptAcquireContextW( out providerContext, containerName, null, 1, // PROV_RSA_FULL 8)); // CRYPT_NEWKEYSET I get this: The…
1
vote
2 answers

Why use LoadLibrary instead of just getting BaseAddress of your program

subjective...HA ok so i've been looking around the internetz for a reasonable solution to trapping multiple keystrokes and came accross a few solutions that use the same thing (keyboard hook). One soltuion used a native call to get the IntPtr of a…
Robert Snyder
  • 2,269
  • 2
  • 31
  • 54
1
vote
2 answers

Libc SIGSEGV when calling native method from java

I'm trying to get my java implementation of the Amazon In-app Purchases SDK's PurchasingObserver to communicate back to my C++ code through a native method. PurchasingObserver.java //excerpt public class PurchasingObserver { //... private…
zyndor
  • 1,338
  • 2
  • 17
  • 36
1
vote
1 answer

Why java.sql.DriverManager.getCallerClassLoader() is native?

The method DriverManager.getCallerClassLoader() in class java.sql.DriverManager is declared as native. I understand that all the class loaders references in an application are available in the current executing JVM. Also, my basic understanding…
Santosh
  • 16,973
  • 4
  • 50
  • 75
1
vote
1 answer

How to toggle “Use Physical Keyboard”

I am trying to solve the same thing as the following post posts: How to toggle "Use Physical Keyboard". and Switch from physical to software keyboard Basicaly I want to toggle the native option from android to turn the physical keyboard on or off.…