Android Main Activity

Hi, i want to change frome the default landscape view to portrait.
I changed this to:
[java]screenOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT[/java];
but nothing happens. Its still displaying in landscape.

I also wanted to keep the screen on:
[java]getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)[/java];
but the app will always crash on initialisation.
I can’t even change the
[java]appClass = “mygame.Main”;[/java]
its always crashing

kind regards
sytrox

Hi, I have the same problem with the portrait orientation, any ideas? Changes in Main Activity doesn’t have effect.

I have this note in the Output windows while building:
Note: /home/javi/projects/BasicGame/mobile/src/com/mycompany/mygame/MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

I’ll try to use -Xlint in compile options but it seem no effect.

I see errors in the editor in this three lines (packages does not exist):

import android.content.pm.ActivityInfo;
import com.jme3.app.AndroidHarness;
import com.jme3.system.android.AndroidConfigChooser.ConfigType;

Can be this the problem?

Regards.