1. Download our Official Android App: Forums for Android!

Apps Why is the above codes in .java file not recording any videos?

Discussion in 'Android Development' started by imso, Mar 27, 2011.

  1. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Because i doing an android application similar to this apps
    Traffic Recorder (Android) - Screenshots
    but it seems like the above code i copied in this website Writing code that captures videos on Android Integrating Stuff does not seems to allow me record any videos and saving it into an SD Card location? What should i do to get the video recorded and saved into an sd card.. Can someone help me i'm actually new in Eclipse and java programming so pardon me for any stupid thing i do in programming..
     

    Advertisement

  2. pietjuhhh1990

    pietjuhhh1990 Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    235
    Joined:
    Feb 21, 2011

    Feb 21, 2011
    235
    22
    38
    App/web development
    Netherlands
  3. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    After reading the link u provided i'm still fairly lost :thinking: sry i'm kinna bad in programming... What i should do to get the method to start recording and saving it into sd card?
     
  4. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    After what u recommended now the code record videos.:)
    But now how am i going to allow background recording after i leave the application and when i come back its still recording because after all its still a blackbox device??
     
  5. pietjuhhh1990

    pietjuhhh1990 Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    235
    Joined:
    Feb 21, 2011

    Feb 21, 2011
    235
    22
    38
    App/web development
    Netherlands
    Remove
    camera.stopPreview();
    previewRunning = false;
    camera.release();
     
  6. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Will removing this statement really work after leaving surfacedestroy without any codes seems weird in the sense the camera will not be release or stop preview running when there's really a need to end the application by the user?

    And another question, now i wanted to replace the buttons to surfaceview click, something similar to youtube where user click to start the recording and click to stop the recording by clicking on the surfaceview, how should i come about doing it.. How should i come about doing it? Thanks i really appreciate your help :)
     
  7. pietjuhhh1990

    pietjuhhh1990 Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    235
    Joined:
    Feb 21, 2011

    Feb 21, 2011
    235
    22
    38
    App/web development
    Netherlands
    To make the user able to close it completley make an exit button(or something like it)

    For the tapping use gestures you can easely use google to find it ;)
     
  8. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    No the thing is that it still give error where it demands the surfacedestroy method the application is force to close... It seems like i need to construct another method to handle the background service isn't it.. Because my lect uses service to do the background recording while multitasking eg; sms and calling.. Can u guide me on this service thing, i tried reading the android developer site but i just don;t get.. :(
     
  9. pietjuhhh1990

    pietjuhhh1990 Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    235
    Joined:
    Feb 21, 2011

    Feb 21, 2011
    235
    22
    38
    App/web development
    Netherlands
    what error? Use the debug with break points to see where it crashes
     
  10. pietjuhhh1990

    pietjuhhh1990 Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    235
    Joined:
    Feb 21, 2011

    Feb 21, 2011
    235
    22
    38
    App/web development
    Netherlands
  11. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    It seems like i need to construct another method to handle the background service isn't it.. Because my lecturer uses service to do the background recording while multitasking eg; sms and calling.. But he just won't teach me how as it is a project. Can u guide me on this service thing, i tried reading the android developer site and the site u offer but i still don't understand.. :(
     
  12. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    How are the codes i should add into AsyncTask to allow the background recording, after reading the article i still don't seems to understand, sorry i seems kinna stupid even i tried to understand the article and incorporate it into my codes... Can you help
     

Share This Page

Loading...