File size: 774 Bytes
d883ffe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | // Copyright (c) Meta Platforms, Inc. and affiliates.
package com.meta.northstar;
import com.unity3d.player.UnityPlayerGameActivity;
import android.os.Bundle;
import android.util.Log;
import android.content.IntentFilter;
public class NorthStarActivity extends UnityPlayerGameActivity
{
ProfileCommandReceiver profileCommandReceiver;
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
profileCommandReceiver = new ProfileCommandReceiver();
registerReceiver(profileCommandReceiver, new IntentFilter("com.meta.northstar"));
}
@Override
protected void onDestroy()
{
if (profileCommandReceiver != null)
{
unregisterReceiver(profileCommandReceiver);
profileCommandReceiver = null;
}
super.onDestroy();
}
} |