Android Question Graphic equalizer

Shay

Well-Known Member
Licensed User
Longtime User
Hi,
I need to monitor if radio station is running (is generating sound) on remote device, without the ability to be on device location. (issue is that radio is stopping from playing, while I don't see any reason in the code)
Is there any way to add graphic equalizer so I can know if remote device is generating any sound?
or any other way to "see" the sound?
 

Shay

Well-Known Member
Licensed User
Longtime User
Android TV, I have radio player on it, for some reason after a while it is not playing anymore,
but I cannot "see" (hear) if it stopped or not
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
but I am not near the device, and it is on public place. this is why I am was thinking to put graphic equlizer
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Hmm.... are you able to check logs on the device? Maybe check this?

There seem to be a few suggestions on the web - but you might have to dig a little deeper to get to it using B4A.

Are you saying that you've got a 'server' which is running radio player and you want to access it remotely and check the services or Apps running on it?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
I am playing radio station on TV, I need to know remotely that people can hear the radio station
(I added logs on screen, hopefully I can find what is going on)
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Yes - but if you write to a logfile you can check this to see if the App is still running - or is it a 3rd party App?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
I am pretty sure app is still running, I saw it live - but there was no sound.
I am using echo player library
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
The app is background service, and timer is used to .play the link every X time
so I was told no music again, so I opened the GUI remotely and saw that timer was stopped to update 4 hours ago (I added log each time it enter the timer)
once I entered the GUI, it entered main resume, and timer started again.
I checked the app store, no crash
what can be the reason for timer to stop from running in the background? (with "no" reason)
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Don't know I'm afraid - put to sleep due to 'inactivity'..?

Are you able to check the log remotely and restart the App if it hasn't been written to recently?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
Actually I do use foreground:

B4X:
Sub Service_Start (StartingIntent As Intent)

    If ServiceRunning=False Then
        CallSubDelayed2(MainMenu,"WriteDebug","Starting service")
        pk.GetVersionName("radiotv.com")
        n.Initialize
        n.Icon = "icon"
        n.SetInfo("RadioTV", "RadioTV Service", MainMenu)
        n.Vibrate = False
        Service.StartForeground (1,n)
        ServiceRunning = True
        Lic = False
        Stations.Initialize
        player1.Initialize("player")
        Check_Dates
    End If
End Sub

Then I enable the timer, and:

B4X:
Sub Timer1_Tick

    Dim dd As String
    dd = DateTime.Time(DateTime.Now)
    CallSubDelayed2(MainMenu,"WriteDebug", dd & " - Timer1")
    DateTime.DateFormat = "yyyy/MM/dd:H"
    Day = FindDayOfWeek
    Hour = DateTime.GetHour(DateTime.Now)
   
    Dim i As Int
    Dim d1, d2 As String
    d1 = DateTime.GetYear(DateTime.Now) & "/" & DateTime.GetMonth(DateTime.Now) & "/" & DateTime.GetDayOfMonth(DateTime.Now)
   
    For i=0 To Holydays.Size-1
        d2 = Holydays.Get(i)
        If d1.CompareTo(d2) = 0 Then
            Holyday = True
        Else
            Holyday = False   
        End If
    Next
       
    If (((Day = 6 And Hour > 17 ) Or (Day = 7 And Hour < 21 )) And Holyday = True ) Then
        CallSubDelayed2(MainMenu,"WriteDebug","Shabat")
        player1.Pause
    Else
        player1.Play
    End If
       
End Sub
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
I am attaching here my project, if someone can take a look if I missed something
 

Attachments

  • androidtv.zip
    21.1 KB · Views: 246
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
since the app was still running, but logs were saying that refresh was stopped (4 hours ago)
Erel do you see any issue with the attached code?
 
Upvote 0
Top