android - I want code to capture 24fps in my app, any suggestions...? -


i'm trying capture 24fps of rootview of screen. need code execute this. i've tried normal method capture screen capturing 24fps @ time slows down app alot. there method so, if yes please post me answer.

as mechanism isn't built-in feature, won't able nice 24fps.
being said, try following , see how fps get:

public class continuousscreenshottask extends asynctask<void, bitmap, void> {     view view;     context context;     bitmap bitmap;     canvas canvas;      public continuousscreenshottask(view view) {         this.view = view;         this.context = this.view.getcontext().getapplicationcontext();         bitmap = bitmap.createbitmap(view.getwidth(), view.getheight(), bitmap.config.argb_8888);         canvas = new canvas(bitmap);     }      @override     protected void doinbackground(void... params) {         while (!iscancelled()) {             view.draw(canvas);             savebitmap(context, bitmap);         }         return null;     }      @override     protected void onprogressupdate(bitmap... values) {         super.onprogressupdate(values);         // more on ui thread?     } } 

i managed 20 fps without saving bitmap internal storage, , 3 fps when enabling saving.
maybe share method , see how can improved.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -