[Android] create a AlarmManager in AppActivity

I try to create a AlarmManager in AppActivity( HelloWorld project), but the receiver can not receive any message.
but the same code works well on Android-Java project.
How can I create a AlarmManager in cocos2d-x

code
// MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

	Intent intent = new Intent(this, AlarmReceiver.class);
    
    PendingIntent pi = PendingIntent.getBroadcast(this, 0, intent, 0);
           
    AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
    am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 60*1000, pi);

}

//AlarmReceiver.java
public class AlarmReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

    Log.i("Test", null);
  
}

}

//AndroidManifest.xml
<activity android:name=“org.cocos2dx.cpp.AppActivity”

    <receiver android:name=".AlarmReceiver">  
	</receiver> 
</application>

Are there anybody knows?

I ran into the same problem and found this tutorial http://qiita.com/ksk_kbys/items/2d864f3cad2e104ddfe2
Despite I don’t speak Chinese, the code is self-explanatory.

I’m very surprising that you come from Japan. I’ve heared that there are some Japanese and some Korean use cocos2d-x, but never talk with them. This problem trouble me a long time, I’ve read the code from the link, it seems your understand level of cocos2d-x is better than me. Thank you very much.

Umm… why did you think that I’m from Japan? I’m from Ukraine.

@jumpchess

Hi,

were you able to make an alarm app using cocos2d-x ?
Can you please help?

Thanxx :smile:

No, there still some problems in creating alarm with cocos2d-x 3.x.