Need help on various points please


#1

Hello everyone, we have a Radio Station, for which I wish to launch an App. I am using AppyBuilder for the same.
Have created the first screen, added player and all, stream is connecting and playing well. Before proceeding further I have some confusions/questions for which I require help of yours.

  1. When user presses the back button without pressing the stop button in my app, I wish that the app should continue to play the song, and is visible in the notification/pull down bar, like this:

  2. Is it possible to display a progress bar like this, with the time that shows for how long the user has been listening to the stream:

  3. Also, in reference to the above image, I have also added “Previous 30 second” and “Forward 30 second” buttons,
    003
    but on pressing either of them it starts the stream from the beginning. From the time the app was started and not in accordance to the current time. I hope you understand. How do I make it work as intended?

  4. I have used images for play, pause, stop and share functions, instead of buttons. Is it possible to give them a feedback effect when someone touch them?

So far I have run across the above mentioned problems, I will update the thread as I run into more questions. Sorry for long queries, I am new and still learning. So please pardon if I ask question which have obvious answers.

Thank you.


#2

Welcome!
I’ve never used the Player in a project but I’ll answer the best I can.

  1. Not sure about pull down but the Player has a RunInBackground option which should allow it to continue playing.
  2. You can use the Slider Component and a Label Component for this.
    Something like this:
  3. -30 is < 0, Try doing something like “current position” - 30.
    Is 30, 30seconds or 30minutes?
  4. I would recommend using material icons instead of images.
    https://material.io/icons/
    Great tutorial here:
    Use Material Icon Without web component
    But yes, you can use this block for image click:
    Screenshot_20180420-234031_Chrome

#3

Thanks for replying.

  1. Yes I am already using Run in background property. The thing is when user minimizes the app, the sound continues to play but user has no idea from where it is playing, so was trying to find a way to show the app visually in status bar/notification bar?

  2. Will tinker with slider and label, thanks.

  3. 30 is 30 seconds. Couldn’t find the current position…

  4. Yes I am using material icons only, sorry forgot to mention in OP and using the same block for clicking. Was thinking is there a way to show a feedback like effect like that when you get when pressing a button.
    Right now can only change the color of the image when it is pressed. It doesn’t look too good.

Thank you.


#4
  1. again not sure about displaying after minimizing the app.

  2. I added a picture to my previous post which should get you started.

  3. see above mentioned picture.

  4. You can also use Material Icons with Buttons like this:


#5

Thanks a ton. I will try both of these things right now and will update here.
Thank you. :slight_smile:


#6

Found this:
https://puravidaapps.com/notification.php

Perhaps @Taifun can add buttons to it?


#7

#8

sir can u share me the .aia file please …

i want to know how to create the block


#9

Why does it always have to come to the “can you share the .aia file, please”… and the same lame excuse…
From now on, every time I see that as a reply to one of my replies, the answer will be: “Google is your friend.”


#10

Thank you. I am now using material icons for all my button needs. Using them in labels instead of buttons though.

For the slider part, it is implemented and current running time is displayed too(in seconds, I am searching for a way to display it in hh:mm:ss format), only thing is that the slider is not moving as the time is lapsing, it is constant at the very start position only. Have been trying to fix it, hope it’d work as intended.

For the notification extension by @Taifun , I think it only works to send notification after ‘n’ number of seconds or minutes. Or can it be configured to constantly show the information about the app when the app is minimized? I searched but couldn;t find the answer to this query.

Thanks.


#11

Set timer to something like 100ms and set Slider minvalue to 0.

I’ve never used it like this, but in theory it should work.


#12

Will try in a bit and post results here… thanks.


#13

Nope, no success. :’(


#14

@Rey,

I created a Player project and the slider and label show the current position.
You’ll have to double check my work but it should be a good start for you.


Player.aia (1.5 MB)


Error Java To Aix
#15

@Ken Thank you, I’ll double check what is it that I’m missing out…
Did you set timer to 100ms or 1000ms? And slider’s min value is 0 right?
Also did you try your player with an online stream source or just a mp3 file?
Thanks.


#16

Timer(Clock) is set to 100ms and slider MinValue is 0, MaxValue is Player1.Duration.

I tried it with a .wav file.


#17

You can download my Project file “Player.aia” above.


#18

Found the issue.
Problem is with the compatibility of the Player component with online streams. Working fine with a static mp3 or wav file, but as soon as I change the source to my stream, same issue occurs in your program as well. Slider stops moving and forward and back buttons are performing the same function i.e. starting the stream from very start(from the point the app was started).

Guess we’d just have to leave this here as it is beyond the scope of the player component of Appybuilder at the moment?


#19

Maybe this extension will work differently,
http://puravidaapps.com/player.php


#20

Will try including it. Thanks.