mirror of
				https://github.com/android/ndk-samples
				synced 2025-11-04 14:27:06 +08:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			4dee2100b3
			...
			82783bfc49
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					82783bfc49 | ||
| 
						 | 
					77557fb73e | 
@@ -49,9 +49,7 @@ TickContext g_ctx;
 | 
			
		||||
 *
 | 
			
		||||
 *   hello-jniCallback/app/src/main/java/com/example/hellojnicallback/MainActivity.java
 | 
			
		||||
 */
 | 
			
		||||
extern "C" JNIEXPORT jstring JNICALL
 | 
			
		||||
Java_com_example_hellojnicallback_MainActivity_stringFromJNI(JNIEnv* env,
 | 
			
		||||
                                                             jobject) {
 | 
			
		||||
jstring StringFromJni(JNIEnv* env, jobject) {
 | 
			
		||||
#if defined(__arm__)
 | 
			
		||||
#if defined(__ARM_ARCH_7A__)
 | 
			
		||||
#if defined(__ARM_NEON__)
 | 
			
		||||
@@ -288,6 +286,8 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
 | 
			
		||||
  if (c == nullptr) return JNI_ERR;
 | 
			
		||||
 | 
			
		||||
  static const JNINativeMethod methods[] = {
 | 
			
		||||
      {"stringFromJNI", "()Ljava/lang/String;",
 | 
			
		||||
       reinterpret_cast<void*>(StringFromJni)},
 | 
			
		||||
      {"startTicks", "()V", reinterpret_cast<void*>(StartTicks)},
 | 
			
		||||
      {"StopTicks", "()V", reinterpret_cast<void*>(StopTicks)},
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user