activity and/or service
<p>I have an activity and a service component in my application.</p>

<p>The intention is to let the service take care of preparing the <code>SurfaceView</code> and mediaplayer instance that needs a surface holder. My media is a video file.</p>

<p>Is it possible to create the surface view from within my service?</p>

<p>Can I call the following</p>

<p><code>surface = (MySurfaceView) findViewById(R.id.surface);</code></p>

<p>in my service component?</p>

<p>If I did that, i could then assign the <code>surface.getHolder</code> to the player instance's <code>setDisplay()</code>.</p>

<p>The overall goal is to issue commands (play, stop, seek, etc) from the activity and have the service implement the control of the mediaplayer state.</p>

<p>I probably could put all the stuff in my activity, but when i rotate the device, i don't want to tear down the surface and recreate it in <code>onConfigurationChanged()</code>. Hence looking at using the service for my situation here.</p>

<p>Any ideas or solutions highly appreciated.</p>

<p>Thanks.</p>
