[android-developers] Re: Sending GPS coordinates to a server
Hey Bhuvan i have the same project like yours , I m also very new in Android Development but somehow i have managed my android app to send the cordinates to my server but still have some issues in it which we can discuss with each other. Add me sulp...@gmail.com see my post from here : http://stackoverflow.com/questions/14088095/how-can-i-send-the-gps-and-network-location-cordinates-to-a-server-static-ip On Thursday, 22 March 2012 11:04:14 UTC+5, bhuvan wrote: > > Hi Iam doing a project on vehicle tracking , For which i have chosen > the cheapest method of tracking, that is by using an android mobile > with an application which could send the coordinates of the locations > to a server, from there i could access the coordinates and overlay > them on a map . So what i need is how to build an application which > could use the gps receiver in the mobile for the coordinates and send > it directly through GPRS to a server which can be accessed from > anywhere through internet. Iam very much new to android developing, so > i was hoping whether anyone could help me in this regard > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] unable to get complete soapresponse
hii, im passing parameter to .net webservice and it is giving xml as a response bt the problem is that im not getting complete xml and getting Anytype before every node and i dont know how to parse that response through SAX.. my android code looks like following: private String NAMESPACE = "http://polymerupdate.com/";; private String SendSoapMessage(String NAMESPACE, String METHOD_NAME, String testBody) { try { URL connectURL = new URL("http://demo.polymerupdate.com/web/news- desk.asmx"); HttpURLConnection connection = (HttpURLConnection) connectURL .openConnection(); // SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope2 = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope2.encodingStyle = SoapSerializationEnvelope.ENC; connection.setRequestProperty("Content-Type", "text/xml"); connection.setRequestProperty("Content-Length", "" + testBody.getBytes().length); connection.setRequestMethod("POST"); connection.setDoInput(true); connection.setDoOutput(true); OutputStream os = connection.getOutputStream(); os.write(testBody.getBytes(), 0, testBody.getBytes().length); os.close(); testBody = null; InputStream is = connection.getInputStream(); //InputStream is = new ByteArrayInputStream(null); is = connection.getInputStream(); XmlPullParser xp = new KXmlParser(); xp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); xp.setInput(is, null); envelope2.parse(xp); final String result2 = (envelope2.getResponse()).toString(); is.close(); Log.d("sid", "result= " + result2); return result2; } catch (Exception e) { Log.d("sid", "error " + e.getMessage()); } return null; } public boolean Checklogin(String user, String pwd) { String body = " " + "http://www.w3.org/2001/XMLSchema- instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"; xmlns:soap= \"http://schemas.xmlsoap.org/soap/envelope/\";> " + " " + "http://polymerupdate.com/\";> " + "" + user +" " + "" + pwd + " " + " " + " " + ""; try { String METHOD_NAME = "DisplayNewsHeadLines"; String result2 = SendSoapMessage(NAMESPACE, METHOD_NAME, body); Log.d("sid", "final result2 " + result2); } catch (Exception e) { // TODO: handle exception Log.d("sid", "error " + e.getMessage()); } return true; } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android emulator does not show any thing
when i run an android app the emulator starts but does not show anything. there is a black screen on it.. and the following messages are showed in the console section. [2012-02-18 11:51:37 - LunchList] -- [2012-02-18 11:51:37 - LunchList] Android Launch! [2012-02-18 11:51:37 - LunchList] adb is running normally. [2012-02-18 11:51:37 - LunchList] Performing apt.tutorial.LunchList activity launch [2012-02-18 11:51:37 - LunchList] Automatic Target Mode: launching new emulator with compatible AVD 'secondAVD' [2012-02-18 11:51:37 - LunchList] Launching a new emulator with Virtual Device 'secondAVD' [2012-02-18 11:51:49 - Emulator] Warning: No DNS servers found [2012-02-18 11:51:54 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error [2012-02-18 11:51:54 - LunchList] New emulator found: emulator-5554 [2012-02-18 11:51:54 - LunchList] Waiting for HOME ('android.process.acore') to be launched... [2012-02-18 11:53:56 - LunchList] emulator-5554 disconnected! Cancelling 'apt.tutorial.LunchList activity launch'! plz guide me -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] didn't get output on my PC, i get only ANDROID...
hi friends i am new to android,, and just install eclipse galileo and android 2.3,,, when i create my new project,, it didn not show any error,, but when i run it ,, it shows only ANDROID... flash screen. My .java code is: package android_programmers_guide.HelloWorldText; import android.app.Activity; import android.os.Bundle; public class HelloWorldText extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); } } and main.xml code is:- http://schemas.android.com/apk/res/android android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > am i doing some wrong?? or did i wrong setting in eclipse?? please send me procedure to set eclipse and android. thank you -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] speech to text app
hii friends its aamir, i want to create speech to text app in android. can anybody tell me about its possiblity.thank you -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Stuck with getting package name
It seems that you people are sleeping!! On Feb 25, 7:47 am, Dianne Hackborn wrote: > Fwiw, this is s not something you should do in a normal app. Going > it getting a list of running apps, arbitrarily bounded to 100, is a big clue > of this. > > And in general, there is no one single package name associated with a pid. > You really shouldn't be dealing with pids; the identity of most everything > is based on its uid, and the pid is fairly irrelevent. (Not that a uid > necessarily has a single package name associated with it either.) > > > > On Tue, Feb 24, 2009 at 3:41 PM, sm1 wrote: > > > In free app *Device Internals for r1*, I get the running services this > > way: > > > StringBuffer getRunningServices(ActivityManager am){ > > StringBuffer buf = new StringBuffer(); > > buf.append("\n\nRunning Services:"); > > List list = null; > > try{ > > list = am.getRunningServices(100); > > }catch(Throwable ex){ > > buf.append("\n "+ex); > > return buf; > > } > > if(list.isEmpty()){ > > buf.append(" None listed."); > > return buf; > > } > > int i = 1; > > for(ActivityManager.RunningServiceInfo info: list){ > > buf.append("\n ["+i+"] pid {"+info.pid+"}:"); > > buf.append("\n foreground {"+info.foreground+"}"); > > buf.append("\n active since {"+info.activeSince+"} millis = > > "+millisToSignHhMmSs(info.activeSince)+" "+HMS); > > buf.append("\n last activity time {"+info.lastActivityTime+"} > > millis = "+millisToSignHhMmSs(info.lastActivityTime)+" "+HMS); > > buf.append("\n client count {"+info.clientCount+"}"); > > buf.append("\n crash count {"+info.crashCount+"}"); > > buf.append("\n service class {"+info.service.getClassName() > > +"}"); > > buf.append("\n process {"+info.process+"}"); > > if(info.restarting==0){ > > buf.append("\n restarting at {"+info.restarting+"} zero means > > not scheduled to restart"); > > }else{ > > buf.append("\n restarting at {"+info.restarting+"} millis = > > "+millisToSignHhMmSs(info.restarting)+" "+HMS); > > } > > buf.append("\n started {"+info.started+"}"); > > //buf.append("\n toString {"+info.toString()+"}"); > > ++i; > > } > > return buf; > > } > > > And this will get you one process name if you know the Pid: > > > /** @return null when givenPid not found in list of 100 first > > services. */ > > String getProcessNameFromPid(int givenPid){ > > ActivityManager am = (ActivityManager) getSystemService > > (Context.ACTIVITY_SERVICE); > > List list = > > am.getRunningServices(100); > > for(ActivityManager.RunningServiceInfo info: list){ > > if(info.pid == givenPid){ > > return info.process; > > } > > } > > return null; > > } > > > cheers, > > serge > > > On Feb 24, 4:23 am, sohail khan wrote: > > > Hi all, > > > > How do I get the Package Name if I am having the PID of the process. For > > > example, if I want to output a list of currently > > > running processes, I can get the PIDs but how do I get the names of the > > > PIDs? > > > > Thanks. > > > -- > > > sohail > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Stuck with getting package name
It seems that you people are sleeping!! On Feb 25, 7:47 am, Dianne Hackborn wrote: > Fwiw, this is s not something you should do in a normal app. Going > it getting a list of running apps, arbitrarily bounded to 100, is a big clue > of this. > > And in general, there is no one single package name associated with a pid. > You really shouldn't be dealing with pids; the identity of most everything > is based on its uid, and the pid is fairly irrelevent. (Not that a uid > necessarily has a single package name associated with it either.) > > > > On Tue, Feb 24, 2009 at 3:41 PM, sm1 wrote: > > > In free app *Device Internals for r1*, I get the running services this > > way: > > > StringBuffer getRunningServices(ActivityManager am){ > > StringBuffer buf = new StringBuffer(); > > buf.append("\n\nRunning Services:"); > > List list = null; > > try{ > > list = am.getRunningServices(100); > > }catch(Throwable ex){ > > buf.append("\n "+ex); > > return buf; > > } > > if(list.isEmpty()){ > > buf.append(" None listed."); > > return buf; > > } > > int i = 1; > > for(ActivityManager.RunningServiceInfo info: list){ > > buf.append("\n ["+i+"] pid {"+info.pid+"}:"); > > buf.append("\n foreground {"+info.foreground+"}"); > > buf.append("\n active since {"+info.activeSince+"} millis = > > "+millisToSignHhMmSs(info.activeSince)+" "+HMS); > > buf.append("\n last activity time {"+info.lastActivityTime+"} > > millis = "+millisToSignHhMmSs(info.lastActivityTime)+" "+HMS); > > buf.append("\n client count {"+info.clientCount+"}"); > > buf.append("\n crash count {"+info.crashCount+"}"); > > buf.append("\n service class {"+info.service.getClassName() > > +"}"); > > buf.append("\n process {"+info.process+"}"); > > if(info.restarting==0){ > > buf.append("\n restarting at {"+info.restarting+"} zero means > > not scheduled to restart"); > > }else{ > > buf.append("\n restarting at {"+info.restarting+"} millis = > > "+millisToSignHhMmSs(info.restarting)+" "+HMS); > > } > > buf.append("\n started {"+info.started+"}"); > > //buf.append("\n toString {"+info.toString()+"}"); > > ++i; > > } > > return buf; > > } > > > And this will get you one process name if you know the Pid: > > > /** @return null when givenPid not found in list of 100 first > > services. */ > > String getProcessNameFromPid(int givenPid){ > > ActivityManager am = (ActivityManager) getSystemService > > (Context.ACTIVITY_SERVICE); > > List list = > > am.getRunningServices(100); > > for(ActivityManager.RunningServiceInfo info: list){ > > if(info.pid == givenPid){ > > return info.process; > > } > > } > > return null; > > } > > > cheers, > > serge > > > On Feb 24, 4:23 am, sohail khan wrote: > > > Hi all, > > > > How do I get the Package Name if I am having the PID of the process. For > > > example, if I want to output a list of currently > > > running processes, I can get the PIDs but how do I get the names of the > > > PIDs? > > > > Thanks. > > > -- > > > sohail > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Stuck with getting package name
I am a bit confused here! Actually is there any way to find out what applications are running on my phone, what are their names. I think applications may have a single PID. Need your assistance to understand and find apps names. On Feb 25, 7:47 am, Dianne Hackborn wrote: > Fwiw, this is s not something you should do in a normal app. Going > it getting a list of running apps, arbitrarily bounded to 100, is a big clue > of this. > > And in general, there is no one single package name associated with a pid. > You really shouldn't be dealing with pids; the identity of most everything > is based on its uid, and the pid is fairly irrelevent. (Not that a uid > necessarily has a single package name associated with it either.) > > > > On Tue, Feb 24, 2009 at 3:41 PM, sm1 wrote: > > > In free app *Device Internals for r1*, I get the running services this > > way: > > > StringBuffer getRunningServices(ActivityManager am){ > > StringBuffer buf = new StringBuffer(); > > buf.append("\n\nRunning Services:"); > > List list = null; > > try{ > > list = am.getRunningServices(100); > > }catch(Throwable ex){ > > buf.append("\n "+ex); > > return buf; > > } > > if(list.isEmpty()){ > > buf.append(" None listed."); > > return buf; > > } > > int i = 1; > > for(ActivityManager.RunningServiceInfo info: list){ > > buf.append("\n ["+i+"] pid {"+info.pid+"}:"); > > buf.append("\n foreground {"+info.foreground+"}"); > > buf.append("\n active since {"+info.activeSince+"} millis = > > "+millisToSignHhMmSs(info.activeSince)+" "+HMS); > > buf.append("\n last activity time {"+info.lastActivityTime+"} > > millis = "+millisToSignHhMmSs(info.lastActivityTime)+" "+HMS); > > buf.append("\n client count {"+info.clientCount+"}"); > > buf.append("\n crash count {"+info.crashCount+"}"); > > buf.append("\n service class {"+info.service.getClassName() > > +"}"); > > buf.append("\n process {"+info.process+"}"); > > if(info.restarting==0){ > > buf.append("\n restarting at {"+info.restarting+"} zero means > > not scheduled to restart"); > > }else{ > > buf.append("\n restarting at {"+info.restarting+"} millis = > > "+millisToSignHhMmSs(info.restarting)+" "+HMS); > > } > > buf.append("\n started {"+info.started+"}"); > > //buf.append("\n toString {"+info.toString()+"}"); > > ++i; > > } > > return buf; > > } > > > And this will get you one process name if you know the Pid: > > > /** @return null when givenPid not found in list of 100 first > > services. */ > > String getProcessNameFromPid(int givenPid){ > > ActivityManager am = (ActivityManager) getSystemService > > (Context.ACTIVITY_SERVICE); > > List list = > > am.getRunningServices(100); > > for(ActivityManager.RunningServiceInfo info: list){ > > if(info.pid == givenPid){ > > return info.process; > > } > > } > > return null; > > } > > > cheers, > > serge > > > On Feb 24, 4:23 am, sohail khan wrote: > > > Hi all, > > > > How do I get the Package Name if I am having the PID of the process. For > > > example, if I want to output a list of currently > > > running processes, I can get the PIDs but how do I get the names of the > > > PIDs? > > > > Thanks. > > > -- > > > sohail > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Stuck with getting package name
Hi all, How do I get the Package Name if I am having the PID of the process. For example, if I want to output a list of currently running processes, I can get the PIDs but how do I get the names of the PIDs? Thanks. -- sohail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: GPS LocationManager Problem
I can't find that permission in the official documentation. Isn't this deprecated? Secondly, I'm using the emulator. I've tried both using the DDMS and telnet (geo fix) to send the coordinates. Both with no luck. I read somewhere that this works on windows. I'm using ubuntu (if that matters.) (Just in case, I don't get any exception, just a null) On Feb 17, 11:32 pm, Timo Bruck wrote: > Have you also added permissions for > android.permission.ACCESS_LOCATION? I believe you need both. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] GPS LocationManager Problem
I am developing an application that uses the GPS functionality. I am getting a null pointer exception at the code below: Location l = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); The java docs for the getLastKnownLocation states that: " if the provider is disabled, null is returned. I am getting null for the value of "l". I have also send the GPS coordinates using the DDMS tool and have assigned the permissions for using GPS "ACCESS_FINE_LOCATION". What does it means by "disabled provider" and how to handle this error. Thank you in advance. -- sohail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Dialing Permission
I am not using the built in ACTIVITY for Dialer. Rather trying to create my own. I wrote the following code and when I run this; the Dialer starts to dial. package my.AndroidPhoneDialer; import android.app.Activity; import android.os.Bundle; import android.content.Intent; import android.net.Uri; public class AndroidPhoneDialer extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intent DialIntent = new Intent (Intent.ACTION_DIAL, Uri.parse ("tel:03332424242")); /** To Launch the Dialer Activity */ DialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); /** To start the Activity */ startActivity(DialIntent); Intent CallIntent = new Intent (Intent.ACTION_CALL, Uri.parse ("tel:03332424242")); CallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(CallIntent); } } On Jan 30, 11:22 pm, Charlie Collins wrote: > I don't think you need any permission to initial a phone call using > the built in Activity. As long as you go through the built in activity > and included user interface, no perms required. > The CALL_PHONE permission is for making a call on your own without > using the built in Activity, as I understand it (if you want to write > your own dialer, or otherwise not go through the built in dialer). > > (And the built in Activity probably HAS the CALL_PHONE permission, so > it's not your app that needs the permission if you are handing off, > etc.) > > On Jan 30, 7:07 am, Sohail wrote: > > > Hi, > > > I just created a simple application, that starts the Dial Activity and > > place a call. I did not provide any permission in the manifest file to > > start a call, but still the call activity starts. > > > I also checked the AndroidManifest.xml file, there is no permission > > added, still the activity starts. > > > can anyone explain, why this is so. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Dialing Permission
Hi, I just created a simple application, that starts the Dial Activity and place a call. I did not provide any permission in the manifest file to start a call, but still the call activity starts. I also checked the AndroidManifest.xml file, there is no permission added, still the activity starts. can anyone explain, why this is so. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse Plug-in Site down?
Actually, I can confirm that the http site isn't working either. Both appear to be down. Navigating to either in your browser gets you the following HTTP 404 message: "The requested URL /android/eclipse/ was not found on this server. " Google may be moving the plugin to a new location but have perhaps not updated the developer documentation. On Nov 15, 11:02 pm, "Matt Schmulen" <[EMAIL PROTECTED]> wrote: > Just remove the s and get it http// instead of https// > > On Nov 15, 2008 3:57 PM, "Hong Ji" <[EMAIL PROTECTED]> wrote: > > Same problem. The Eclipse says "No repository found > athttps://dl-ssl.google.com/android/eclipse/."; > > On Nov 14, 1:25 pm, Steve918 <[EMAIL PROTECTED]> wrote: > I'm getting > a 404 when I try to i... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~--~~~~--~~--~--~---