shts / StoriesProgressView

show horizontal progress like instagram stories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All Story progressbar starts showing progress on different touch and pause play action

Rishabh-sx opened this issue · comments

All Story progressbar starts showing progress on different touch and pause play action on the screen. Can you please check it.
screenshot_2018-06-20-13-35-28-819_jp shts android storyprogressbar 1

@shts , Can you please check this ?

@Xenero did you find any way to implement this ?

@Rishabh-sx Please show me your code?

I have the same issue...

The code is simple:

storiesProgressView = (StoriesProgressView) findViewById(R.id.stories);
storiesProgressView.setStoriesCount(5); // <- set stories
storiesProgressView.setStoryDuration(10000L); // <- set a story duration
storiesProgressView.setStoriesListener(this); // <- set listener
storiesProgressView.startStories(); // <- start progress
storiesProgressView.pause(); <- HERE IS THE PROBLEM

I test in two emulators:

The first with Android 7 not problem.
The second With Android 8 HERE IS THE PROBLEM... MAYBE only happen in android 8

@jjimenez0611 Thank you for your Information! I will investigate

@shts Thanks... Please let me know if you fix that.. I really need this library...

I am trying to fix it. Soon i will publish my code here. I hope you guys will also try. It will be a great help for publisher and others too.

I think the problem is if I call the pause() method in the onNext() Listener. O if call the pause() inside the activity..

But if a call the pause() inside a for example MotionEvent the pause() word perfect...

But I really don't know how to fix that...

@shts Do you have any news about this error? Or someone could find a solution ? I tried to fix but I still have problems...

commented

@shts Hey, Any news? Because same heppend when we click skip and reverse.

@Rishabh-sx @Xenero @jjimenez0611 @dajver
Released new version 3.0.0!
I think he got well...plz check it.

commented

This issue still exists,even in updated code.
i've observed that this bug produces only if video is available in stories,works perfect if only images are there
Please fix this issue asap.
Thanks

Hi guys,
I have working model of this as I have done this in my project and soon I will share it with you guys in the form of POC.
Drop me a mail at rishabhsx@gmail.com for help till then

I had the same issue and the code below fixed it!

                new Handler().post(new Runnable() {
                    @Override
                    public void run() {
                        storiesProgressView.pause();
                    }
                });

and

                new Handler().post(new Runnable() {
                    @Override
                    public void run() {
                        storiesProgressView.resume();
                    }
                });

maybe someone will use. this is how i solved it;

var pressTime = 0L
var limit = 500L
val onTouchListener: View.OnTouchListener = object : View.OnTouchListener {
        override fun onTouch(v: View?, event: MotionEvent): Boolean {
            when (event.action) {
                MotionEvent.ACTION_DOWN -> {
                    pressTime = System.currentTimeMillis()
                    binding.storiesProgressView.pause()
                    return false
                }
                MotionEvent.ACTION_UP -> {
                    var now = System.currentTimeMillis()
                    binding.storiesProgressView.resume()
                    return limit < now - pressTime
                }
            }
            return false
        }
    }

@Rishabh-sx @berkyalnizcik @alexinadev @Kitlabs @dajver @shts @jjimenez0611 Hello Guys Have you found any fix for this issue.