Eclipse Mobile Mousw Przewodnik Instalacji Strona 37

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 59
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 36
37
password = "123456";
/* Be intelligent, you will understand that the following two statements
* are used for getting values of userName and passWord from two independent
* text in the other activity (which can be used in the login page of the app).
* */
//username = ZRTrafficActivity.userName.getText().toString();
//password = ZRTrafficActivity.passWord.getText().toString();
/* Use the LocationManager class to obtain GPS locations */
mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5*1000, 10, mlocListener);
}
. . . . . .
}
Appendix-3
package com.demo.mobile;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Hub
*/
public class Hub extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Hub() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
// NOTE: to get the value of POINT
String point = request.getParameter("point");
if("location".equalsIgnoreCase(point))
Przeglądanie stron 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 58 59

Komentarze do niniejszej Instrukcji

Brak uwag