Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6025543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:18:57+00:00 2026-05-23T04:18:57+00:00

In android, I am trying to implement an application that can play videos. In

  • 0

In android, I am trying to implement an application that can play videos. In this application, I want to fire some callback functions for specific time periods of the video. For example when player plays 30th second of the video, I want to call a function f or when 1.30th second is playing function g is called.

How can I implement this functionality? I can start a timer for each function but in this case I have to track playbacks/forwards and modify timer according to these changes.. Do you have any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:18:58+00:00Added an answer on May 23, 2026 at 4:18 am

    I’ve never done this so I can’t give much information but just an idea…

    Assuming you’re going to be using MediaPlayer then you could try extending it for a class of your own.

    Within your own class you could maintain a Handler which uses postDelayed(Runnable r, long delayMillis) to trigger some code every 100ms, for example, and have it call the getCurrentPosition() method. You could then have it check the current position against a list of ‘trigger points’ (30 seconds, 1 min 30 seconds etc) and then perform whatever task necessary.

    Doing it this way would mean if the play position is adjusted (using a seek bar, FF/RW etc) you wouldn’t need to update a timer – the Runnable would simply continue checking current position without it having to ‘know’ about any seek changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually I'm trying to implement an ontouchlistener into my android (1.5) application. therefore i
hey, im new to android development and trying to make my first application. What
I'm trying to implement tab buttons bar and a navigation bar in my android
I'm trying to implement a Cometd/Bayeux server on Android using iJetty. The Jetty implementation
I'm writing my first Android application and trying to get my head around communication
I am trying to create smaller tabs in android -- but I can't seem
I am implementing the client side of some java application for Android devices which
I'm still trying to implement a search function into my Android app. So far
I'm trying to write test harness for part of my Android mapping application. I
I am trying implement a photo gallery similar to facebook in Android. I was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.