Set wallpaper from my site

All your problems with Audio, Video and Images.

Set wallpaper from my site

Postby Zerouno » Thu Oct 03, 2013 8:37 am

Hello ,
I created a site with pictures in jquerymobile, and now i like possible set wallpaper from my site, from android app, i arrived at this point and I'm stuck, i'm new in android developer.

my code:
Code: Select all
com.home.page ;



import android.os.Bundle ;
import android.app.Activity ;
import android.content.Intent ;
import android.view.KeyEvent ;
import android.view.Menu ;
import android.view.MenuInflater ;
import android.view.MenuItem ;
import android.webkit.WebView ;
import android.webkit.WebViewClient ;
import android.widget.LinearLayout ;
import android.widget.TextView ;




public class extends Activity { MainActivity

   / / Private WebView view ;


@ Override
    protected void onCreate ( Bundle savedInstanceState ) {
        super.onCreate ( savedInstanceState ) ;
        setContentView ( R.layout.activity_main ) ;
       
        WebView view = ( WebView ) this.findViewById ( R.id.webView1 ) ;

        String url = " http://www.mysite.com " ;

      view.setWebViewClient (new WebViewClient () {
            @ Override
            public boolean shouldOverrideUrlLoading ( WebView view , String url ) {
                view.loadUrl ( url ) ;
                return false;
            }
        });
        view.getSettings ( ) . setJavaScriptEnabled (true) ;
        view.loadUrl ( url ) ;

        }
public boolean onCreateOptionsMenu1 (Menu menu ) {

        getMenuInflater (). inflate ( R.menu.main , menu ) ;
        return true;
    }
@ Override
public boolean onKeyDown (int keyCode , KeyEvent event) {
    WebView view = ( WebView ) findViewById ( R.id.webView1 ) ;

    if (( keyCode == KeyEvent.KEYCODE_BACK ) && view.canGoBack ()) {
        view.goBack ();
        return true;
    }

    return super.onKeyDown ( keyCode , event) ;

}

public void onCreate1 ( Bundle savedInstanceState ) {
super.onCreate ( savedInstanceState ) ;
LinearLayout LinearLayout = new LinearLayout (this);
setContentView ( LinearLayout ) ;
}

public boolean onCreateOptionsMenu (Menu menu ) {
menu.add ( Menu.NONE , 1, 1 , " Share " ) ;
menu.add ( Menu.NONE , 2, 2 , " Save Image ");
menu.add ( Menu.NONE , 3, 3 , "Set Background ");

return true;
}
}

(I used OptionMenu Another best solution if there is welcome ) how do I associate the various commands and that is when I click on the share I get a list of social , and save image set as background the current image.

Thanks
Zerouno
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 03, 2013 8:31 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 7 guests