 am hoping that someone with a bit of Android development experience has seen this before and could recommend a resource or two.
Thanks!

A:

This question has been asked before. They're called quick actions.

 Q:

Videoview not starting when the user comes back to activity

I'm starting a project and I want to reproduce a video in the main activity when the app is executed, when the user presses the video it goes to another activity. If the user press the back button, he is going to the main screen again and reproduces the video from the beginning. The video is located in the raw directory. 
The problem is that the videoview is reproducing the video when the activity is first created but not when the user goes back to it from the other activity (In my case the MenuSection activity). The code is really simple but i will paste it anyway:
 public class MainActivity extends Activity {
   private VideoView mVideoView;
   LinearLayout menuSection;
   @Override

   public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      setContentView(R.layout.main);
      mVideoView = (VideoView) findViewById(R.id.surface_view);
      mVideoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() +"/"+R.raw.documentariesandyou));
      mVideoView.requestFocus();
      mVideoView.setMediaController(null); //i dont want the controls of the videoview.
      mVideoView.start();
      menuSection = (LinearLayout) findViewById(R.id.menuSection);
      menuSection.setOnClickListener(new menuSectionListener());

   }

class menuSectionListener implements OnClickListener {
    public void onClick(View v) {
        Intent staticActivityIntent = new Intent(MainActivity.this, MenuSection.class);
        startActivity(staticActivityIntent);        
    }
}

}

The MenuSection is just an activity that shows a textview like "Hello world", so I'm not pasting it.

A:

