Re: [android-developers] Re: Calculate percentage of a video file
OK
Then now i am doing
video.pause();
int current=video.getDuration();
int total= video.getCurrentPosition();
int per = (current*100)/total;
This is right way for calculate percentage of video?
because when it's reach near 90% then i want to fire a action on the
basis of figured value.
On Thu, Nov 24, 2011 at 4:15 PM, skink <pskink@gmail.com> wrote:
>
>
> On Nov 24, 11:15 am, Naveen <kumarnaveen.si...@gmail.com> wrote:
>> Hello Sir,
>>
>> I am playing a video file , i want to calculate percentage of video
>> file . using this code
>>
>> int current=video.getDuration();
>> int total= video.getCurrentPosition();
>> int per = (current/total)*100;
>>
>> This way is wrong behave please confirm me this is right or wrong.
>>
>> which is easiest way solve my issue.
>
> int per = current *100 / total;
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home