Hi, All: I want to use cocos2d-x to take picture. Using UIImagePickerController in cocos2d, but how to use in cocos2d-x? What I should do ?
You can mix use c++ and objective-c in an .mm file.Refer the engine, there are many files named xxx.mm.
Thanks for Minggo’s reply。but,I can’t understand you.I develop at platform-android, all the files I writed was xxx.cpp . I change xxx.cpp to xxx.mm ?? If this, how to compile the xxx.mm on windows?Can you tell me in detail.
I develop android’s app,not IOS’app
You said you want to use UIImagePickerController.It is a iOS’s API, how can you use it on Android?
fist,thanks for your replying.I’m sorry, I didn’t express myself clearly.I want to take picture by cocos2d-x , what I should do ? use jni ? Pleae help me.
I think that you need some code to take screenshot like this post. But in cocos2d-x
Sorry, I don’t know the answer.
Stephen Wu wrote:
fist,thanks for your replying.I’m sorry, I didn’t express myself clearly.I want to take picture by cocos2d-x , what I should do ? use jni ? Pleae help me.>Thank you!
Yeap, you should use jni to invoke Android API.