Hi Li Yan
once you have developed the EJB component and Android Activity. You can code a Servlet that will internally call EJB from Android you are free to call Servlet using HttpURLConnection Class in the API.
pass the parameters to the servlet and from servlet pass them to EJB and start your Business Logic.
String urlString = "http://projectcontextpath/servletname"
URL url =
new
URL(urlString);
URLConnection connection = url.openConnection();
try
{
HttpURLConnection httpConnection = (HttpURLConnection) connection;
httpConnection.setRequestMethod(
"GET"
);
httpConnection.connect();
}catch(Exception e){
e.printStackTrace();
}
Hope This helps you. Happy Coding.
Thanks.