@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    Window win = getWindow();
    win.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    win.setFlags(
        WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.main);

    // setup adView
    //        LinearLayout layout = (LinearLayout)findViewById(R.id.layout_setup);
    //        adView = new AdView(this, AdSize.BANNER, "a1507f940fc****");
    //        layout.addView(adView);
    //        adView.loadAd(new AdRequest());

    btnExit = (Button) findViewById(R.id.btn_exit);
    btnExit.setOnClickListener(exitAction);
    tvMessage1 = (TextView) findViewById(R.id.tv_message1);
    tvMessage2 = (TextView) findViewById(R.id.tv_message2);
    mBlackScreen = (ViewGroup) findViewById(R.id.black_screen);

    for (int i = 0; i < maxVideoNumber; i++) {
      videoFrames[i] = new VideoFrame(1024 * 1024 * 2);
    }

    System.loadLibrary("mp3encoder");
    System.loadLibrary("natpmp");

    initAudio();
    initCamera();
  }
Пример #2
0
 // Load the .so
 static {
   System.loadLibrary("SDL");
   // System.loadLibrary("SDL_image");
   // System.loadLibrary("SDL_mixer");
   // System.loadLibrary("SDL_ttf");
   System.loadLibrary("main");
 }
Пример #3
0
  public static void main(String[] args) throws Exception {
    System.out.println("Ready for native bridge tests.");

    System.loadLibrary(args[0]);

    Main.main(null);
  }
Пример #4
0
 static {
   try {
     System.loadLibrary("librets");
   } catch (UnsatisfiedLinkError e) {
     System.err.println("Unable to load the librets native library.\n" + e);
     System.exit(1);
   }
 }
Пример #5
0
 static {
   try {
     java.lang.System.loadLibrary("getenv");
     loaded = true;
   } catch (Throwable t) {
     System.err.println("getenv JNI library not found. Env.getenv will not work");
     System.err.println(
         "(run the tos-install-jni tool, see man tos-install-jni for more details)\n");
   }
 }
Пример #6
0
 protected static final void initializeNative() {
   try {
     System.loadLibrary("bioerafft");
   } catch (Throwable e) {
     // e.printStackTrace();
     if (debug) {
       System.out.println("" + e.getMessage());
       System.out.println(
           "Native implementation (bioerafft) of FFT not found in "
               + System.getProperty("java.library.path")
               + ", using pure version");
     }
   }
 }
Пример #7
0
  /**
   * Loads the SWIG-generated libSBML Java module when this class is loaded, or reports a sensible
   * diagnostic message about why it failed.
   */
  static {
    String varname;
    String shlibname;

    if (System.getProperty("os.name").startsWith("Mac OS")) {
      varname = "DYLD_LIBRARY_PATH"; // We're on a Mac.
      shlibname = "'libsbmlj.jnilib'";
    } else {
      varname = "LD_LIBRARY_PATH"; // We're not on a Mac.
      shlibname = "'libsbmlj.so' and/or 'libsbml.so'";
    }

    try {
      System.loadLibrary("sbmlj");
      // For extra safety, check that the jar file is in the classpath.
      Class.forName("org.sbml.libsbml.libsbml");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Error encountered while attempting to load libSBML:");
      e.printStackTrace();
      System.err.println(
          "Please check the value of your "
              + varname
              + " environment variable and/or"
              + " your 'java.library.path' system property"
              + " (depending on which one you are using) to"
              + " make sure it list the directories needed to"
              + " find the "
              + shlibname
              + " library file and the"
              + " libraries it depends upon (e.g., the XML parser).");
      System.exit(1);
    } catch (ClassNotFoundException e) {
      System.err.println(
          "Error: unable to load the file 'libsbmlj.jar'."
              + " It is likely that your -classpath command line "
              + " setting or your CLASSPATH environment variable "
              + " do not include the file 'libsbmlj.jar'.");
      System.exit(1);
    } catch (SecurityException e) {
      System.err.println("Error encountered while attempting to load libSBML:");
      e.printStackTrace();
      System.err.println(
          "Could not load the libSBML library files due to a" + " security exception.\n");
      System.exit(1);
    }
  }
Пример #8
0
 // {{{ static initializers
 static {
   System.loadLibrary("javaaiousb"); // libjavaaiousb.so
 } // static
Пример #9
0
  /** Initialize the system class. Called after thread initialization. */
  private static void initializeSystemClass() {

    // VM might invoke JNU_NewStringPlatform() to set those encoding
    // sensitive properties (user.home, user.name, boot.class.path, etc.)
    // during "props" initialization, in which it may need access, via
    // System.getProperty(), to the related system encoding property that
    // have been initialized (put into "props") at early stage of the
    // initialization. So make sure the "props" is available at the
    // very beginning of the initialization and all system properties to
    // be put into it directly.
    props = new Properties();
    initProperties(props); // initialized by the VM

    // There are certain system configurations that may be controlled by
    // VM options such as the maximum amount of direct memory and
    // Integer cache size used to support the object identity semantics
    // of autoboxing.  Typically, the library will obtain these values
    // from the properties set by the VM.  If the properties are for
    // internal implementation use only, these properties should be
    // removed from the system properties.
    //
    // See java.lang.Integer.IntegerCache and the
    // sun.misc.VM.saveAndRemoveProperties method for example.
    //
    // Save a private copy of the system properties object that
    // can only be accessed by the internal implementation.  Remove
    // certain system properties that are not intended for public access.
    sun.misc.VM.saveAndRemoveProperties(props);

    lineSeparator = props.getProperty("line.separator");
    sun.misc.Version.init();

    FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
    FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
    FileOutputStream fdErr = new FileOutputStream(FileDescriptor.err);
    setIn0(new BufferedInputStream(fdIn));
    setOut0(new PrintStream(new BufferedOutputStream(fdOut, 128), true));
    setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));
    // Load the zip library now in order to keep java.util.zip.ZipFile
    // from trying to use itself to load this library later.
    loadLibrary("zip");

    // Setup Java signal handlers for HUP, TERM, and INT (where available).
    Terminator.setup();

    // Initialize any miscellenous operating system settings that need to be
    // set for the class libraries. Currently this is no-op everywhere except
    // for Windows where the process-wide error mode is set before the java.io
    // classes are used.
    sun.misc.VM.initializeOSEnvironment();

    // The main thread is not added to its thread group in the same
    // way as other threads; we must do it ourselves here.
    Thread current = Thread.currentThread();
    current.getThreadGroup().add(current);

    // register shared secrets
    setJavaLangAccess();

    // Subsystems that are invoked during initialization can invoke
    // sun.misc.VM.isBooted() in order to avoid doing things that should
    // wait until the application class loader has been set up.
    // IMPORTANT: Ensure that this remains the last initialization action!
    sun.misc.VM.booted();
  }
Пример #10
0
 static {
   java.lang.System.loadLibrary("xTun");
 }