Language problems Basic4Android 2.5

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
Language problems Basic4Android 2.5

1-When a tablet is placed at rest the MediaPlayer not stop playing, if the orientation is horizontal (Vertical Switched to corrected)
Send Simple Example of fault can be tested only in tablet or phones because simulators are not placed at rest ...

**************
Problemas del lenguaje Basic4Android 2.5

1-Cuando una Tablet se coloca en reposo el MediaPlayer no deja de reproducirse, si la orientación es horizontal (Al cambiar a Vertical se corrige)
Envió Ejemplo Simple del fallo, solo puede hacerse la prueba en tablet o teléfonos ya que los simuladores no se colocan en reposo…

http://www.b4x.com/forum/spanish-forum/26304-problemas-del-lenguaje-basic4andr-oid-2-5-a.html

Gracias de antemano....
 

Attachments

  • MediaPlayer.zip
    325.5 KB · Views: 296

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
Please use File - Export as zip when uploading projects to the forum.

I wasn't able to reproduce it. Calling ExitApplication can cause unexpected results as it immediately kills the process.

You might also want to call MediaPlayer.Release.

********************************

Good days friend, another user the low thing and it re-produced it and gave to him the same mistake ... and he thinks that it is a failure also ... try to lower it in this link

http://www.b4x.com/forum/spanish-forum/26304-problemas-del-lenguaje-basic4andr-oid-2-5-a.html
 

VASQUEZFRANKLYN

Member
Licensed User
Longtime User

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
I'm not sure that I understand the problem. Can you post the exact steps require to reproduce it?

shipping error steps in document (Example.zip)

many Thanks
 

Attachments

  • MediaPlayer.zip
    325.5 KB · Views: 283
  • Example.zip
    20.4 KB · Views: 317

jota

Active Member
Licensed User
Longtime User
When the device goes into sleep mode if the activity is #SupportedOrientations: landscape reactive the aplication

LOG when B4A is in landscape and goes to sleep:
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
 

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
When the device goes into sleep mode if the activity is #SupportedOrientations: landscape reactive the aplication

LOG when B4A is in landscape and goes to sleep:

the error persists, and two user what you are saying,,,

Try to correct the problem in your example...

Forgive me for I do not speak English, I use a translator...

the error persists,...
 

jota

Active Member
Licensed User
Longtime User
A pause time without using the device. I have mine set to 10 seconds to prove it.
 

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
What I'm asking is whether the activity is paused after it is created?

Test the example is in the mediaplayer.Zip Let the tablet itself Pause in 1 minute.
media player and if he keeps playing .. When is horientacion # SupportedOrientations: landscape

android simulators pause not have to prove it on a tablet

try it on a tablet
 

jota

Active Member
Licensed User
Longtime User
Yes, but I just checked it with Android 4.0 devices does not happen, I just happen with Android 2.3 and 2.1
 

VASQUEZFRANKLYN

Member
Licensed User
Longtime User
I was able to reproduce it on Galaxy Tab which runs Android 2.3. As jota wrote it doesn't happen on newer versions.

It seems like a bug in Android which causes the activity to be recreated in this case.

Mediaplayer solution for android 2.3 and 2.1

but gives errors in the transitions

There were two tablet that gave the error

The solution is the library Phone


#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: Media Player
#VersionCode: 1
#VersionName:
#SupportedOrientations: landscape
#CanInstallToExternalStorage: True
#End Region

'*************************LEER***************************** Si se coloca la Orientacion en portrait se corrige el error
'*************************LEER*****************************
Sub Process_Globals
Dim MediaPlayer1 As MediaPlayer

End Sub

Sub Globals
Dim phn As Phone' Solucion

Dim button1 As Button
Dim Label1 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)

phn.SetScreenOrientation(0) ' Solucion


Activity.LoadLayout("1")


If FirstTime Then
MediaPlayer1.Initialize( )
MediaPlayer1.Load(File.DirAssets, "IsawHerStandingThere.mid")
End If
MediaPlayer1.Looping = True
End Sub

Sub Activity_Resume
phn.SetScreenOrientation(1)' Solucion

MediaPlayer1.Play
End Sub

Sub Activity_Pause (UserClosed As Boolean)
phn.SetScreenOrientation(1)' Solucion

UserClosed = False
If MediaPlayer1.IsPlaying Then MediaPlayer1.Pause
End Sub

Sub Button1_Click
Activity.Finish
ExitApplication
End Sub

**********************************************

Last question and I stop the transition effect of the Activity Modules
 
Last edited:
Top