MyAppliction.java

  1. package net.cattaka.android.fastchecklist;

  2. import android.app.Application;
  3. import android.content.Context;

  4. /**
  5.  * Created by cattaka on 14/09/27.
  6.  */
  7. public class MyAppliction extends Application {
  8.     @Override
  9.     public void onCreate() {
  10.         super.onCreate();
  11.         // SQLiteにアクセするためのサーバーを起動する(開発時専用)
  12.         try {
  13.             Class<?> clazz = Class.forName("net.cattaka.telnetsqlite.TelnetSqliteService");
  14.             Thread serverThread = (Thread)clazz.getMethod("createTelnetSqliteServer", Context.class, int.class).invoke(null, this, 12080);
  15.             serverThread.start();
  16.         } catch (Exception e) {
  17.             // ignore
  18.         }
  19.     }
  20. }