0

Question

How to get the call coming / hanged event when in Cocos2d Android application ?

Because, I want do some action when receive the two event ?

I use coocs2d-x-3.14.1 on Android.

Beckon
  • 128
  • 2
  • 15

2 Answers2

0

Have a look at this: How to detect incoming calls, in an Android device?

Using this along with JNI calls, you can call c++ functions to carry out the custom actions.

0

// This function will be called when the app is inactive. When comes a phone call it's be invoked too.

AppDelegate::applicationDidEnterBackground()

// this function will be called when the app is active again

AppDelegate::applicationWillEnterForeground()

Vinay Jain
  • 2,644
  • 3
  • 26
  • 44
GavinGao
  • 1
  • 1