My first app is (6arbyat Cafe) it is allow  users to listen random
songs witch I choose it .

Simply , I make a simple browser to custom page   (http://www.
6arbyat.com/s1/pop3.html)
And it is work well .. but when I back from browser Activity Class ..
it is still work .. I can't stop music play ..

I attached the app file .apk also browser Class ..

Here the browser class Code :

-----------------------------------------------------------------
package com.arbyat.cafe;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;

public class Sharqyh extends Activity implements OnClickListener{

        Button b1, b2;

                @Override
                protected void onCreate(Bundle savedInstanceState) {

                        super.onCreate(savedInstanceState);
                        setContentView(R.layout.browser);

                        WebView news1 = (WebView) findViewById(R.id.webbrow1);
                        b1 = (Button) findViewById(R.id.bUpdate);
                        b2 = (Button) findViewById(R.id.bBack);

                        b1.setOnClickListener(this);

                        news1.getSettings().setJavaScriptEnabled(true);
                        news1.getSettings().setLoadWithOverviewMode(true);
                        news1.getSettings().setUseWideViewPort(true);
                        news1.getSettings().setPluginsEnabled(true);

                        news1.setWebViewClient(new ourBrowser());
                        try {
                        news1.loadUrl("http://www.6arbyat.com/s1/pop.html";);
                        } catch (Exception e){

                                e.printStackTrace();
                        }



                }

                public void onClick(View v) {
                        // TODO Auto-generated method stub
                        switch (v.getId()){
                        case R.id.bUpdate:
                                WebView news1 = (WebView) 
findViewById(R.id.webbrow1);
                                
news1.loadUrl("http://www.6arbyat.com/s1/pop.html";);
                                break;

                        case R.id.bBack:
                                b2.setOnClickListener(new 
View.OnClickListener() {public void
onClick(View v)
                                {final Intent i = new Intent(Sharqyh.this,
mainActivity.class); startActivity(i);}});
                                finish();
                                break;


                        }
                }
                @Override
                protected void onPause() {
                        // TODO Auto-generated method stub
                        super.onPause();
                        finish();
                }
        }
-----------------------------------------------------------------


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to