Hi TreKing, thanks for your reply.

I thought I was pretty clear but still.

I have a website with normal images (jpg) on it. I have created an app
using webview to load that website.

What I was looking for is some way to allow the client to hold and
save or set the image as wallpaper.
I have search the documentation for examples but all I found was
questions like mine but with no replies.

This is my .java file


package com.wallpaper.free;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;


////////////////

        public class WallpaperFreeMain extends Activity {

                private class HelloWebViewClient extends WebViewClient {
                    @Override
                    public boolean shouldOverrideUrlLoading(WebView view, String
url) {
                        if 
(Uri.parse(url).getHost().equals("www.netbattles.com")) {
                            // This is my web site, so do not override; let my
WebView load the page
                            return false;
                        }
                        // Otherwise, the link is not for a page on my site, so
launch another Activity that handles URLs
                        Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse(url));
                        startActivity(intent);
                        return true;
                    }
                }

                @Override
                   public boolean onKeyDown(int keyCode, KeyEvent event) {
                       if ((keyCode == KeyEvent.KEYCODE_BACK) &&
mWebView.canGoBack()) {
                           mWebView.goBack();
                           return true;
                       }
                       return super.onKeyDown(keyCode, event);
                   }

                private WebView mWebView;

                public void onCreate(Bundle savedInstanceState) {
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.main);

                    mWebView = (WebView) findViewById(R.id.webview);
                    mWebView.getSettings().setJavaScriptEnabled(true);
                    mWebView.loadUrl("http://www.netbattles.com/";);
                    mWebView.setWebViewClient(new HelloWebViewClient());
                }
        }

-- 
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