I'm trying to implement achievements with Google Play Services in a game. I have followed up the steps in this documentation and everything is ok except I got a runtime warning and then a crush. The warning is:
06-09 10:43:05.900: W/PopupManager(17888): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.
My application is using openGL and the activity has a member mView that extends GLSurfaceView.
I have tried this and this (I have all those meta tags and the app_id setup correctly).
Also, TypeANumber starts correctly with my app_id.
Can anyone help me on this?
EDIT [added some code]:
Here is the Activity declaration:
public class GGActivity extends BaseGameActivity implements SensorEventListener, IDownloaderClient {
Here is onCreate where the problem occurs (after the change suggested by free3dom):
public GGView mView;
@Override protected void onCreate(Bundle icicle) {
setRequestedClients(BaseGameActivity.CLIENT_GAMES | BaseGameActivity.CLIENT_APPSTATE);
//if (DEBUG_BUILD)
{
enableDebugLog(true);
}
setContentView(mView); // make sure mView is created before
getGameHelper().createApiClientBuilder();
getGameHelper().getApiBuilder().setViewForPopups( mView );
super.onCreate(icicle);
YES, setContentView helped. Thanks!