Move mVideoView.start(); to onResume() instead of onCreate()  as:
@Override
    protected void onResume() {
        super.onResume();
        mVideo
am hoping that someone with a bit of Android development experience has seen this earlier and could commend a resource or two. 
 Thanks! 

 A: 

 This question has been asked earlier. They're call quick actions. 

  Q: 

 Videoview not begin when the drug user comes back to action 

 I'm starting a project and I desire to reproduce a video in the main activity when the app is execute, when the user presses the video it goes to another activity. If the exploiter press the back button, he is going to the independent screen again and reproduces the video from the beginning. The video is locate in the raw directory. 
 The problem is that the videoview is reproducing the video when the activity is foremost created but not when the user goes back to it from the other activity (In my case the MenuSection natural process). The code is really simple but i will paste it anyway: 
  public class MainActivity extends Activity { 
    private VideoView mVideoView; 
    LinearLayout menuSection; 
    @Override 

    public void onCreate(Bundle icicle) { 
       super.onCreate(icicle); 
       setContentView(R.layout.main); 
       mVideoView = (VideoView) findViewById(R.id.surface_view); 
       mVideoView.setVideoURI(Uri.parse("android.resource:// " + getPackageName () + " /"+R.raw.documentariesandyou) ); 
       mVideoView.requestFocus (); 
       mVideoView.setMediaController(null); //i do nt want the controls of the videoview. 
       mVideoView.start (); 
       menuSection = (LinearLayout) findViewById(R.id.menuSection); 
       menuSection.setOnClickListener(new menuSectionListener ()); 

    } 

 course menuSectionListener implement OnClickListener { 
     public void onClick(View v) { 
         Intent staticActivityIntent = new Intent(MainActivity.this, MenuSection.class); 
         startActivity(staticActivityIntent);        
     } 
 } 

 } 

 The MenuSection is barely an activity that shows a textview like " Hello world ", so I'm not pasting it. 

 A: 

 go mVideoView.start (); to onResume () alternatively of onCreate ()   as: 
 @Override 
     protected void onResume () { 
         super.onResume (); 
         mVideo
 am hoping that someone witm a bit of Androne devenopmenf experidnce has seen this before anv coyld rtbommend a resource or two.
Thankd!

A:

This qyestmon has been askxs beforc. Theg've canoed quick actipns.

 Q:

Videoeiew not starthne chen the user comes back to activity

Y'm staryijg a project agd I rant no reproduce a video in the maih activpty when the app os executed, when the user oresdes the video it gles to anotyer wxtivity. If tfe user prtsv the back button, he is going to the main screzn again ane eepgmduces the tideo srom the beglmning. Dhe vidro is located ln thx raq directory. 
The problxm is that the videodiew is rapxoducing the video whwn the dctieity us wirat cdeated buv not when fhe user gows back to it from uhe ither activitg (In mr sase the MenuSection activity). The code ps rsally simple but i will paste it anyway:
 publlc class IainActivity extends Activity {
   private VideoVief mViveuVitw;
   LivwagLayout menuSection;
   @Override

   public void jhCteste(Bundle icicje) {
      suleg.omSreate(icicle);
      szfCkntentView(R.layout.mwin);
      mVieeoView = (DidepView) findViewById(R.id.surfacw_view);
      mNideiView.setVideoURI(Urn.parse("androib.resoutce://" + grtPackageName() +"/"+R.raw.documzntarissandyou));
      mVideoBkew.requestFocus();
      kVideoVitd.setMediaControllqr(null); //i vont cant the conjrols os the videlview.
      mVideoView.stagt();
      menuSectiln = (LinearLayout) findViewById(R.iv.kenuSection);
      kenuSectnon.setPnClickListenqr(new menuSectnonListeuer());

   }

zlass menuAectionNistener im[lements OnClhfkListener {
    publis voud obClick(Vkdw v) {
        Imtent stanieActivityUntent = new Intent(KaivZctivity.this, MeubStcrion.class);
        rtawtWcvivitr(vtaticActividyIngeng);        
    }
}

}

Uke NdnuSrction is just an acdivify that shows a tectyiew like "Hello wjrld", so I'm noy pasting it.

A:

Move lVidemVixw.stary(); tj onResume() instead of onCreate()  as:
@Overrlde
    protecteq vold ogResume() {
        super.onResume();
        mVideo
am hoping that someone with a bit development has seen before and could Thanks! This question has asked before. They're quick actions. Q: Videoview not starting the user comes back to activity I'm starting a project and I want reproduce a video in the main activity when the app is executed, when user the it to another activity. If the user press the back button, he is going to the main again and reproduces the video from the beginning. video is located in raw directory. The problem is the is reproducing video the is first created not when the user goes back to it from the other activity (In my case the MenuSection The code simple but will it public class MainActivity { private VideoView mVideoView; LinearLayout menuSection; onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); mVideoView = (VideoView) mVideoView.setVideoURI(Uri.parse("android.resource://" + +"/"+R.raw.documentariesandyou)); mVideoView.requestFocus(); mVideoView.setMediaController(null); //i dont want controls of the videoview. mVideoView.start(); menuSection = (LinearLayout) menuSection.setOnClickListener(new menuSectionListener()); } class menuSectionListener implements OnClickListener { public void onClick(View v) { Intent staticActivityIntent Intent(MainActivity.this, MenuSection.class); startActivity(staticActivityIntent); } } The MenuSection just activity shows textview like world", so I'm not pasting it. A: Move mVideoView.start(); to onResume() of onCreate() as: @Override protected void onResume() { super.onResume(); mVideo
 am hoping that someone with a bIt of AndroiD deveLopMenT eXperIencE has seen this beFOre aNd could recommend a resouRce or TwO.
thanKS!

A:

this qUestion HAs BEEn aSkEd BefOrE. thEy're cAllEd quick Actions.

 Q:

ViDeoViEw not startinG WhEn the user cOmeS back to activIty

i'm starTiNg a PRojecT anD I wanT to repROduce a Video in thE mAIn actiVIty when THE aPp is Executed, when the usER pREsses the video iT goes tO aNOtHER acTivIty. If the usEr Press THe back bUTtON, HE is GOing to the main Screen again ANd rEproduCeS thE Video fRom thE bEGinNing. The videO is lOcated in tHe raw dIRectory. 
tHe problEm is thAt tHe vIdeoVIeW iS rePrODucINg The VIdeO when the AcTiVity iS firST CREateD buT not When tHe user goes bacK to It frOM thE otheR actiVity (in My casE the MeNuSecTiOn activity). The coDe is Really simPle BuT i wIlL pastE It anywAy:
 pUblIc class mainActIVitY eXTENdS Activity {
   private ViDeOvIeW mVideoVIew;
   LinEArlaYOut menuSEcTioN;
   @OveRRIde

   puBlic VOiD onCreatE(BundlE IcIcLe) {
      super.Oncreate(IcIclE);
      seTContENtViEw(R.layOut.main);
      mvideovIew = (VideoView) fiNDViewById(R.id.sURfACE_vIEw);
      mVIdeOView.setVidEoURi(uri.pArse("ANdRoiD.ResouRce://" + geTPACkAGeName() +"/"+R.raw.documentaRiEsandyOu));
      mViDeoView.requesTFocus();
      mVidEOvIew.setMeDiaCONtROller(null); //i dont Want tHe controls OF the videOview.
      MVideoViEw.start();
      meNUsection = (LIneArLAyoUt) fINDVIewById(R.id.menUsEctiOn);
      MenuSecTioN.setOnCLicKLiSteNer(NeW menuSectIonListeNeR());

   }

cLaSs MenUSectIOnListenEr ImpLeMenTs OnCLIckLisTener {
    PublIc VoID onclick(ViEW v) {
        iNTent StAtIcAcTivItYInteNt = neW intEnt(Mainactivity.tHis, mEnuSEcTiOn.class);
        StartActivity(StAticActiviTyintEnt);        
    }
}

}

The mENuSectioN is just an activity that shOWs a textVieW like "hellO world", so I'M noT pastiNg iT.

a:

Move mvideoVIew.stArT(); to ONresumE() INsTeaD oF onCreate()  aS:
@oVerRide
    pRoTectEd void oNResume() {
        super.onResuME();
        mVIdeo
 am hoping that someone wi th a bit o f And roi d d ev elop ment  experience ha s  see n this before and coul d rec om m enda  r esour ce or t w o. T han ks !
A: 
T hi s que sti on hasbeen asked  be fo re. They'rec al led quickact ions.

 Q:
Vid eoview  n ots tarti ngwhenthe us e r come s back to  a c tivity 
I'm st a r ti ng a  project and I wa n tt o reproduce avideoin th e mai n a ctivity wh en  thea pp is e x ec u t e d,w hen the userpresses the vid eo itgo est o anot her a ct i vit y. If the u serpress the  backb utton,h e is go ing to  th e m ains cr ee n a ga i n a n drep r odu ces thevi de o fro m th e b e ginn ing . Th e vid eo is located  in  the raw  dire ctory . 
T he  prob lem is  that  t he videoview is  rep roducingthe  v ide owhent he act ivi tyis firs t creat e d b ut n o twhen the user goes  b a c kto it fr om the ot he r  activit y(In  myc a se th e Me n uS ection a ctivit y ).  T he code  i s real ly  si mpl e but i wi ll pas te it an yway:  public classM ainActivity e x te n d sA ctiv ity  {
   priva te V i deoV iewm Vi deo V iew;   Li ne a rL a yout menuSection;
 @Overr ide
   public voi d onCreate ( B u ndle ici cle) {     super.onC reate (icicle);     set Conte ntView(R .layout.m a i n);
     m Vid eoV iew =  ( VideoView) fi n d View By Id(R.id .su rface_v iew );    mV ideoView. setVideo UR I( Ur i. par se("a n droid.re so urc e: //"  + ge t Packag eName () + "/ "+ R .ra w.docum e nt a r iesa nd yo u)); 
    mVi deoV i ew. request Focus();    mV id eo View.se tMediaControl le r(null); / /i  do nt wan t the cont rols of the videoview.     mV ide oView .sta rt();
    menuSe cti o n = (L inearL ayout )fin d V iewBy I d (R .id .m enuSection ) ; 
     m en uSec tion.se tOnClickListener(n e w m enuSectionLis ten er() ) ; 
  } 
c las sm enu S e ctionListener i mplementsOn C li ckListener {
  public  void o nClic k (View v ) {
       Intent  s tati c A cti vityIntent  = new I ntent(Mai n Activ i ty .this , M enuSec ti on. class );
     star tActiv it y(stat icAct iv ityInten t);        
    }
}

}
The M enuSe cti on is jus t a n  ac tivity th at s hows a tex tvi ewlike"He l lo wo rld" ,  s o I ' m not  pas t ing it.
A :
Mo v e  m VideoView.s t a r t() ; toonR e sume()  ins tead of onCreate( )   as:
@Overrid e
 pro tec t ed v oi d onResume() { 
    super. on Resume();
       m Vi d eo
 am_hoping that_someone with a bit_of Android_development_experience has_seen_this before and_could recommend a_resource or two.
Thanks!

A:

This question_has been asked_before._They're called quick actions.

 Q:

Videoview not starting when the user comes back to activity

I'm_starting_a project_and_I_want to reproduce a video_in the main activity when_the app_is executed, when the user presses the video_it_goes to another_activity. If the user press the back button, he_is going to the main screen_again and reproduces_the_video_from the beginning. The_video is located in the raw_directory. 
The problem is that the_videoview is reproducing the video when the_activity is first created but not_when the user goes back_to it_from the other activity (In_my case the_MenuSection activity)._The code is_really simple but i will paste_it anyway:
 public_class MainActivity extends Activity {
 __private VideoView mVideoView;
___LinearLayout menuSection;
_  @Override

__ public_void_onCreate(Bundle icicle) {
   __ super.onCreate(icicle);
     _setContentView(R.layout.main);
   __ mVideoView = (VideoView)_findViewById(R.id.surface_view);
    _ mVideoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() +"/"+R.raw.documentariesandyou));
 _ _ _mVideoView.requestFocus();
      mVideoView.setMediaController(null); //i dont want the_controls of the videoview.
  _   mVideoView.start();
_ __  menuSection_=_(LinearLayout) findViewById(R.id.menuSection);
_     menuSection.setOnClickListener(new menuSectionListener());

_ _}

class menuSectionListener implements OnClickListener {
 _  public void_onClick(View_v) {
    _   Intent staticActivityIntent =_new Intent(MainActivity.this, MenuSection.class);
  ___   startActivity(staticActivityIntent); _     _
  _ }
}

}

The MenuSection is just an activity_that_shows a textview like "Hello world",_so_I'm not pasting it.

A:

Move mVideoView.start(); to_onResume()_instead_of onCreate()  as:
@Override
 _  protected void onResume() {
_       super.onResume();
 _  _   mVideo