x


Unity plugin: unity script call android bitmap funtion

I want to call android bitmap funtion in unity script,in android the bitmap funtion as following:

public void testBitmap(){

Log.i("Unity","testBitmap().....start");
Bitmap bmp =BitmapFactory.decodeResource(this.getResources(), R.raw.mxr);
Log.i("Unity","testBitmap().....sucess");
}

define native interface use NDK,and then call it in unity script as following:

[DllImport ("Android_Internal")]
private static extern void callTest();

and then build and run... it's ok,But after splash image,it exits system suddenly!the log shows:

02-08 10:33:07.805: I/Unity(19153): testBitmap()().....start
02-08 10:33:41.175: E/WindowManager(1305): return in removeWindowLocked
02-08 10:33:43.405: E/ActivityManager(1305): fail to set top app changed!
02-08 10:33:46.415: E/AudioHardwareMSM7X30(1215): disable current rx device = 6

it troubles me for a long time,can anybody help me ,Thanks in advance!

more ▼

asked Dec 28 '11 at 03:39 AM

waqa1988 gravatar image

waqa1988
16 10 11 11

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3888
x2609
x16

asked: Dec 28 '11 at 03:39 AM

Seen: 569 times

Last Updated: Jan 06 '12 at 05:20 AM