Android Question [ABANDONED]#SupportedOrientations: unspecified

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

I have a particular app that is not getting the activity_resume event when I change the screen orientation. Other apps work fine. This is the header of the main activity

B4X:
#AdditionalJar: android-support-v4

#Region Module Attributes
   #ApplicationLabel: Atlas SOS
   #VersionCode: 114
   #VersionName: 1.175.18.09.10.01a  
   #CanInstallToExternalStorage: False
  
#End Region

#Region Activity Attributes
   #FullScreen: False
   #IncludeTitle: False
   'SupportedOrientations possible values: unspecified, landscape or portrait.
   #SupportedOrientations: unspecified
#End Region

Anyone have any ideas as to what would prevent the activity_resume event not being fired ?

Regards

John.
 
Last edited:

MarkusR

Well-Known Member
Licensed User
Longtime User
if you turn the device 90° normal the activity get closed and is recreated, after create then should come resume.
or did you change the manifest that in not recreate the activity after turn?
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
if you turn the device 90° normal the activity get closed and is recreated, after create then should come resume.
or did you change the manifest that in not recreate the activity after turn?
Hello

Please give me an example of the changing of the manifest to do this please so I can check it. As far as I am aware I have not. But it sound interesting.

Regards

John
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Make new project and run it without any change.
It will be "ordinary" behaviour. When you turn the device from portrait mode to landscape, you will get Activity_Create, Activity_Resume.

Reverse portrait typically does not generate Create/Resume. If you want to activate reverse portrait,
B4X:
    Dim phoneInstance                                                           As Phone
    phoneInstance.SetScreenOrientation (10)

It is possible to disable Create/Resume in manifest
For example:
B4X:
SetActivityAttribute (main, android:configChanges, "keyboard|keyboardHidden|orientation|screenSize")
To detect rotation in this case you can use IME's HeightChanged event.
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
Make new project and run it without any change.
It will be "ordinary" behaviour. When you turn the device from portrait mode to landscape, you will get Activity_Create, Activity_Resume.

Reverse portrait typically does not generate Create/Resume. If you want to activate reverse portrait,
B4X:
    Dim phoneInstance                                                           As Phone
    phoneInstance.SetScreenOrientation (10)

It is possible to disable Create/Resume in manifest
For example:
B4X:
SetActivityAttribute (main, android:configChanges, "keyboard|keyboardHidden|orientation|screenSize")
To detect rotation in this case you can use IME's HeightChanged event.

Hello

I just want the activity create/resume events, I have this in other apps, but this particular app just wont do it.
 
Upvote 0
Top