accessing android sdk in unity3d

I need to use android sdk in my u3d game.
here’s my java code:

package com.fy.game;
…………
public class MainActivity extends UnityPlayerActivity {
	public void InitCharge(final int _charge_num){
		runOnUiThread(new Runnable(){
			public void run(){
			//init
			}
		}
	}
}

here’s my AndroidMainifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fy.game"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="preferExternal">
…………
<activity android:name="com.fy.game.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
…………

my c# code:

AndroidJavaClass ajc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = ajc.GetStatic("currentActivity");
activity.Call("InitCharge", new int[]{100});

and I’ve already put jar file,res folder,libs folder into Plugins/Android/
but when it run,there comes Exception:
Exception: java.lang.NoSuchMethodException

then I changed my c# code:

AndroidJavaObject activity = new AndroidJavaObject("com.fy.game.MainActivity");
activity.Call("InitCharge", new int[]{100});

and Exception become:
Exception: java.lang.RuntimeException: Can’t create handler inside thread that has not called Looper.prepare()

please tell me how can I solve this problem.thx a lot!

You must inform EXACTLY method signature (Unity - Manual: Create and use plug-ins in Android).

Your call “AndroidJavaObject activity = ajc.GetStatic(“currentActivity”);” is probably wrong, try with:

AndroidJavaObject activity = ajc.GetStatic<AndroidJavaObject>("currentActivity");

For the second error try to attach into main java thread.