Tuesday, July 13, 2010

HOTMAIL APP FOR ANDROID


CODE FOR MY FIRST APP

java script

package com.mycompany.hotmail;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class hotmail extends Activity { WebView webview;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setPluginsEnabled(true);
webview.setWebViewClient(new HelloWebViewClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://hotmail.com");

}
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
webview.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
}



3 comments:

  1. This app is great, the few things to improve in my opinion: attachments (cannot be downloaded al least in my phone WT19) and notifications

    ReplyDelete
  2. Looking for hotmail support? Having trouble in your hotmail account? We at Outlook support help out hotmail users to get their hotmail account back. contact hotmail support uk

    ReplyDelete
  3. Hotmail é um dos serviços de website de e-mail on-line gratuitos mais populares, fornecidos pela Microsoft. E é um serviço de Webmail e os usuários podem fazer login de todo o navegador da Web como IE, Chrome, Opera, … em qualquer lugar do mundo. Hotmail Entrar

    ReplyDelete