Skip to content

Instantly share code, notes, and snippets.

@pedrogk
Created November 12, 2013 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrogk/7427085 to your computer and use it in GitHub Desktop.
Save pedrogk/7427085 to your computer and use it in GitHub Desktop.
versión ajustada de CPUIdApp.java con código JNI.
package com.example.cpuid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class CPUIdApp extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText(cpuid_get());
setContentView(tv);
}
private static native String cpuid_get();
static { System.loadLibrary("cpuid"); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment