Add:Core:Initial work on android support
[navit-package] / navit / android / src / org / navitproject / navit / Navit.java
1 /*
2  * Copyright (C) 2009 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.navitproject.navit;
17
18 import android.app.Activity;
19 import android.widget.TextView;
20 import android.os.Bundle;
21 import android.content.Context;
22 import android.util.Log;
23
24
25 public class Navit extends Activity
26 {
27     /** Called when the activity is first created. */
28     @Override
29     public void onCreate(Bundle savedInstanceState)
30     {
31         super.onCreate(savedInstanceState);
32         Log.e("Navit", "onCreate");
33         NavitMain(this);
34         Log.e("Navit", "onCreate end");
35     }
36
37     /* A native method that is implemented by the
38      * 'hello-jni' native library, which is packaged
39      * with this application.
40      */
41     public native void NavitMain(Activity x);
42
43     /* this is used to load the 'hello-jni' library on application
44      * startup. The library has already been unpacked into
45      * /data/data/com.example.Navit/lib/libhello-jni.so at
46      * installation time by the package manager.
47      */
48     static {
49         System.loadLibrary("navit");
50     }
51 }
52