Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
I am trying to develop an application of employee tracking in which any employee who is out for a field work of a company can give his attendance by sending his geo location that is latitude and longitude along with his emp_code to a website and after receiving this details the admin will able to view his geo location on map. Please any one help me to do so!!! and also tel me how database and which database will play its role in this application

What I have tried:

I am new to android and server communication application. I did all basic UI for this but stuck at actual working
Posted
Updated 7-Jul-16 17:46pm

You can use the HTTP clients in Android API to transmit the details to an online server. ASP.NET website or web application is a good online resource where your Android application can share the data on.

The basic documentation for connecting to the network are provided on Android documentation itself, Connecting to the Network | Android Developers[^], and chances are that you will understand how to do these communications easily.

You also mention sharing the location, I just had an article, in which application would capture the location and then share it through SMS, you can use HTTP protocol. Read that article here, Ok Android, Broadcast my location![^]. The application talks about the methods used to request and capture the location using Location APIs in Android.

You can remove the SMS functionality and instead use the HTTP services to send the data to the web site. ASP.NET web site would handle the request and store the data as required.

HttpURLConnection | Android Developers[^]
 
Share this answer
 
easy and best way to send Data From Android to Asp.net to Use ksoap2 with webservice
Here is Some Code Sample :

Java
public final String SOAP_ACTION = "http://tempuri.org/HelloWorld";

   public  final String OPERATION_NAME = "";

   public  final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/";
       final String SOAP_ADDRESS ="";

       Log.d("errors",pid+" "+lat +" "+longs);

       SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
       PropertyInfo pi=new PropertyInfo();
               pi.setName("pid");
               pi.setValue(pid);
               pi.setType(String.class);
               request.addProperty(pi);


               SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
               SoapEnvelope.VER11);
                       envelope.dotNet = true;
                       envelope.setOutputSoapObject(request);
                       HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
                       Object response=null;
                       try
                       {
                       httpTransport.call(SOAP_ACTION, envelope);
                       response = envelope.getResponse();
                       }
                       catch (Exception exception)
                       {
                       response=exception.toString();
                       }

       return response.toString();
 
Share this answer
 
Comments
Member 12188776 8-Jul-16 15:27pm    
Hi this is responce of asmx service so how to send data


POST /WSVistaWebClient/LoyaltyService.asmx HTTP/1.1
Host: api.vista.co.nz
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://vista.co.nz/services/WSVistaWebClient.ServiceContracts/1/CreateMember"

<!--?xml version="1.0" encoding="utf-8"?-->
<soap:envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<creatememberrequest xmlns="http://vista.co.nz/services/WSVistaWebClient.DataTypes/1/">
<loyaltymember>
<memberid>string
<firstname>string
<lastname>string
<fullname>string
<cardnumber>string
<mobilephone>string
<homephone>string
<email>string
priyanshbhaliya 8-Jul-16 22:42pm    
hi , What you want to send to asmx service then add parameter to CreateMember and at android side add property
pi.setName("pid");
pi.setValue(pid);
pi.setType(String.class);
request.addProperty(pi);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900