[android-developers] Re: Getting GPS Location in Android 1.0 SDK
Thanks for the reply Shailesh. I tried the ACCESS_LOCATION_EXTRA_COMMANDS and your code of lmanager.getLastKnownLocation(lmanager.getProviders(true).get(0)) but I'm still getting a null. 1. What are the values that you get for this location? (I mean the coordinates) 2. Do you get the error for /etc/gps.conf when you start the emulator? (or you could check if you have /etc/gps.conf using the adb shell) Thanks for your help, Gautam On Oct 16, 1:49 am, shailesh prakash [EMAIL PROTECTED] wrote: Try !-- why I add this I didn't remember -- uses-permission android:name=android.permission.ACCESS_LOCATION_EXTRA_COMMANDS/uses-permission and see my MapActivity code its working on 1.0, private MyLocationOverlay mMyLocationOverlay; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); kMapView = (MapView) findViewById(R.id.main_map); kMapCtrl = kMapView.getController(); LocationManager lm = (LocationManager)getSystemService(LOCATION_SERVICE); Location loc = lm.getLastKnownLocation(lm.getProviders(true).get(0)); . } On Thu, Oct 16, 2008 at 10:21 AM, Gautam [EMAIL PROTECTED] wrote: Hi All, I'm trying to get the location using the LocationManager.getLastKnownLocation(gps) method and am getting null. Here is the problem in more detail: When I start the emulator, I get the following gps errors in LogCat: 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): Could not open GPS configuration file /etc/gps.conf 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): java.io.FileNotFoundException: /etc/gps.conf 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java: 227) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at java.io.FileInputStream.init(FileInputStream.java:76) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.internal.location.GpsLocationProvider.init(GpsLocationProvider.java: 179) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService._loadProvidersNoSync(LocationManagerService.java: 356) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProvidersNoSync(LocationManagerService.java: 340) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProviders(LocationManagerService.java: 333) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.init(LocationManagerService.java: 447) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.ServerThread.run(SystemServer.java:230) 10-16 04:15:29.017: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service 10-16 04:15:29.036: DEBUG/LocationManagerService(52): Found dir /data/ location/gps 10-16 04:15:29.036: DEBUG/LocationManagerService(52): name = gps 10-16 04:15:29.047: DEBUG/GpsLocationProvider(52): enable 10-16 04:15:29.089: DEBUG/GpsLocationProvider(52): GpsEventThread starting I checked using adb shell and there is no file /etc/gps.conf but seems that the gps provider does get enabled. I wrote an activity, where the main logic is: System.out.println(Providers found= + lmanager.getAllProviders()); System.out.println(GPS Enabled= + lmanager.isProviderEnabled(LocationManager.GPS_PROVIDER)); System.out.println(Last Known Location= + lmanager.getLastKnownLocation(LocationManager.GPS_PROVIDER)); and have given the permissions for ACCESS_FINE_LOCATION and ACCESS_MOCK_LOCATION in my manifest.xml and here is the log when I run the code: 10-16 04:22:33.316: DEBUG/LocationManagerService(52): getAllProviders 10-16 04:22:33.327: INFO/System.out(230): Providers found=[gps] 10-16 04:22:33.336: INFO/System.out(230): GPS Enabled=true 10-16 04:22:33.336: INFO/System.out(230): Last Known Location=null So, I get gps provider and it is enabled, but the last known location I get is null. I tried investigating further in the adb shell and got this: # cd /data/location/gps # ls nmea location properties # cat location gps,1193789209,37.42238666,-122.096535,0,0,0 I am not trying to set my location (the setters for which have been removed from Android 1.0), but just trying to retrieve it from the GPS provider, so here I am wondering: 1. Why am I getting null as the location? 2. Say, we were to solve that issue, then would Android read the location from the /data/location/gps/nmea or /data/location/gps/ location file? and where are we specifying that? Is this all due to the missing /etc/gps.conf? Thanks, Gautam --~--~-~--~~~---~--~~ You received this message
[android-developers] file that is wriiten on an SDCard not visible
I needed to download a file and store it in my sdcard.I first save it by writing in the output stream(by using openFileOutput) in the application package.From here I copy it to my SDCard and its written on my SDCard.But when i see my SDCard in the file in the DDMS mode i am able to see that file,but in the SDCard i was not able to see that file.Please could anyone tell how can this be acheived. heres the code snippet i use. String fileName = myFileName; File bufferedFile = new File(/sdcard/+fileName); copyFiletoSDCard(downloadingMediaFile,bufferedFile.getAbsolutePath()); private void copyFiletoSDCard(File fromFile, String fileName) { FileInputStream from = null; FileOutputStream to = null; try { from = context.openFileInput(fromFile.getName()); to = new FileOutputStream(fileName); byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = from.read(buffer)) != -1) to.write(buffer, 0, bytesRead); // write } catch(IOException ioException){ Log.i(getClass().getName(),ioException Msg); Log.i(getClass().getName(),ioException.getMessage()); ioException.printStackTrace(); }finally { if (from != null) try { from.close(); } catch (IOException e) { ; } if (to != null) try { to.close(); } catch (IOException e) { ; } } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How communicate between two activities?
Apart from class application..u can alwaz create a singleton class... 2008/10/16 pskink [EMAIL PROTECTED] On 15 Paź, 21:07, Ramunas [EMAIL PROTECTED] wrote: Hello, I have two activities in one application. I want call function in activity from another activity. How I can do it? Please give me any suggestions. Ramunas class Application is your friend --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: write and read data
http://developerlife.com/tutorials/?p=290 http://www.anddev.org/working_with_files-t115-s30.html This may help u On Tue, Oct 14, 2008 at 2:53 PM, zeshu [EMAIL PROTECTED] wrote: How to write data to text files and send that file to a specialized server in the Internet through TCP/IP? How to write the data collected in step 2 into text files in the phone memory, and send this data at predefined intervals (e.g. once every week) to an Internet server via TCP/IP? Please provide the general approach how to do this, and possible references --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to Keep Expandable List View be expanded by default?
hello , I also need to know the ans for this quesion...Please could any one help.. On Wed, Oct 8, 2008 at 5:33 PM, vel [EMAIL PROTECTED] wrote: can i have more that two level of nesting On Aug 22, 9:27 am, Faiz C [EMAIL PROTECTED] wrote: Hi, you can use the following method to expand all the items in the expandable list view. * getExpandableListView().expandGroup(groupPos) *Regards, Faiz.* * On Thu, Aug 21, 2008 at 10:56 PM, Slater [EMAIL PROTECTED] wrote: Hi, Does anyone know of a easy way (via coding or through xml attributes) to display ExpandableListView as expanded/opened by default. Any help is highly appreciated. Thanks, Snep. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] MediaPlayer streaming playback
can you stream video? has anyone managed to stream video? if so which formats did you use? tx Jason, What do you mean by stream is out.I am able to stream an Mp3 from an uri and get it in my local device. RTSP is not supported On Fri, Oct 10, 2008 at 3:47 AM, Jason Proctor mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: OK i found the answer in the 1.0 release notes. seems like streaming is out for the time being. i've been trying to play 3gp and mp4 movies off an HTTP server with MediaPlayer without success. i know the movie files are OK because i can play them locally off the sdcard. the errors i'm getting include the now famous unknown errors 0x and 0xfffc. from googling i know that RTSP isn't currently supported in the emulator due to UDP issues, but is streaming supported over HTTP? and if so, do i need to hack regular 3gp or mp4 files so that they can be streamed? thanks muchly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: G1 Review by PC World
Hi David, Many people are posting links on android-discuss for things like this, that way we can flesh out the discussions without interfering with the developer talk. Al. David C wrote: Apologies if this is considered off topic, but it seems relevant. PC World review the G1 here: http://www.pcworld.com/businesscenter/article/152339/the_g1_is_no_iphone_but_android_has_promise.html My summary of the review is this: - Hardware doesn't match up to the I-phone but the software is nice. - Open platform holds promise but decent apps are limited due to the lack of an Android store. - Camera really sucks (way too dark). - Long-click concept is good - Has perhaps too much of a google-centric feel -- Al Sutton W: www.alsutton.com B: alsutton.wordpress.com T: twitter.com/alsutton --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to change the ringtone of the phone
On Oct 16, 1:21 pm, guru [EMAIL PROTECTED] wrote: hello, I need to know whether there is any way the ringtone of the phone can be changed programatically.If yes,please could any one help me on this. Check out RingsExtended in the apps-for-android project http://code.google.com/p/apps-for-android/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer streaming playback
MediaPlayer can only be used to play progressive streaming media. The thread below has more details on how to check if your files are progressive streamable and how to create progressive streamable content: http://groups.google.com/group/android-developers/msg/2175bba33a09b262 2008/10/15 Jason Proctor [EMAIL PROTECTED] can you stream video? has anyone managed to stream video? if so which formats did you use? tx Jason, What do you mean by stream is out.I am able to stream an Mp3 from an uri and get it in my local device. RTSP is not supported On Fri, Oct 10, 2008 at 3:47 AM, Jason Proctor mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: OK i found the answer in the 1.0 release notes. seems like streaming is out for the time being. i've been trying to play 3gp and mp4 movies off an HTTP server with MediaPlayer without success. i know the movie files are OK because i can play them locally off the sdcard. the errors i'm getting include the now famous unknown errors 0x and 0xfffc. from googling i know that RTSP isn't currently supported in the emulator due to UDP issues, but is streaming supported over HTTP? and if so, do i need to hack regular 3gp or mp4 files so that they can be streamed? thanks muchly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer streaming playback
Jason, What do you mean by stream is out.I am able to stream an Mp3 from an uri and get it in my local device. RTSP is not supported On Fri, Oct 10, 2008 at 3:47 AM, Jason Proctor [EMAIL PROTECTED] wrote: OK i found the answer in the 1.0 release notes. seems like streaming is out for the time being. i've been trying to play 3gp and mp4 movies off an HTTP server with MediaPlayer without success. i know the movie files are OK because i can play them locally off the sdcard. the errors i'm getting include the now famous unknown errors 0x and 0xfffc. from googling i know that RTSP isn't currently supported in the emulator due to UDP issues, but is streaming supported over HTTP? and if so, do i need to hack regular 3gp or mp4 files so that they can be streamed? thanks muchly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] HttpURLConnection getResponseCode
I have a class that implements an HttpURLConnection. The class works fine most of the time. Once in a while when I perform a GET operation getResponseCode returns -1. Does anyone know under what circumstances getResponseCode returns -1? The documentation states: the response code, -1 if no valid response code. Ethereal shows that the GET request has been sent but that no bytes have been received. Also, the getResponseCode does not time out. When it fails it does so without waiting at all (typically 100ms). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Dalvik virtual machine specifiation
wiki 写道: Are there any official documentaion available for the Dalvik Virtual Machine? No, it haven't been released. Waiting for android source code release~~~;) BR! Linuxemacs -- Thanks Regards Jiang Jiang E-mail: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Custom animation doesn't invalidate the area correctly
For anyone else interested, I have now found the solution. While I'm still improving my solution the problem was that the old child was placed in mDisappearingChildren and was therefor painted by the main view even after I thought it was removed. Send me a message if you have a similar problem and like to get more details. Regards, //Erik On Sep 1, 11:00 pm, Erik Calissendorff [EMAIL PROTECTED] wrote: Hi again Romain and thanks for your quick responses, Let me try to explain the setup further: I have a rootView which contains a few ViewGroups. When an item is dragged it is removed from the ViewGroup which it originally belonged to and added to the rootView instead, the dragged item is then what is called the mEditView in my code. When the dragged item is released it is added to the ViewGroup which it is currently positioned over or if not accepted there returned to it's original location and ViewGroup. As long as the item is dragged around the rootView.getChildSta... is responsible for drawing it in the right place, this is acheived with the help class of mEditTransformationHelper which enables some simple animation of the movements. By implementing this simple form of private animation I can at any time locate where the View is drawn, which I need to know when the dragged item is released. The tricky part is when the view gets released, it then is removed from the rootView and reinserted into one of the ViewGroups. My custom animation is responsible for smoothly moving the dragged view from the drop location to the actual location that it is assigned to (currently using a grid layout so some adjustment will be made from the actual drop location). The custom animation is given the absolute location of the dragged view before it is removed from the rootView. Once the animation is initiated it will recalculate the coordinates to correspond with the new assigned location of the view, this works really well with the exception following. The problem is that if the dragged view is partially (or even fully) over another ViewGroup than the one it will be assigned to after the drop, that other ViewGroup is not invalidated and the part of the view that was visible over the other ViewGroup will remain visible while and after the animation is finished. The question is therefor how I can ensure that either the entire rootView is invalidated (during animation) or which other approach that could be advised. Below are the relevant code snippets from the key functions and classes: rootView.getChildStaticTransformation(View child, Transformation t) { [...] if(child == this.mEditView) { Transformation tr=new Transformation(); tr.set(this.mEditTransformation); [...] //Update the tr transformation this.mEditTransformationHelper.apply(tr); this.invalidate(); [...] t.compose(tr); this.mEditTransformation.set(t); returnValue=true; } [...] } customAnimation.applyTransformation(float interpolatedTime, Transformation t) { super.applyTransformation(interpolatedTime, t); Misc.updateTransformation(t,this.mWork,interpolatedTime,true); } mEditTransactionHelper.apply(Transformation source) { [...] for(...) { [...] //Update the source transformation Misc.updateTransformation(source,tr.mTargetTransformation,completed); [...] } } Misc.updateTransformation(Transformation source,Transformation target,float progress,boolean reverse) { [...] if(target.getTransformationType() == Transformation.TYPE_BOTH || target.getTransformationType() == Transformation.TYPE_MATRIX) { [...] float [] sourceMatrix=new float[9]; source.getMatrix().getValues(sourceMatrix); float[] targetMatrix=new float[9]; target.getMatrix().getValues(targetMatrix); for(int i=0;i9;i++) { sourceMatrix[i]=sourceMatrix[i]+(targetMatrix[i]- sourceMatrix[i])*progress; } source.getMatrix().setValues(sourceMatrix); [...] } } On Sep 1, 9:50 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, It's hard to tell what's going on with such a succinct description. Could you show some code if possible? It
[android-developers] Re: PathClassLoader failed in SDK 1.0, worked in 0.9
On Sep 30, 3:48 pm, Wesley [EMAIL PROTECTED] wrote: hi Lia, Thanks for the guide... It's worked (/data/dalvik-cache/)... but now... may I ask one more questions??? if I got the error below, how??? I try to change mode(chmod 777) is not working... 09-30 05:41:09.305: INFO/WESLEY(2340): java.io.IOException: Couldn't open /data/data/com.basic.ui/cache_/widget.xml thanks agains... wesley. On Fri, Sep 26, 2008 at 5:50 PM, Lia [EMAIL PROTECTED] wrote: Hi, I was experiencing something similar, when porting from SDK 0.9 to 1.0. I got error .Can't open dex cache . Unable to open or create cache for.. when loading custom classes with DexFile. I solved the problem in my environment by simply starting the abd console and changing rights in the cache folder: cd /data/dalvik-cache/ chmod 777 . Hope this helps. Cheers, Lia.- Hide quoted text - - Show quoted text - My application relies on dynamic loading of classes using PathClassLoader as well. My main concern is the permissions that are going to be set on /data/ dalvic-cache in a target device, such as the new HTC G1 phone. If the permissions are the same as in the emulator, very high chance that users will not be able to shell in an issue chmod 777 commands (can't expect users to perform such tasks either). This would render our application inoperable. I am going to do some more research, try and find out what the permissions on the /data/dalvic-cache in HTC G1 will be. If I find out any info, I'll post it in this blog. Cheers, MoggoDude --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to change the ringtone of the phone
Thanks for your reply,but i need to know say i download an mp3 ...i need to change the ringtone from that screen only,the rings extended application is different..it gives the selected uri as data to the Intent.. Thanks for ur time On Thu, Oct 16, 2008 at 12:15 PM, Steve Oldmeadow [EMAIL PROTECTED] wrote: On Oct 16, 1:21 pm, guru [EMAIL PROTECTED] wrote: hello, I need to know whether there is any way the ringtone of the phone can be changed programatically.If yes,please could any one help me on this. Check out RingsExtended in the apps-for-android project http://code.google.com/p/apps-for-android/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: ListView Issue in Notepad Application
Thanks Peli, For ur valuable response. I tried with that too but it was not working the problem is protected void onListItemClick(ListView l, View v, int position, long _id) this rowId value _id in onListItemClick remains on 0 for all records, hence the value which we set in Intent remains to be 0 Intent i = new Intent(this,EmployeeEdit.class); i.putExtra(EmployeeDAO.KEY_ROW_ID, _id); TO overcome that what i have done is // After moving to the required Position in Cursor, i m taking the rowId from Cursor.. Since rowId forms the first coulumn in the returned result set c.moveToPosition(position); Log.d(TAG, Row Id for the selected Record+c.getLong(0)); _id = c.getLong(0); Intent i = new Intent(this,EmployeeEdit.class); i.putExtra(EmployeeDAO.KEY_ROW_ID, _id); this worked for me... now i m able to update each record without any Problem... Thanks Again Thanks JavaAndroid The problem is On Oct 14, 10:32 pm, Peli [EMAIL PROTECTED] wrote: In EmployeeEdit.onCreate() you set mRowId = null; Peli On Oct 14, 7:15 pm, JavaAndroid [EMAIL PROTECTED] wrote: Hi All, I could trouble shoot my issue. I could insert a new record and delete an existing one..But while editing and updating i m getting rowId as 0. it simply displays 0 for all records... i feel we are setting the rowId to intent in this method.. protected void onListItemClick(ListView l, View v, int position, long _id) protected void onListItemClick(ListView l, View v, int position, long _id){ super.onListItemClick(l, v, position, _id); Cursor c = mCursor; Log.d(TAG, Position in the List +position); Log.d(TAG, Cursor-+c); c.moveToPosition(position); Log.d(TAG, Row Id for the selected Record+c.getLong(0)); Intent i = new Intent(this,EmployeeEdit.class); i.putExtra(EmployeeDAO.KEY_ROW_ID,_id); i.putExtra(EmployeeDAO.EMP_NAME, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_NAME))); i.putExtra(EmployeeDAO.EMP_AGE, c.getInt( c.getColumnIndexOrThrow(EmployeeDAO.EMP_AGE))); i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION))); i.putExtra(EmployeeDAO.EMP_DEPT, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_DEPT))); startActivityForResult(i, ACTIVITY_EDIT); } protected void onActivityResult(int requestCode, int resultCode, Intent intent){ super.onActivityResult(requestCode, resultCode, intent); Bundle extras = intent.getExtras(); switch(requestCode){ case ACTIVITY_CREATE: String employeeName = extras.getString(EmployeeDAO.EMP_NAME); int employeeAge = Integer.parseInt(extras.getString(EmployeeDAO.EMP_AGE)); String employeeQualification = extras.getString(EmployeeDAO.EMP_QUALIFICATION); String employeeDept = extras.getString(EmployeeDAO.EMP_DEPT); employee.insertEmployeeInformation(employeeName, employeeAge, employeeQualification, employeeDept); fillData(); break; case ACTIVITY_EDIT: Long rowId = extras.getLong(EmployeeDAO.KEY_ROW_ID); Log.d(TAG, RowId in Activity Edit+rowId); if(rowId != null){ Log.d(TAG, RowId While Updating the record +rowId); String updateEmployeeName = extras.getString(EmployeeDAO.EMP_NAME); int updateEmployeeAge = Integer.parseInt(extras.getString(EmployeeDAO.EMP_AGE)); String updateEmployeeQualification = extras.getString(EmployeeDAO.EMP_QUALIFICATION); String updateEmployeeDept = extras.getString(EmployeeDAO.EMP_DEPT); employee.updateEmployeeInformation(rowId, updateEmployeeName, updateEmployeeAge, updateEmployeeQualification, updateEmployeeDept); fillData(); break; } } we would be taking this value in onActivityResult() method and calling DAO layer from there. i have debugged this, but rowId always remains at 0 can anybody find where the Problem is?? All classes are present in first Post... Thanks in Advance Thanks JavaAndroid On Oct 13, 10:57 pm, JavaAndroid [EMAIL PROTECTED] wrote: Peli Thanks a million for your timely help. Logcat was really helpful in identifying the issue, and i got my application working.thanks again JavaAndroid On Oct 13, 6:15 pm, Peli [EMAIL PROTECTED] wrote: The answer is in the last post
[android-developers] Contacts.PresenceColumns documentation/API mismatch.
The dox @ http://code.google.com/android/reference/android/provider/Contacts.PresenceColumns.html indicate that android.provider.Contacts.PresenceColumns contains the following public static fields: PRIORITY, PRESENCE_STATUS, PRESENCE_CUSTOM_STATUS, OFFLINE, INVISIBLE, IDLE, DO_NOT_DISTURB, AWAY, AVAILABLE, IM_PROTOCOL, IM_HANDLE, IM_ACCOUNT but the android.jar from 1.0r1 contains only the following three public static fields: IM_PROTOCOL, IM_HANDLE, IM_ACCOUNT. Am I getting something totally wrong here or is there something missing in the documentation/sdk? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Help: why can't I use com.google.api.translate in my Android application
Hi, No I didn't, would you please show me how? I am new to android so I would appreciate it very much if you could help me out. Thanks On Oct 15, 1:52 pm, ecompositor [EMAIL PROTECTED] wrote: Did you give the application INTERNET permission in the manifest? On Oct 14, 8:58 am, redmapleleaf [EMAIL PROTECTED] wrote: Hi all, I wish to use the package com.google.api.translate to write an android translator application. However, I tried all day yesterday and nothing is working. Although I got no error warning, I am not getting anything back from the translator. Do you know if there is something fundamentally wrong with my code? Why wouldn't the package com.google.api.translate works in an android application environment? Thank you for your help, Redmapleleaf PS. Here is a copy of my code package com.google.android.translator; import com.google.api.translate.Language; import com.google.api.translate.Translate; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class AndroidTranslator extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); String translatedText=Hello World; translatedText = myTranslator(Hellow World); tv.setText(translatedText); setContentView(tv); } private String myTranslator(String phrase) { String translatedText=null; if(phrase==null) phrase=No Translation; try { translatedText = Translate.translate(phrase, Language.ENGLISH, Language.FRENCH); } catch (Exception ex) { ex.printStackTrace(); } return (translatedText); } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Device unique ID, other than getDeviceId()?
Mark, Sorry to just throw this in, but is there any reason you're using the 'phone ID and not the users 'phone number? (i.e. getLine1Number() in android.telephony.TelephonyManager). The reason I'm asking is that if you're looking at a licensing solution you probably want to consider if the users phone breaks and they get a replacement unit their phone number won't change but their phone ID will. Al. Mark Murphy wrote: jtaylor wrote: It's hard to answer your questions when you know just about everything. Wiseguy. ;-) Besides, Android is *huge*. I'll admit I've done more than scratch the surface, but there's loads of stuff I haven't even begun to explore yet (e.g., OpenGL, 2D graphics). And, as demonstrated by my problems with the unit test framework, there's lots I've seen and haven't gotten my head around just yet. I definitely don't know just about everything, but I do find myself reaching the edges of the map, with here there be dragons notations, more and more frequently... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Device unique ID, other than getDeviceId()?
jtaylor wrote: It's hard to answer your questions when you know just about everything. Wiseguy. ;-) Besides, Android is *huge*. I'll admit I've done more than scratch the surface, but there's loads of stuff I haven't even begun to explore yet (e.g., OpenGL, 2D graphics). And, as demonstrated by my problems with the unit test framework, there's lots I've seen and haven't gotten my head around just yet. I definitely don't know just about everything, but I do find myself reaching the edges of the map, with here there be dragons notations, more and more frequently... -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Help: why can't I use com.google.api.translate in my Android application
I got it now. Thank a million ecompositor. I added uses-permission android:name=android.permission.INTERNET / to my manifest and it is all working. On Oct 16, 8:43 am, redmapleleaf [EMAIL PROTECTED] wrote: Hi, No I didn't, would you please show me how? I am new to android so I would appreciate it very much if you could help me out. Thanks On Oct 15, 1:52 pm, ecompositor [EMAIL PROTECTED] wrote: Did you give the application INTERNET permission in the manifest? On Oct 14, 8:58 am, redmapleleaf [EMAIL PROTECTED] wrote: Hi all, I wish to use the package com.google.api.translate to write an android translator application. However, I tried all day yesterday and nothing is working. Although I got no error warning, I am not getting anything back from the translator. Do you know if there is something fundamentally wrong with my code? Why wouldn't the package com.google.api.translate works in an android application environment? Thank you for your help, Redmapleleaf PS. Here is a copy of my code package com.google.android.translator; import com.google.api.translate.Language; import com.google.api.translate.Translate; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class AndroidTranslator extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); String translatedText=Hello World; translatedText = myTranslator(Hellow World); tv.setText(translatedText); setContentView(tv); } private String myTranslator(String phrase) { String translatedText=null; if(phrase==null) phrase=No Translation; try { translatedText = Translate.translate(phrase, Language.ENGLISH, Language.FRENCH); } catch (Exception ex) { ex.printStackTrace(); } return (translatedText); } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Getting GPS Location in Android 1.0 SDK
Hi I went through some forum entries for gps.conf and found this: gps.conf error is not critical...this file is not needed for the mock gps feature on emulator. So you can ignore this error. http://groups.google.com/group/android-developers/browse_frm/thread/e6f79b90abf1e043/d978954036f60f7f?lnk=gstq=gps.conf#d978954036f60f7f Does it work out of the box (i.e. providing your own mock location provider) for anyone? If yes, then what are the co-ods that you get? I am running this on Win XP Sp2. Gautam On Oct 16, 2:07 am, Gautam [EMAIL PROTECTED] wrote: Thanks for the reply Shailesh. I tried the ACCESS_LOCATION_EXTRA_COMMANDS and your code of lmanager.getLastKnownLocation(lmanager.getProviders(true).get(0)) but I'm still getting a null. 1. What are the values that you get for this location? (I mean the coordinates) 2. Do you get the error for /etc/gps.conf when you start the emulator? (or you could check if you have /etc/gps.conf using the adb shell) Thanks for your help, Gautam On Oct 16, 1:49 am, shailesh prakash [EMAIL PROTECTED] wrote: Try !-- why I add this I didn't remember -- uses-permission android:name=android.permission.ACCESS_LOCATION_EXTRA_COMMANDS/uses-permission and see my MapActivity code its working on 1.0, private MyLocationOverlay mMyLocationOverlay; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); kMapView = (MapView) findViewById(R.id.main_map); kMapCtrl = kMapView.getController(); LocationManager lm = (LocationManager)getSystemService(LOCATION_SERVICE); Location loc = lm.getLastKnownLocation(lm.getProviders(true).get(0)); . } On Thu, Oct 16, 2008 at 10:21 AM, Gautam [EMAIL PROTECTED] wrote: Hi All, I'm trying to get the location using the LocationManager.getLastKnownLocation(gps) method and am getting null. Here is the problem in more detail: When I start the emulator, I get the following gps errors in LogCat: 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): Could not open GPS configuration file /etc/gps.conf 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): java.io.FileNotFoundException: /etc/gps.conf 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java: 227) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at java.io.FileInputStream.init(FileInputStream.java:76) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.internal.location.GpsLocationProvider.init(GpsLocationProvider.java: 179) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService._loadProvidersNoSync(LocationManagerService.java: 356) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProvidersNoSync(LocationManagerService.java: 340) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProviders(LocationManagerService.java: 333) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.init(LocationManagerService.java: 447) 10-16 04:15:29.006: ERROR/GpsLocationProvider(52): at com.android.server.ServerThread.run(SystemServer.java:230) 10-16 04:15:29.017: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service 10-16 04:15:29.036: DEBUG/LocationManagerService(52): Found dir /data/ location/gps 10-16 04:15:29.036: DEBUG/LocationManagerService(52): name = gps 10-16 04:15:29.047: DEBUG/GpsLocationProvider(52): enable 10-16 04:15:29.089: DEBUG/GpsLocationProvider(52): GpsEventThread starting I checked using adb shell and there is no file /etc/gps.conf but seems that the gps provider does get enabled. I wrote an activity, where the main logic is: System.out.println(Providers found= + lmanager.getAllProviders()); System.out.println(GPS Enabled= + lmanager.isProviderEnabled(LocationManager.GPS_PROVIDER)); System.out.println(Last Known Location= + lmanager.getLastKnownLocation(LocationManager.GPS_PROVIDER)); and have given the permissions for ACCESS_FINE_LOCATION and ACCESS_MOCK_LOCATION in my manifest.xml and here is the log when I run the code: 10-16 04:22:33.316: DEBUG/LocationManagerService(52): getAllProviders 10-16 04:22:33.327: INFO/System.out(230): Providers found=[gps] 10-16 04:22:33.336: INFO/System.out(230): GPS Enabled=true 10-16 04:22:33.336: INFO/System.out(230): Last Known Location=null So, I get gps provider and it is enabled, but the last known location I get is null. I tried investigating further in the adb shell and got this: # cd /data/location/gps # ls nmea
[android-developers] Remote app removal
Just a heads up that it might be something that developers need to consider. See http://www.computerworld.com/action/article.do?command=viewArticleBasictaxonomyName=SoftwarearticleId=9117279taxonomyId=18pageNumber=1 -- Al Sutton http://andappstore.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Question regarding default Contacts application.
Hi, I added a new contact in the default Contacts app and added all possible IM names to it. If I click any of the IM options later, then the following Intents are triggered: Intent { action=android.intent.action.SENDTO categories={com.android.im.category.MSN} data=im:name } Intent { action=android.intent.action.SENDTO categories={com.android.im.category.AIM} data=im:name} Intent { action=android.intent.action.SENDTO categories={com.android.im.category.ICQ} data=im:name } Intent { action=android.intent.action.SENDTO categories={com.android.im.category.GTALK} data=im:name } Intent { action=android.intent.action.SENDTO categories={com.android.im.category.YAHOO} data=im:name } However no Intents are generated when clicking on Jabber, Skype and QQ. Does anyone know whats up with that? Is the behaviour the same on real devices? (And if so, then what's the point of adding these contact types if you can't assign an application that handles these?) Tauno --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] To start a new intent to see the contacts of the phone from an application
hi, I need to take the user to the Contacts page after a certain operation? How do i accomplish it? Thanks for ur time Guru --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] CallLog
Hi every body, i 'd like to manage de native application CallLog. So I try to add some call in this application. I use a source like to add contact. setContentView(R.layout.main); ContentValues value= new ContentValues(); value.put(CallLog.Calls.CONTENT_ITEM_TYPE, text); Uri NCallLog =getContentResolver().insert(CallLog.Calls.CONTENT_URI, value); The first problem, nothing with CallLog in uses_permissions. (is it a sign which say : that's impossible??) Thanks to help 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Remote app removal
Yeah I saw that on http://tmobileg1fans.com/android-os/android-has-kill-switch-too! On Oct 16, 8:23 am, Al Sutton [EMAIL PROTECTED] wrote: Just a heads up that it might be something that developers need to consider. Seehttp://www.computerworld.com/action/article.do?command=viewArticleBas... -- Al Suttonhttp://andappstore.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: MapActivity - Couldn't get connection factory client
I have the same problem. Any ideas yet? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Remote app removal
We will see how it's used by the carriers, this being kind of a poor-man's device management. Definitely something useful for security and removal of malicious apps. Shane On Thu, Oct 16, 2008 at 9:30 AM, Live Crunch [EMAIL PROTECTED] wrote: Yeah I saw that on http://tmobileg1fans.com/android-os/android-has-kill-switch-too! On Oct 16, 8:23 am, Al Sutton [EMAIL PROTECTED] wrote: Just a heads up that it might be something that developers need to consider. Seehttp:// www.computerworld.com/action/article.do?command=viewArticleBas... -- Al Suttonhttp://andappstore.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Mock Location Providers in 1.0
Still doesn't work for me. Playing a GPX file from that tramper site, but my app doesn't seem to receive any location updates; LocationManager.getLastKnownLocation() always returns null when using the GPS provider. I have enabled app permissions for fine grained location access (i.e. using GPS), so that can't be the problem. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Mail api or access to mail authentication?
Is there an api that would allow for sending of a photo from your application to an individual on the contacts list? If not, can we use Javamail but have access to stored authentication so that we don't require a user to have to go through a setup to store credentials? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to display a local file in the browser?
Hi Megha, Thanks for your example. My question is how to get asset htm file's length, AssetManager.openFd(String fileName).getLength() will get an error to tell cannot open the htm file. Thanks. Anthony On 8月22日, 上午4时21分, Megha Joshi [EMAIL PROTECTED] wrote: On Wed, Aug 20, 2008 at 4:46 PM, Megha Joshi [EMAIL PROTECTED] wrote: For security reasons, WebView does not allow file: access any more. If you want the link to be loaded in your activity, you should provide a WebViewClient and implement shouldOverrideUrlLoading with { return false; } This option does not work anymore, sorry for the confusion! So the only way to load local file contents into WebView, is as Gil pointed out ...by loading the contents with loadData()/ Sample code: static final int MAXFILESIZE = 8096; String path = uri.getPath(); File f = new File(path); final long length = f.length(); if (!f.exists() || length MAXFILESIZE) { return; } // typecast to int is safe as long as MAXFILESIZE MAXINT byte[] array = new byte[(int)length]; try { InputStream is = new FileInputStream(f); is.read(array); is.close(); } catch (FileNotFoundException ex) { // Checked for file existance already, so this should not happen return; } catch (IOException ex) { // read or close failed Log.e(LOGTAG, Failed to access file: + path, ex); return; } mWebView.loadData(new String(array), mimeType, null); There is a 8KB limit on the file size. So if your data is more that 8KB, you should create a content provider for your files and then the use the ContentResolver.openContentURI()... On Wed, Aug 20, 2008 at 4:34 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I used WebView to display rich content emails (I'm writing a mail client). It worked well loading URI such as file://sdcard/filewhateveryouwant.xxx ... Now I upgraded to 0.9 and Android OS is displaying me a page with The requested file was not found. Maybe a PERMISSION issue? On 19 Ago, 20:36, Megha Joshi [EMAIL PROTECTED] wrote: Browser does not support viewing local files... On Tue, Aug 19, 2008 at 12:38 AM, Peli [EMAIL PROTECTED] wrote: Is it possible to open a local file in the browser? In the Android browser, I tried menu / go to: file:///sdcard/test.html I always receive the error message: Web page not available. The web page at file:///sdcard/test.html could not be loaded as: The requested file was not found. even though the files exist in /sdcard/test.html. Do I have to use a different URL, or put files into a different folder? Peli PS: From within an application, there seems to be a way to load local files: The prefix file:///android_asset/ will cause WebView to load content from the current application's assets folder. http://code.google.com/android/reference/android/webkit/WebView.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Getting GPS Location in Android 1.0 SDK
anyone found a solution? I am still struggling over this... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: AMR Codec List
Nobody? Google Team, can you help me? Thanks a lot Breno On Oct 7, 11:29 am, Breno T. Minzon [EMAIL PROTECTED] wrote: Hi all, After spent some time googling, i can't find any information about AMR audio codec list. i found just this google's doc http://code.google.com/android/reference/android/media/MediaRecorder but there is no information about what codecs it support, like 12.2, 10.2, 7.95, 7.4, 6.7, 5.9, 5.15 and 4.75. Does anybody has this information? Thanks a lot, Breno --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Getting GPS Location in Android 1.0 SDK
There has been a recent exchange over this: http://groups.google.com/group/android-developers/browse_thread/thread/ad6d7ddd57c51061/4e45035ac6bce5f1?lnk=raot Apologies if I missed a more specific problem in your question. Ludwig 2008/10/16 Matthias [EMAIL PROTECTED] anyone found a solution? I am still struggling over this... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Application Size Limits?
I have an application that requires for some part of its functionality on a larger set (about 15MB) of resources embedded in the APK. Already with the emulator I get the problem that I cannot upload the APK anymore as it has become to big. Is there a switch that controls this for the emulator somewhere? (I get the error 'Could not copy package file to temp file in DDMS). Secondly, is there a size limit that applies to the real device? (what is it?) I understand that users might not want to upload such a large application, but the alternative of making all the resources available on-line will not only slow things down, but also increase the overall size of the network footprint. An alternative solution of course would be to have these resources as an optional that could be downloaded onto the SD Card Ludwig --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Capabilities of Location API
We want to develop an application that uses the GSM network to get a position. There are several methods for getting a position based on cell tower info but to achieve a acceptable level of accuracy the info (ID, signal strength, ...) of *all* visible cell towers is needed, not just from the currently connected one. Does the Android SDK provide access to this information? The SDK seems to provide a way to get a position via the android.location.LocationManager. The JavaDoc of the NETWORK_PROVIDER constant states Results are retrieved by means of a network lookup. What technology is used by this method? Thanks. PS I posted a similar question earlier today but I never saw it appear. If it did get through, my apologies for this double post. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Trouble Opening Files via Intent
Hello. Ok, my English is not so good, but I'll try my best. You'll have to set the correct Data and Type. You have to define the Type by yourself, by getting the fileextension. Type means the main MIME-type like audio/* or image/*. For example: You clicked at the file MyFavouriteSong.mp3 you have to parse for the file-extension, here .mp3. In the list defined by yourself (maybe in a Textfile or as a resource- array), you look for that extension and use the main MIME-type as Type. (should now look like audio). If you have the Type, you can call the setDataAndType Method with parameters like shown in the sample source below. Android will show you a Dialog with all Application that can handle the given Type, which did not mean that the Application can Handle the File by itself. ;-) *** CODE *** // Create an Intent Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(android.content.Intent.ACTION_VIEW); // Category where the App should be searched String category = new String(android.intent.category.DEFAULT); // Setting up the data and the type for the intent intent.setDataAndType(Uri.fromFile(aDirectory), type+/ *); // will start the activtiy found by android or show a dialog to select one startActivity(intent); *** CODE END *** This is the way i do, but i don't know it's the right one. Regards, OC On 26 Sep., 11:25, Timbobsteve [EMAIL PROTECTED] wrote: Hi All, I posted this in the beginners section, but received no response. Sorry if it is bad etiquette to re-post here, it just seems that there is a lot more activity in this list. I am running through the FileBrowser tutorial over @ anddev.org and have it working fairly well, but the one thing I cannot get working is Opening files when they are clicked on. I always seem to get a ActivityNotFoundException: no activity found to handle { action: android.content.Intent.ACTION_VIEW data=file:/// sdcard/myfile.txt} My openFile() function looks like this: private void openFile() { try { Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.fromFile(myFile)); startActivity(myIntent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } } Can anyone see any problems with this? Is it just that there are no Apps registered to handle opening of .png images and .txt files? Or is my code wrong? Regards, Timbobsteve --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: creating an address book
Try out this link http://pcquest.ciol.com/content/Developer/2008/108040502.asp On Oct 7, 10:33 am, dilu [EMAIL PROTECTED] wrote: Hi I am new to this platform.I want to create a simple application like adding a name and phone number to contact address.How to start writing code for this? One more thing i am wondering that since coding language is java so what all modifiaction we need to do if we are writing the code in android? PLEASE HELP ME OUT. THANKS. DILU --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Playing XMF files with MediaPlayer
Has anyone gotten a XMF media file ( http://en.wikipedia.org/wiki/Extensible_Music_Format_(XMF) ) to play on android using the MediaPlayer? Supposedly XMF support was added to Android in release m5-rc14 using the sonivox libraries but I can't seem to get them to play. Thank you for any help or insight. code MediaPlayer mp = new MediaPlayer(); try { mp.setDataSource(/sdcard/Bloom.xmf); mp.prepare(); } catch (IllegalArgumentException e) { Log.e(getClass().getName(), IllegalStateException: + e.toString(), e); } catch (IOException e) { Log.e(getClass().getName(), IOException, e); } mp.start(); /code LogCat: Error: MidiFile: EAS_OpenFile failed [-17] Error: MediaPlayer: Unable to to create media player Error: hostname: IOException ... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Collecting opinions about Android for an article
Hi Androids, I'm an italian technical journalist and I'm writing an article about this platform for an italian paper-based magazine devoted to Linux. I would be happy to collect a few opinions about Google Android from the people who actually use it and from the people who write code for it. In particular, I would be happy to hear your comments about the following issues. 1) What do you love of Android? What do you hate of it? 2) How do you compare it with others similar Linux-based platforms, like Mobilinux, OpenMoko, LiMo, Qtopia, etc. What's better? What's worse? 3) How do you compare Android with non-Linux platforms, like Symbian, iPhone and Windows Mobile? 4) How do you feel at programming it? Is it friendly? Is it hard? Is it powerfull? Is it limited? Of course, I will be happy to hear your spontaneous comments, as well. I will NOT publish your name or any other personal information in my article. I will just cite your words. You can contact me privately, as well. Just use the send a private message function of the web forum. Thanks you all for your attention Alessandro Bottoni --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Capabilities of Location API
We're investigating the possibility of creating a smart phone application that uses the GSM network to determine the location of the phone. We will study different methods of calculating positions and to do that we need extensive data about the network such as IDs, signal strengths, etc of cell towers, not just of the currently connected one but of all visible towers. Does the Android API allow us to get these? The class 'android.location.LocationManager' seems to provide the functionality to do get a position via the network. The JavaDoc of the constant NETWORK_PROVIDER (http://code.google.com/android/reference/ android/location/LocationManager.html#NETWORK_PROVIDER) states Results are retrieved by means of a network lookup.. What does this mean? How is the positioning done technically? Thanks. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] What happens to the Intent internally after startActivity ??? (especially to Google-Developers)
Hello. I've created a Class that extends android.content.intent and called it ExtIntent. The reason was to give the Intent the possibility to hold a simple Object. (just for testing) In my calling Activity, I created an instance of ExtIntent and set it up like the normal way for an Intent. Althoug I added my Object in my overridden Constructor as the third parameter. === CODE - ExtIntent Class === ... public class ExtIntent extends Intent { private Object object = null; ... public ExtIntent(String action, Uri uri, Context packageContext, Class? cls) { super(action, uri, packageContext, cls); // TODO Auto-generated constructor stub } public ExtIntent(Context packageContext, Class? cls, Object o) { super(packageContext, cls); setObject(o); } public void setObject(Object object) { this.object = object; } public Object getObject() { return object; } ... } === END === === CODE - Calling Activity === ... ExtIntent ei = new ExtIntent(CallingActivity.this, RetrievingActivity.class, myObject); startActivity(ei); ... === END === Now follows the line where I got a ClassCastException. === CODE - Recieving Activity === ... ExtIntent ei = (ExtIntent)getIntent(); ... === END === I guess that internally my ExtIntent has been casted to an Intent, but I'm not sure. If my assumption is true, there seems to be no way to extend the Intent class. How to work really object-oriented if there is no way to extend any class??? Hopefully I look forward for an answer and/or a solution for that problem. Regards OC --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: WebView loadData limitations
Hey Rubicks, Check out this thread: http://groups.google.com/group/android-developers/browse_thread/thread/beae7de5e2500cb6/45977f54cf4aa592 WebView does not support file:/// URLs. Best, Dave On Oct 15, 5:47 pm, Rubicks [EMAIL PROTECTED] wrote: May be this is what you meant? myActivityLauncher is an Activity where I have a webview to load html file from sdcard. public void startMyActivityLauncher() { Intent i = new Intent(this, myActivityLauncher.class); i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); i.addFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION); i.setFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION); startActivity(i); } It doen't work either. What am I missing here? On Oct 16, 1:08 am, Rubicks [EMAIL PROTECTED] wrote: ok. I have a webview which is used just by my application. Now, how do I give permission? Is it done in Androidmanifest file? If that is the case, I have already done that uses-permission android:name=android.permission.INTERNET / On Oct 16, 12:50 am, Mike Reed [EMAIL PROTECTED] wrote: The Browser app does not have permission to load a page from the SD card. You can write an app with a WebView, and give yourself that permission, but the Browser is built explicitly w/o that right for security reasons. On Oct 15, 2008, at 3:41 PM, Rubicks wrote: I am trying to get a html file stored in my sdcard image on to webview . I am doing something like this myWebView.loadUrl(/sdcard/index.html); Then I get an error on the webview as The webpage at file:///sdcard/index.html could not be loaded as: The requested file was not found. But I am sure I have index.html on my sdcard image and it is available to the emulator. Because I see it on the File explorer. I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still the same problem exists. If I have to use loadDataWithBaseUrl(), then I think, I need to convert index.html to a string, which I don't want to. I could not figure out the problem. Any one any thoughts? Thanks. On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote: Thanks a ton for your comments, Mark. I've filed a bug:http://code.google.com/p/android/issues/detail?id=929 . Best, Dave On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote: schmielson wrote: As it turns out, the android:layout_height=wrap_content used along with android:layout_weight=1 of the WebView was preventing the WebView from properly receiving events! After changing the WebView's layout_height attribute to 0px instead of wrap_content, shouldOverrideUrlLoading is being called and things work like a charm. This bug was particularly insidious, however, since I never would have expected that these attributes would have altered the view's ability to process clicks/touches in this way. That is definitely strange. There might be a method to the madness there, but off the cuff, I don't see it. Do you think this is an SDK bug or a documentation bug? Ummm...yes. ;-) In other words, it depends a little on why it's not working. The fact that you not only see the WebView, but can interact with it, suggests to me it's an SDK bug. However, one man's SDK bug can be an Android team member's documentation bug, if this is somehow expected behavior. I do recommend filing a bug, though, just to get this in the queue to get looked at. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] call a soap web service from an android application
hi all does anybody know how to call a soap web service from an android application (ie. the android app is the web service client)? which approaches are the best? any alternatives? thx :-) regards, christian --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Getting GPS Location in Android 1.0 SDK
Thanks Ludwig for pointing me in the right direction :) I've got it working now and this is how it works for me: For getLastKnownLocation() to work, the best way is to telnet into the emulator geo fix command or DDMS controls using Eclipse. Without using one of these options above to set the location, the method will return null. A better way is to get the LocationAPISample and geo_sample_data from http://groups.google.com/group/android-developers/files The LocationSample registers a LocationListener so we keep getting location updates instead of just one location value plus the .gpx file can be used to set locations or simulate a path (cool!) @Matthias Let me know if my pointers help you or we can continue working to get this working for you as well. Thanks everyone, Gautam On Oct 16, 1:36 pm, Ludwig [EMAIL PROTECTED] wrote: There has been a recent exchange over this:http://groups.google.com/group/android-developers/browse_thread/threa... Apologies if I missed a more specific problem in your question. Ludwig 2008/10/16 Matthias [EMAIL PROTECTED] anyone found a solution? I am still struggling over this... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: MapView API Key??
Can someone confirm that's the key i need? http://code.google.com/android/toolbox/apis/mapkey.html On Oct 15, 7:14 pm, Anm [EMAIL PROTECTED] wrote: Is this not it: http://code.google.com/apis/maps/signup.html Same key used by any Google Maps mash-up. Anm --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: MediaPlayer streaming playback
we are able to play .mp4 (streaming). You need to make sure your mp4 is android compatible. if not, on linux, use MP4Box test.mp4 -hint to make the video compatible. On Oct 16, 2:33 am, Jason Proctor [EMAIL PROTECTED] wrote: can you stream video? has anyone managed to stream video? if so which formats did you use? tx Jason, What do you mean by stream is out.I am able to stream an Mp3 from an uri and get it in my local device. RTSP is not supported On Fri, Oct 10, 2008 at 3:47 AM, Jason Proctor mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: OK i found the answer in the 1.0 release notes. seems like streaming is out for the time being. i've been trying to play 3gp and mp4 movies off an HTTP server with MediaPlayer without success. i know the movie files are OK because i can play them locally off the sdcard. the errors i'm getting include the now famous unknown errors 0x and 0xfffc. from googling i know that RTSP isn't currently supported in the emulator due to UDP issues, but is streaming supported over HTTP? and if so, do i need to hack regular 3gp or mp4 files so that they can be streamed? thanks muchly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Webview Zoom Picker
Hi all, I'm using the webview and would like to add functionality to zoom in and out. The zoompicker (used in the browser) is most natural, but when I try to call it using invokeZoomPicker(), nothing happens. I've tried calling it in many different ways, but it doesn't show up. Anyone know how to use this widget? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapView API Key??
I believe that should be it. AFAIK, it's a different service than the standard maps key service. I wonder why Google hasn't activated it yet. I also wonder why they haven't opened the Market for submissions yet. On Oct 16, 2:45 pm, zl25drexel [EMAIL PROTECTED] wrote: Can someone confirm that's the key i need?http://code.google.com/android/toolbox/apis/mapkey.html On Oct 15, 7:14 pm, Anm [EMAIL PROTECTED] wrote: Is this not it: http://code.google.com/apis/maps/signup.html Same key used by any Google Maps mash-up. Anm --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: What happens to the Intent internally after startActivity ??? (especially to Google-Developers)
You might have more luck simply storing your object in the extras structure provided in every Intent. Remember that Intent data must be parcelable so that it can be transported between processes. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] HTC G1 for ADC developers (europeans, asians and africans): results
Hello all, I published, Sept-24, a question form to know if every people was agree for HTC/Google/T-Mobile proposing a special offer for ADC participants and for people outside of US. Results are now available http://spreadsheets.google.com/pub?key=pBxgcXvOI-GV1iap7C7vtEA Arnaud http://www.phoneandroid.fr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Limited XML Support
Hi, I'm trying to get an XML Schema app using Xerces to work in Android. It seems that although Android is supposed to be almost java 5 compatible, this is not valid for XML. By looking att the org.w3c.dom classes I note that only level 2 interfaces are supported which I guess means that it will not be possible to run an external Xerces without recompiling it and adjusting name-spaces like myapp.org.w3c.dom. I urge Google to adopt Xerces as the default parser. It is close to industry standard! Anders --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: What happens to the Intent internally after startActivity ??? (especially to Google-Developers)
You can't do that. The Intent object gets propagated across multiple processes, so your subclass implementation will be lost (your code is even just not at all available to some of the processes the Intent will be used). As Andrew says, you should put addition data in the extras field. On Oct 16, 6:03 am, OC [EMAIL PROTECTED] wrote: Hello. I've created a Class that extends android.content.intent and called it ExtIntent. The reason was to give the Intent the possibility to hold a simple Object. (just for testing) In my calling Activity, I created an instance of ExtIntent and set it up like the normal way for an Intent. Althoug I added my Object in my overridden Constructor as the third parameter. === CODE - ExtIntent Class === ... public class ExtIntent extends Intent { private Object object = null; ... public ExtIntent(String action, Uri uri, Context packageContext, Class? cls) { super(action, uri, packageContext, cls); // TODO Auto-generated constructor stub } public ExtIntent(Context packageContext, Class? cls, Object o) { super(packageContext, cls); setObject(o); } public void setObject(Object object) { this.object = object; } public Object getObject() { return object; } ... } === END === === CODE - Calling Activity === ... ExtIntent ei = new ExtIntent(CallingActivity.this, RetrievingActivity.class, myObject); startActivity(ei); ... === END === Now follows the line where I got a ClassCastException. === CODE - Recieving Activity === ... ExtIntent ei = (ExtIntent)getIntent(); ... === END === I guess that internally my ExtIntent has been casted to an Intent, but I'm not sure. If my assumption is true, there seems to be no way to extend the Intent class. How to work really object-oriented if there is no way to extend any class??? Hopefully I look forward for an answer and/or a solution for that problem. Regards OC --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Application Size Limits?
I would strongly recommend against creating applications that are so large. Keep in mind that the available space for applications (and other secure data like mails, contacts, etc) on the G1 is 128MB, so just installing that app is a huge commitment to the user in that it greatly decreases the space they have for other applications. If nothing else, a large application like that will instantly cut the number of users by a significant amount. On Oct 16, 10:45 am, Ludwig [EMAIL PROTECTED] wrote: I have an application that requires for some part of its functionality on a larger set (about 15MB) of resources embedded in the APK. Already with the emulator I get the problem that I cannot upload the APK anymore as it has become to big. Is there a switch that controls this for the emulator somewhere? (I get the error 'Could not copy package file to temp file in DDMS). Secondly, is there a size limit that applies to the real device? (what is it?) I understand that users might not want to upload such a large application, but the alternative of making all the resources available on-line will not only slow things down, but also increase the overall size of the network footprint. An alternative solution of course would be to have these resources as an optional that could be downloaded onto the SD Card Ludwig --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
The activity-alias tag can only be used to link to another activity implement in the same manifest as the tag appears, and when this alias is launched by the system it just directly launches the target activity so there is no actual implementation behind it. The AliasActivity class is just a standard Activity implementation that is built into the system, which you can use as the implementation for one of your activities. When launched, the system actually launches the AliasActivity in your process, which reads from your manifest the intent description to launch, starts that other activity, and then finishes itself. So if you can use activity-alias, you should to do so, since it is much more efficient. The main purpose of AliasActivity is to be able to generate a .apk containing no code that just provides a top-level application icon for some other activity in the system, typically launching the browser to display a particular web page. On Oct 16, 10:26 am, jtaylor [EMAIL PROTECTED] wrote: Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: AliasActivity: Two Questions
The activity-alias tag appears to enable different manifest attributes for the same activity. AliasActivity is something I'd have to see in an example to really understand it. At least it sounds uncommon. - Juan T. On Oct 16, 4:44 pm, hackbod [EMAIL PROTECTED] wrote: The activity-alias tag can only be used to link to another activity implement in the same manifest as the tag appears, and when this alias is launched by the system it just directly launches the target activity so there is no actual implementation behind it. The AliasActivity class is just a standard Activity implementation that is built into the system, which you can use as the implementation for one of your activities. When launched, the system actually launches the AliasActivity in your process, which reads from your manifest the intent description to launch, starts that other activity, and then finishes itself. So if you can use activity-alias, you should to do so, since it is much more efficient. The main purpose of AliasActivity is to be able to generate a .apk containing no code that just provides a top-level application icon for some other activity in the system, typically launching the browser to display a particular web page. On Oct 16, 10:26 am, jtaylor [EMAIL PROTECTED] wrote: Well, what exactly is the difference between the two to understand them better? - Juan T. On Oct 15, 10:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Photostream uses an activity-alias, not an AliasActivity (they are different :) On Wed, Oct 15, 2008 at 7:24 PM, jtaylor [EMAIL PROTECTED] wrote: I noticed the Photostream app has alias activities. (This comment is in androidmanifest.xml) !-- Alias activity used to set the wallpaper on Home. The alias is used simply to have a different label. -- http://code.google.com/p/apps-for-android/source/browse/trunk/#trunk/... - Juan On Oct 12, 11:31 am, Anm [EMAIL PROTECTED] wrote: The AliasActivity looks interesting, as a way to redirect a user to another activity/intent under a different name. I can see this being used to put a launcher icon to a document/url. But I don't see any examples of it, or documentation of the XML to configure it. (From the docs: To use this activity, you should include in the manifest for the associated component an entry named android.app.alias. It is a reference to an XML resource describing an intent that launches the real application. ) Does anyone have any pointers? Secondly, I think I want to make a something that acts similar to the AliasActivity as my app's entry point, but redirects to the most recently used activity. Calling startActivity() followed by finish() still invokes the activity after returning from the child activity (its still on the activity stack, despite the finish() call), leading to a loop that re-enters the child. What should I be doing instead? (I.e., What does AliasActivity do?) Anxiously awaiting the sources so I can answer these types of questions on my own. Anm -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Device unique ID, other than getDeviceId()?
Al Sutton wrote: Sorry to just throw this in, but is there any reason you're using the 'phone ID and not the users 'phone number? (i.e. getLine1Number() in android.telephony.TelephonyManager). Because the customer wants a device ID. The reason I'm asking is that if you're looking at a licensing solution you probably want to consider if the users phone breaks and they get a replacement unit their phone number won't change but their phone ID will. Actually, that's what they want. Thanks, though! -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Listview click event with button
Hello, I have a custom listview contol that performs on click event handling when a user clicks a list item. When I add a button to each listview item my listview click event stops working and only my button's click event fires. If I remove the button the listview's click event fires correctly. Is there a way to have both click events fire correctly? Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] How to detect whenever any Textbox gains focus?
I want to be able to set up a listener that can determine when any textbox in any application gains focus. Is this possible? Do I create a service with some kind of onFocusChangeListener? Thanks in advance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Collecting opinions about Android for an article
The Android platform is a joy to develop. I've been a software developer for over 20 years now and I'd have to say that this is one of the few platform I've ever used where I didn't have to developer layers and layers of my own code to finally get something useful. The platform has many useful things that you an include in your app in minutes. I haven't developed for other mobile platforms yet so I can't compare it to other platforms. On Thu, Oct 16, 2008 at 9:02 AM, alexbottoni [EMAIL PROTECTED] wrote: Hi Androids, I'm an italian technical journalist and I'm writing an article about this platform for an italian paper-based magazine devoted to Linux. I would be happy to collect a few opinions about Google Android from the people who actually use it and from the people who write code for it. In particular, I would be happy to hear your comments about the following issues. 1) What do you love of Android? What do you hate of it? 2) How do you compare it with others similar Linux-based platforms, like Mobilinux, OpenMoko, LiMo, Qtopia, etc. What's better? What's worse? 3) How do you compare Android with non-Linux platforms, like Symbian, iPhone and Windows Mobile? 4) How do you feel at programming it? Is it friendly? Is it hard? Is it powerfull? Is it limited? Of course, I will be happy to hear your spontaneous comments, as well. I will NOT publish your name or any other personal information in my article. I will just cite your words. You can contact me privately, as well. Just use the send a private message function of the web forum. Thanks you all for your attention Alessandro Bottoni --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: call a soap web service from an android application
Yeah :D first: Some say that you have to use k2SOAP. second: Some say that you need to connect and handle the response. If you prefer the second, you can use the code under http://forum.android.pro.br/forums/1/topics/115 and change the tv.setText(res); line to XML handling. Cheers, Cezar On Oct 16, 9:37 am, christian110011 [EMAIL PROTECTED] wrote: hi all does anybody know how to call a soap web service from an android application (ie. the android app is the web service client)? which approaches are the best? any alternatives? thx :-) regards, christian --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to detect whenever any Textbox gains focus?
CM wrote: I want to be able to set up a listener that can determine when any textbox in any application gains focus. Is this possible? Not in the current SDK. That would be a massive security hole. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] I can't start project in Eclipse 3.2 with Android 1.0 SDK (Ubuntu 8.04)
my system is Ubuntu 8.04 32bit version at the beginnig I had Eclipse installed, also Android SDK 0.5 and everything worked well, since i updated SDK to lastest 1.0 I always get error when i try to open any project or create new one: 'An internal error occurred during: Android SDK Content Loader. Then eclipse seems to be working, but I am not able to create new project, it always complains about some problems like missing project name (yes, its there), or conflict in path (which doesn't exist for sure) or missing package name (which is there)... simply i am not able to really create project and work with it first i thought its some upgrade problem, so i deleted all eclipse folders from home, removed all projects... then i started eclipse again, it created workspace, i installed android plugins (+7 more which they requested). then eclipse restarted. after restart i set path to android sdk - and error message was back i don't know what else to try, i found thread about it here: http://www.anddev.org/sdk_on_ubuntu_hardy_heron_804-t3050.html but also without any answer. btw when i looked for error message its only link google returned, so maybe its not too common problem... any idea what can i do to be able to do some development? i guess it doesn't make sense now to return to 0.5 SDK..there were so many changes --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: I can't start project in Eclipse 3.2 with Android 1.0 SDK (Ubuntu 8.04)
and some additional information eclipse error log says: An internal error occurred during: Android SDK Content Loader. stack trace: java.lang.NoSuchMethodError: org.eclipse.core.runtime.Status.init(ILjava/lang/String;Ljava/lang/ String;Ljava/lang/Throwable;)V at com.android.ide.eclipse.adt.AdtPlugin.log(Unknown Source) at com.android.ide.eclipse.adt.AdtPlugin$12.run(Unknown Source) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) session data: eclipse.buildId=M20070212-1330 java.version=1.6.0_07 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86 On 17. Okt, 00:21 h., Selmi [EMAIL PROTECTED] wrote: my system is Ubuntu 8.04 32bit version at the beginnig I had Eclipse installed, also Android SDK 0.5 and everything worked well, since i updated SDK to lastest 1.0 I always get error when i try to open any project or create new one: 'An internal error occurred during: Android SDK Content Loader. Then eclipse seems to be working, but I am not able to create new project, it always complains about some problems like missing project name (yes, its there), or conflict in path (which doesn't exist for sure) or missing package name (which is there)... simply i am not able to really create project and work with it first i thought its some upgrade problem, so i deleted all eclipse folders from home, removed all projects... then i started eclipse again, it created workspace, i installed android plugins (+7 more which they requested). then eclipse restarted. after restart i set path to android sdk - and error message was back i don't know what else to try, i found thread about it here:http://www.anddev.org/sdk_on_ubuntu_hardy_heron_804-t3050.htmlbut also without any answer. btw when i looked for error message its only link google returned, so maybe its not too common problem... any idea what can i do to be able to do some development? i guess it doesn't make sense now to return to 0.5 SDK..there were so many changes --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: dalvikvm: Ignoring not-yet-ready ... using slow path
On Oct 14, 3:00 pm, meiko [EMAIL PROTECTED] wrote: Anyone knows what can be cause of this problem ? DEBUG/dalvikvm(199): Ignoring not-yet-ready Lscala/actors/ SuspendActorException;, using slow path Why is this class not-yet-ready ? What means slow-path ? The DEBUG tag indicates that it's just a diagnostic message, not a problem. You can ignore this. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: HttpURLConnection getResponseCode
I have the same problem. No idea what's happening. On Oct 16, 4:04 pm, Gil [EMAIL PROTECTED] wrote: I have a class that implements an HttpURLConnection. The class works fine most of the time. Once in a while when I perform a GET operation getResponseCode returns -1. Does anyone know under what circumstances getResponseCode returns -1? The documentation states: the response code, -1 if no valid response code. Ethereal shows that the GET request has been sent but that no bytes have been received. Also, the getResponseCode does not time out. When it fails it does so without waiting at all (typically 100ms). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How do i set onClick image
I figured this out myself. for those who are interested, see http://bend-ing.blogspot.com/2008/10/android-how-to-implement-custom-button.html On Oct 15, 10:03 am, zl25drexel [EMAIL PROTECTED] wrote: anyone? On Oct 14, 5:14 pm,zl25drexel[EMAIL PROTECTED] wrote: Hi, Does anyone know how to set the onClick image on a button with custom image background? For example, with the standard android button, the button will turn orange on click and then return to its normal color. How do I do the same thing but with custom images? thanks for your help --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: WebView loadData limitations
Thanks Dave. I am trying to use the example you mentioned (ElementProvider). This is how I use it. ContentValues values = new ContentValues(); values.put(KEY_DATA, /demo.html); ElementProvider ep = new ElementProvider(); Uri uri = ep.CONTENT_URI; myuri = ep.insert(uri, values); // Here I face the problem ParcelFileDescriptor pfd ; try{ pfd = ep.openFile(uri, rw); } catch(FileNotFoundException e){ Log.v(test, File not found); } when I debug, I see that in the insert method,SQLiteDatabase mDb = mDbH.getWritableDatabase(); is failing. (mDbH is null) What could be the problem? If someone has used it, please let me know. Thanks On Oct 16, 7:52 pm, schmielson [EMAIL PROTECTED] wrote: Hey Rubicks, Check out this thread:http://groups.google.com/group/android-developers/browse_thread/threa... WebView does not support file:/// URLs. Best, Dave On Oct 15, 5:47 pm, Rubicks [EMAIL PROTECTED] wrote: May be this is what you meant? myActivityLauncher is an Activity where I have a webview to load html file from sdcard. public void startMyActivityLauncher() { Intent i = new Intent(this, myActivityLauncher.class); i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); i.addFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION); i.setFlags(Intent. FLAG_GRANT_WRITE_URI_PERMISSION); startActivity(i); } It doen't work either. What am I missing here? On Oct 16, 1:08 am, Rubicks [EMAIL PROTECTED] wrote: ok. I have a webview which is used just by my application. Now, how do I give permission? Is it done in Androidmanifest file? If that is the case, I have already done that uses-permission android:name=android.permission.INTERNET / On Oct 16, 12:50 am, Mike Reed [EMAIL PROTECTED] wrote: The Browser app does not have permission to load a page from the SD card. You can write an app with a WebView, and give yourself that permission, but the Browser is built explicitly w/o that right for security reasons. On Oct 15, 2008, at 3:41 PM, Rubicks wrote: I am trying to get a html file stored in my sdcard image on to webview . I am doing something like this myWebView.loadUrl(/sdcard/index.html); Then I get an error on the webview as The webpage at file:///sdcard/index.html could not be loaded as: The requested file was not found. But I am sure I have index.html on my sdcard image and it is available to the emulator. Because I see it on the File explorer. I tried myWebView.loadUrl(file:///sdcard/index.html); as well. Still the same problem exists. If I have to use loadDataWithBaseUrl(), then I think, I need to convert index.html to a string, which I don't want to. I could not figure out the problem. Any one any thoughts? Thanks. On Oct 3, 8:37 pm, schmielson [EMAIL PROTECTED] wrote: Thanks a ton for your comments, Mark. I've filed a bug:http://code.google.com/p/android/issues/detail?id=929 . Best, Dave On Oct 1, 5:29 am, Mark Murphy [EMAIL PROTECTED] wrote: schmielson wrote: As it turns out, the android:layout_height=wrap_content used along with android:layout_weight=1 of the WebView was preventing the WebView from properly receiving events! After changing the WebView's layout_height attribute to 0px instead of wrap_content, shouldOverrideUrlLoading is being called and things work like a charm. This bug was particularly insidious, however, since I never would have expected that these attributes would have altered the view's ability to process clicks/touches in this way. That is definitely strange. There might be a method to the madness there, but off the cuff, I don't see it. Do you think this is an SDK bug or a documentation bug? Ummm...yes. ;-) In other words, it depends a little on why it's not working. The fact that you not only see the WebView, but can interact with it, suggests to me it's an SDK bug. However, one man's SDK bug can be an Android team member's documentation bug, if this is somehow expected behavior. I do recommend filing a bug, though, just to get this in the queue to get looked at. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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
[android-developers] image manipulation
Does Android come with any package/classes for image manipulations (e.g. contrast, brightness adjustments)? Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Location based search
Is location based search available in 1.0? We had classes google.googlenav.Placemark and google.googlenav.Search which provided this functionality in the M3 SDK. The built-in Maps app still offers this feature. Has this been cut off, or have I just not been able to locate it in the current SDK? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: image manipulation
At the low-level, take a look at android.graphics.ColorMatrix On Oct 16, 2008, at 8:11 PM, j wrote: Does Android come with any package/classes for image manipulations (e.g. contrast, brightness adjustments)? Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: image manipulation
On Oct 16, 10:11 pm, j [EMAIL PROTECTED] wrote: Does Android come with any package/classes for image manipulations (e.g. contrast, brightness adjustments)? Thanks! Here's a quick link to the class that Mike wrote about... http://code.google.com/android/reference/android/graphics/ColorMatrix.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] possible to lock device?
Im working on a security app that allows a user to track their phone on a web site if they lose the phone or it is stolen. I already have the part working where i could do this if a user selected lock on the site but once the device gets this data, how can i have the device go into the locked state like if the end call button was pressed and ask for the patern if the user set one up? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: call a soap web service from an android application
Hi christian110011, for kSOAP, you have to do something like this : // you have to download ksoap for j2me and extend it's org.ksoap2.transport.Transport and implement ServiceConnection, coz it is built // for j2me not Android, you can eaisly find these two on other android group Thread t = new Thread() { private static final String SOAP_ACTION = addition; private static final String METHOD_NAME = addition; private static final String NAMESPACE = http://ws.apache.org/axis2;; // This is for service deployed on Tomcat, for JBOSS Android is not working on my emulator private static final String URL = http://yourIP:8080/Axis2ServiceServer/services/CalcService;; Integer a = null; Integer b = null; @Override public void run() { String stA = ((EditText) findViewById(R.id.EditText01)).getText().toString(); String stB = ((EditText) findViewById(R.id.EditText02)).getText().toString(); SoapSerializationEnvelope envelope = null; try { a = Integer.valueOf(stA); b = Integer.valueOf(stB); SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME); request.addProperty(a, a); request.addProperty(b, b); envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); androidHttpTransport.call(SOAP_ACTION, envelope); Object result = envelope.getResponse(); KSoapClient.res = result.toString(); } catch (NumberFormatException nfe) { KSoapClient.res = Only Integer numbers ; Log.e(Input Error: , nfe.getMessage()); } catch (SoapFault sf) { Log.e(Service Response Error, + sf.faultcode+:, sf.faultstring); } catch (IOException ioe) { Log.e(Service Response Error: , ioe.getMessage()); } catch (XmlPullParserException xppe) { Log.e(Service Response Error: , xppe.getMessage()); } } }; t.start(); And if you like to create your own SOAP Engine(Custom Parser will do), you may do, public String serviceResponse(String a , String b) { String s=null; Integer ai = null; Integer bi = null; Document doc; try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder parser = factory.newDocumentBuilder(); ai = Integer.valueOf(a); bi = Integer.valueOf(b); doc = parser.parse(new URL(http://192.168.1.101:8089/axis/Calc.jws?method=adda=+a+b=+b).openConnection().getInputStream()); if(null!=doc.getElementsByTagName(soapenv:Envelope))
[android-developers] Re: possible to lock device?
hmm i wish there was a simple lockDevice() method :P this is the last thing i need before i want to release my app. it goes out for a closed beta on the 22nd. On Oct 17, 12:33 am, shailesh prakash [EMAIL PROTECTED] wrote: Hey Mast3rpyr0, I did try it earlier but drop in between. I had plans to do it like this, Send SMS, broadcast receiver will listen it and open msg read content match with data in SQLite database and change phone state accordingly. I implemented till the last and most tedious task, changing phone state. Hope it will help you in some extent On Fri, Oct 17, 2008 at 9:56 AM, Mast3rpyr0 [EMAIL PROTECTED] wrote: Im working on a security app that allows a user to track their phone on a web site if they lose the phone or it is stolen. I already have the part working where i could do this if a user selected lock on the site but once the device gets this data, how can i have the device go into the locked state like if the end call button was pressed and ask for the patern if the user set one up? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: possible to lock device?
Best of luck for your beta On Fri, Oct 17, 2008 at 10:21 AM, Mast3rpyr0 [EMAIL PROTECTED] wrote: hmm i wish there was a simple lockDevice() method :P this is the last thing i need before i want to release my app. it goes out for a closed beta on the 22nd. On Oct 17, 12:33 am, shailesh prakash [EMAIL PROTECTED] wrote: Hey Mast3rpyr0, I did try it earlier but drop in between. I had plans to do it like this, Send SMS, broadcast receiver will listen it and open msg read content match with data in SQLite database and change phone state accordingly. I implemented till the last and most tedious task, changing phone state. Hope it will help you in some extent On Fri, Oct 17, 2008 at 9:56 AM, Mast3rpyr0 [EMAIL PROTECTED] wrote: Im working on a security app that allows a user to track their phone on a web site if they lose the phone or it is stolen. I already have the part working where i could do this if a user selected lock on the site but once the device gets this data, how can i have the device go into the locked state like if the end call button was pressed and ask for the patern if the user set one up? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: file that is wriiten on an SDCard not visible
Please could anyone help me On Thu, Oct 16, 2008 at 11:32 AM, guru [EMAIL PROTECTED] wrote: I needed to download a file and store it in my sdcard.I first save it by writing in the output stream(by using openFileOutput) in the application package.From here I copy it to my SDCard and its written on my SDCard.But when i see my SDCard in the file in the DDMS mode i am able to see that file,but in the SDCard i was not able to see that file.Please could anyone tell how can this be acheived. heres the code snippet i use. String fileName = myFileName; File bufferedFile = new File(/sdcard/+fileName); copyFiletoSDCard(downloadingMediaFile,bufferedFile.getAbsolutePath()); private void copyFiletoSDCard(File fromFile, String fileName) { FileInputStream from = null; FileOutputStream to = null; try { from = context.openFileInput(fromFile.getName()); to = new FileOutputStream(fileName); byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = from.read(buffer)) != -1) to.write(buffer, 0, bytesRead); // write } catch(IOException ioException){ Log.i(getClass().getName(),ioException Msg); Log.i(getClass().getName(),ioException.getMessage()); ioException.printStackTrace(); }finally { if (from != null) try { from.close(); } catch (IOException e) { ; } if (to != null) try { to.close(); } catch (IOException e) { ; } } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---