Re: [android-developers] Why cant I install an apk from asset folder
On 27 January 2011 08:06, Titus titus.mor...@gmail.com wrote: Hello, Is there a reason why Y.apk can't be put in asset folder ? or is there a neater way to do this ? What about copying your 2nd apk to SD card and instaling from there? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Built-in resource unexpectedly not found
As a test, building against SDK 9, I compiled an APK referencing @android:drawable/presence_video_away which was introduced in SDK 9. Then I ran the APK on a SDK 4 emulator and got an exception indicating resource not found (as above). However, it referenced a seemingly random resource (one defined in the APK). This problem was raised here 8 months ago: http://groups.google.com/group/android-developers/browse_thread/thread/2f10922ac233c6df/5f67d345da4f0ccc So it may well be that primary_text_light is not the problem, but something else... On Jan 27, 11:01 am, Mark Carter mjc1...@googlemail.com wrote: In this particular example, it's not a simple case of copying the primary_text_light.xml to the app's resource structure because that file references private built-in resources. How best to handle that!? On 27 January 2011 10:55, Bob Kerns r...@acm.org wrote: Just to be very clear about it -- given the current reality, I suggest viewing all firmware-defined resources as, well, infirm. I'm just saying this is something which OUGHT to have been done better, and could still be, by the platform team -- including the tricky task of getting the OEMs on board to not screw it up. This is a long way from happening, and I would predict it NEVER happens. If *I* were in charge, that would be a different matter... I'm not claiming it's easy, either. On Jan 26, 11:53 am, Mark Murphy mmur...@commonsware.com wrote: I would recommend that developers depend as little as possible on explicitly using firmware-defined resources. If you need them, copy their values into your project. Or, at least have a value that you use as a fallback in case a firmware-defined resource is not available. There have been too many cases of OEMs changing (or, in your case, apparently removing) these resources in ways that cause problems for apps. While I appreciate the argument that using system-defined resources makes it easier to blend into the platform, IMHO... stability internal consistency platform fidelity and the system resources are unreliable and, if changed, may be inconsistent with non-system-resources in the rest of your app. On Wed, Jan 26, 2011 at 10:26 AM, Mark Carter mjc1...@googlemail.com wrote: Analytics for one of my apps tells me that on rare occasions this exception is thrown from the Activity.setContentView() method: java.io.FileNotFoundException: res/color/primary_text_light.xml It happened on a Motorola Milestone which appears to be using official firmware: SHOLS_U2_01.03.1.1257641482 (which is SDK 2.0, I think) The resource in question refers to a built-in Android resource which has been there since API level 1. Clearly this is not a programming error but something else. Any ideas how this can happen? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating Animation List Using Bitmaps Programatically
Thanks a lot Kostya...It worked for me :) On Jan 20, 4:12 pm, Kostya Vasilyev kmans...@gmail.com wrote: Based on the reference: http://developer.android.com/reference/android/graphics/drawable/Anim... you just create a new AnimationDrawable, then call addFrame() for each frame image, and finally all start() to play it. -- Kostya 20.01.2011 14:01, Amit пишет: Hi All, I am trying to achieve adding the animated gifs into my application. 1- I am able to download the animated gif from server. 2- I am able to decode the animated gif (using my custom decoder) and have a separate Bitmap corresponding to its frames. Now I want to animate it using the frame by frame animation. As i read, to perform the frame by frame animation the first thing that is required is animation-list. I want to know how i can create the required animation-list programatically containing each Bitmap as a separate frame. Kindly Help. Thanks Best Regards Amit -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Video not getting played from URL, same video is getting played locally
Hi All, I am trying to play video on my application. The video files are hosted in my server and I am using the VideoView to play them. The problem I am facing is that no video is shown in the screen. The logcat only shows the amount of buffering but it does not shows any type of codec that has been used to pay the video Surprisingly if i transfer the same file to my sdcard and use the default player, it plays fine saying that MPEG4 codes is been used. What may be the problem. Kindly Help Here is my code for the reference- setContentView(R.layout.videoplayer); Bundle bundle = getIntent().getExtras(); VideoView videoView = (VideoView) findViewById(R.id.VideoView); videoView.setOnPreparedListener(this); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); Uri video = Uri.parse(http://newshunt.biz/Test/video/Test/ outputfile.mp4); videoView.setMediaController(mediaController); videoView.setVideoURI(video); videoView.start(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why cant I install an apk from asset folder
On Thursday, January 27, 2011 1:06:11 PM UTC+6, Titus wrote: Hello, I have an X.apk which contains another Y.apk within is asset folder. What is the size of your Y.apk? Is it larger than 1MB? If so, it will be compressed by aapt. And, AssetManager cannot decompress files larger than 1MB. Regards Sarwar Erfan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb SDK
From the release notes: - You *cannot* publish an application that's built against the preview SDK—you can only run an application built against the Preview SDK on the Android emulator. I take this to mean that, if I install the preview SDK, I can't publish ANY apps from that installation - even if the android:targetSdkVersion = 9. Which means that, without a spare high-end machine to throw at it, the preview SDK is useless to me (and I'm sure, many others). Or am I reading this wrong? Is the publishability actually controlled by the android:targetSdkVersion value? Xavier? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] reading files from sdcard and displaying only the image files in the listView
hi , when my app starts, i need to check the sdcard and display all the image files present in the sdcard in a listview and when the user selects one of them , i need to display it in an image view. though the second part is relatively easy once u get the path of that particular image. But i need to know how to display the image files alone present in the sdcard in a listview. pls help me with it. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I control USB port on hardware level?
IMHO your question is more appropriate for android-platform. And you need a android platform which supports more then mass storage. I think you could use android-x86. Good luck ! Frank On 25 Jan., 03:53, Jisung eternal9...@gmail.com wrote: Hi. I want to control USB serial port on hardware level. I'm working on a project about Android USB. Datas coming through USB port on real-time, and it needs to be processed to xml files. I found some old java API project JSR80 or jUSB, but it's working on Linux and i don't know it works on Android. Is there any source codes or APIs that i can use? Or, any way to use JSR80 project on Android? Thanks for reading wait for your answer. Please, 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Do you have any idea how to be able to recognize my voice through mic of laptop to the emulator?
Hi, All. I have sth problems. Do you have any idea how to be able to recognize my voice through mic of laptop to the emulator because of SIP demo test? It also need to API 9 version so I have to test in emulator. Anyone who has a good idea? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] High sensor usage in stand by
I'm struggling to find the root cause of a problem that occurs apparently randomly in my application. I have a listener registered for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast I unregister the listener, and on Screen ON a register it again. From time to time, after phone reboot, or maybe unplug, while the most of the time the phone is in stand by I get a high sensor usage in phone information (along with high battery use associated with my app...) In logcat I find lines like this just before Screen OFF : 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener: alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor These are some kind of errors that shows that the Listener could not be unregistered ? If yes, why and what can I do ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to write audio into microphone?
Sorry, Not 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: app doesn't install anymore!
I am starting the app from the view where all the other applications are placed, whatever is called. And even if it displays the icon, it says that the application is not installed. Then if I go in : Settings - Application settings - manage applications my app appears there as installed. Honestly I think we are chasing the problem in the wrong path: even installing from SD card it is perfectly fine, indeed that was the only option I had when I purchased the mobile phone, as it was sim locked with developer options disabled. Then I unlock it and changed OS version (now running 2.2) and I can do the installation in the way you suggest and mostly important the device debugging. But the reason for which the application starts while debugging from eclipse and doesn't when installed is still a mystery. I wonder if it is due to the signature somehow, but again I am using same key + password + alias than before and the error message should be different. Thanks anyway! On Jan 26, 11:25 pm, TreKing treking...@gmail.com wrote: On Wed, Jan 26, 2011 at 5:07 PM, Mik mam.marche...@gmail.com wrote: But then when I try to run it from the GUI menu a toast message tells me: Application is not installed in your phone What GUI Menu? Are you starting it from the Launcher or the home screen? --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Grab phonebook-contacts via ContactsContract-API
Very nice! Thanks Pepijn, that's what I was looking for :) Maybe you could explain in a few words, how I'm supposed to manage the http session of this account? I need to store two cookies and the sessionID to maintain my session. Where to store them and how can other applications reuse the session? In the documentation I only see the getAuthToken-Method, but it's only returning a bundle with one single field KEY_AUTHTOKEN?!? On 26 Jan., 22:16, Pepijn Van Eeckhoudt pep...@vaneeckhoudt.net wrote: I think AccountManager#setUserData is what you should use to store additional account data. At least that's what I did in my application and it works as I expected. Pepijn Op 26 Jan 2011 om 21:58 heeft Dmitri Plotnikov dplotni...@google.com het volgende geschreven: I think it is just a string that AccountManager can store for you. How you use it is up to you. I don't know what URL you need to keep per account, but can't you pretend that the URL is an auth token? I am not 100% on this, because I haven't used authtoken this way myself. On Jan 26, 2011 12:43 PM, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: I thought the authentication token is something specific to the session, like a sessionID or something? I'm a little bit confused now. On 26 Jan., 20:41, Dmitri Plotnikov dplotni...@google.com wrote: Take a look at AccountManager docs:http://developer.android.com/intl/en/reference/android/accounts/Accou... AccountManager supports the notion of authentication token, which is what I think you need. Cheers, - Dmitri On Wed, Jan 26, 2011 at 10:26 AM, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Ok, I'm about to write the SyncAdapter part of my App. Due to the fact that I have a special case, I'm a little bit stuck: Additional to the username/password I need to store a URL on a per account base! How I'm supposed to store this extra information, attached to an account? Thanks for your help an patience Dmitri! On 23 Jan., 19:00, Dmitri Plotnikov dplotni...@google.com wrote: Using ContentObserver for sync adapters does not sound like a good idea. There are several reasons for that: 1. Data change notifications are not delivered to processes that are not running. So if your sync adapter is not running for one reason or another (and the system kills processes when it needs resources), then you won't get a notification. 2. ContactsProvider sends only general whole adapter notifications, meaning that when any data element in the database changes it sends a notification to all observers regardless of what URIs they registered for. For example, somebody's presence in Talk changes - you will get a notification. Most of these notifications will have nothing to do with the changes you need to sync, but there is no way for the adapter to tell. 3. Having the sync adapter running at all times is a major waste of resources. Fortunately, the sync framework is designed to overcome all these issues. SyncManager manages sync adapters, calls them at the best time from the system's perspective, throttles their activities etc. Sync adapters themselves rely on RawContact.DIRTY flag and the ContactsContract.CALLER_IS_SYNCADAPTER parameter to find and process incremental changes. There are examples of how that's done. The most comprehensive example is probably the Exchange (IAS) sync adapter that you can find here: http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=t... Cheers, On Fri, Jan 21, 2011 at 11:57 PM, himanshu jain himanshu@gmail.com wrote: Hi Dmitri ,@LordAli3n I have couple of questions please spare some time or guide me direction 1) Can we use syncAdapter to get data of a row of raw_contact table if that row has been affected (i.e added/deleted/edited). I know ContentObserver notify whenever raw_content table changes in onChange() method but we dont know which row has been changed ( to put this in another way if we add how would we know and if deleted we still get it through deleted flag in raw_contact table but how about edited one??). 2) when we get notification in ContentObserver can we fire requestSync (Account account, String authority, Bundle extras) to start Sync ?? how we can get data of raw_contact affected by contact application using these to parameters . 3) Is sync started by ContentProvider API ?? whenever change to it happens ??. How?? does it pass any useful uri or data that has been changed in raw_contacts??. 4) How do we come to know if in the process of syncing something went wrong?? does it started again
[android-developers] Re: Analysis of the engadget app
Well that's exactly the inverse my little Zsolt Vasvari. Thx TreKing. On Jan 17, 8:53 am, Zsolt Vasvari zvasv...@gmail.com wrote: Another guy who wants to code an iPhone copy app on Android :( On Jan 17, 3:46 pm, TreKing treking...@gmail.com wrote: On Mon, Jan 17, 2011 at 1:17 AM, JPS jpsa...@gmail.com wrote: I want to make an application with tabbed panes, with different views in each pane. I would like to know if there is a standard component/ way for doing this. Standard way of doing tabs would be TabActivity and TabView. Though I doubt that's what's being used in the picture, by the looks of it. Any help to analyse how they are doing this will be greatly appreciated. Looks simply like a LinearLayout with a single row of buttons. Clicking on a given button changes the main view. This should be incredibly easy to layout and code up. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Map View Error!
If I put Classname extends MapActivity, it can't resolve that. If i put name extends Activiy, it resolve but the application forced to close.. Can any one help me on this issue -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] BufferPercentage never reaches 100 %
Hello, I have a video app that plays videos from urls. I have a MediaController that displays the progress of the playback and of the buffering. I have tested my app on different devices (HTC Magic - android 1.5 // Samsung apollo - android 2.1update1) and on it works fine. However when I test my app on the HTC desire (android 2.2) the bufferpercentage never reaches 100. My MediaPlayer.OnBufferingUpdateListener onBufferingUpdate (MediaPlayer mp, int percent) never gets called with percent = 100. It stops around 95/97 and when the video reaches the end, it sometimes gets updated to 99 percent, but almost never to 100. It even occurs that the playback progress is bigger then the buffering progress... Also on the Desire the bufferingPercent value sometimes decreases: when it is stuck at e.g. 93% it occurs that it decreases to 92% and back... What could be the cause of these weird things? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb SDK
On 27 January 2011 09:53, String sterling.ud...@googlemail.com wrote: I take this to mean that, if I install the preview SDK, I can't publish ANY You can't publish anything with targetSDK=9. When you set target to lower value other SDK is used so this limitation does not affect your app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: High sensor usage in stand by
Similar to: http://groups.google.com/group/android-developers/browse_thread/thread/a70f5b1a52a85624/666daeca2ebb7eaa?lnk=gstq=sensor+usage#666daeca2ebb7eaa http://groups.google.com/group/android-developers/browse_thread/thread/84323097a46de05f/409722ec2bab2988?lnk=gstq=sensor+usage#409722ec2bab2988 http://groups.google.com/group/android-developers/browse_thread/thread/c8293b6e8e3c2501/1a9632d97e0d3a3d?lnk=gstq=sensor+usage#1a9632d97e0d3a3d Please help On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote: I'm struggling to find the root cause of a problem that occurs apparently randomly in my application. I have a listener registered for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast I unregister the listener, and on Screen ON a register it again. From time to time, after phone reboot, or maybe unplug, while the most of the time the phone is in stand by I get a high sensor usage in phone information (along with high battery use associated with my app...) In logcat I find lines like this just before Screen OFF : 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener: alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor These are some kind of errors that shows that the Listener could not be unregistered ? If yes, why and what can I do ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Need help to develop a folder locking app in android
Its much more impressive to know that so called ACE android developpers motivating novice developers with such answers. On Jan 25, 1:18 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 21 January 2011 04:58,JyotishKjyotishcs05onl...@gmail.com wrote: I am new to android applications development. I want to develop an application to lock folders i.e make any folders password protected. Please give an idea on how do I start. Or if you have any sample source code of the same, can you please share with me? It's pretty much impressive to see incresing number of people wishing they could write complicated code with lack of platform basics and while it's rather obvious hello world type of app may also be out of reach... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: SoundPool - sample XXX not READY
This doesn't solve your 256 limit problem but I just wanted to point out you can still see sample XXX not READY even if you're only using 2 or 3 very short sound samples. I've seen this with a 1 second OGG file on the Nexus One. Now I'm not suggesting this is the best way to deal with it, but I play sounds from a non UI thread and use code similar to this to prevent the need to reload samples: http://code.google.com/p/cgmd2010/source/browse/trunk/src/at/ac/tuwien/cg/cgmd/bifth2010/level84/SoundManager.java?spec=svn1192r=1192 Additionally, to deal with the larger samples (still under 1 second) not being ready I use this awful fix. int result = 0; int abortCount = 100; do { result = mSoundPool.play(mSoundPoolMap.get(resID), streamVolume, streamVolume, 1, 0, 1f); if(result == 0) { try { Thread.sleep(2); } catch (InterruptedException e) { e.printStackTrace(); } } } while(result == 0 abortCount-- 0); This is not good, I'm aware of that, it can make the background thread sleep for up to 200msecs before the sound is actually ready (in reality it's never more than a couple of iterations). The point is it works, and I don't see any callbacks for SoundPool (pre 2.2 / SoundPool.OnLoadCompleteListener) to let you know when a sound sample is ready to play. If anyone can enlighten us that would be brilliant. You could look into using MediaPlayer for longer samples, the above I just used for quick sound FX but that doesn't sound like a good fit for your case. Richard On 26 Jan 2011, at 01:06, Steve wrote: Okay, from a little more experimentation it appears after loading/ unloading 256 sounds things start to go awry. It seems to be 100% reproducible in my application. I wasn't actually running the latest Android SDK so I updated to latest, and specified the minimum/target SDK version to be eight (instead of four) just for good measure, but this doesn't help. After 256 sounds have been unloaded, the next load never appears to complete. After more searching on Google (I think I have read every result it returns now), I came across this web page (in Japanese): http://d.hatena.ne.jp/itog/20100927/1285550195 The Google translation does a good enough job for me to get the point being conveyed (I believe). It says: [Begin quote] 256 Wall load () will be returned in the id is incremented from 0, for convenience of memory management in the region of 256 native id number. Me a total 257 load () error when trying to become. ERROR / SoundPool (2693): Unable to load sample: (null) unload () even if the load () can retrieve the id is not reused. To clear the id soundPool.release () The only state to clean everything once. [End quote] My interpretation of that is that there is an integer index, ever time you load a sound you get back an incremented index. On the 257th load, the index value you get back is 257, that this causes it to fail to load with the above message (I actually get the above message with the latest SDK and target version set to eight). When you get to this stage, the only option appears to be to release the entire SoundPool, create a new one, and carry on. This seems to completely match what I am experiencing, so if this is the case I am at least happy that my code is correct, but I am sad that this is as good as it gets. It is not convenient for me to have to destroy the SoundPool once an arbitrary number of sounds have been loaded and unloaded. On the positive side, I can make some special case code in my current application to have a sensible time to dump out all sounds, clear the sound pool and recreate it, but it is far from neat, and certainly not going to be a project generic, or platform generic solution (I have never seen a platform like this before where there is such a limit - certainly none of my other cross compile targets suffer from this issue). I would be interested to hear of anyone that believes that can actually beat this 256 limit without calling 'release' on their SoundPool. I do not feel my application is being particularly demanding in terms of the SFX requirements. It is a platform based game, and each level loads in a bunch of SFX specific for that level, each level is relatively quick (some can just be a few seconds) so if you play for a moderate amount of time, it is rather easy to have loaded more than 256 sounds loaded and unloaded. darrinps: It would be interesting to know if you have overcome this hurdle, or if you simply haven't hit the 256 limit. Steve On Jan 25, 11:47 pm, Steve rockthesm...@gmail.com wrote: Unfortunately I am rather confident that all my play's have matching stops, and my loads have matching unloads. I have managed to create my bug quite quickly at least, if I just quickly jump between a couple of levels continually until it has loaded/unloaded 500 or so samples that seems to break
Re: [android-developers] Re: Need help to develop a folder locking app in android
On 27 January 2011 11:53, JyotishK jyotishcs05onl...@gmail.com wrote: Its much more impressive to know that so called ACE android developpers motivating novice developers with such answers. Far from ACE, yet Know your limits motto is known to me. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Adding .img file in running emulator.
Hi, I am using Eclipse to develop android application. Now I want to add image file to the emulator. So do I need to create a new emulator to add this image image file in this emulator or there is any other way to do it while AVD is already created ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: apkbuilder ?
Argh you people are unbelievable! WHAT is the replacement? WHAT ant command should I call, or failing that WHAT Java class can I start other than ApkBuilderMain? Seriously, it's great to put a massive deprecation notice into everyone's build script, but at some stage people might want to know how to get rid of it! I'm no expert on Android, just trying to get started using the tools for my IDE. I'm sorry, but this is like the 18 trillionth thread I've found saying yes, yes, it IS deprecated, isn't it... FOR THE LOVE OF ALL THAT IS SACRED WHAT REPLACED IT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] System Bar location and height in Honeycomb?
How can I find the location (bottom or top) and height of the System Bar (status bar) in Honeycomb? In compatibility testing of my app I find that I get some vertical offsets in screen locations wrong in Honeycomb, apparently because I did not yet account for the System Bar at the bottom of the screen in Honeycomb. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Import package does not work...
Hi! I code android app that uses Google Maps. I added uses-library android:name=com.google.android.maps/ in manifest file, and when in java class try to import that package, I get: The import com.google cannot be resolved. What can I do to fix this? Thnx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Developer Position for a NY Based Internet Company
Hi There, SourcePad is a New York City based Internet company focusing on outsourcing services for SME. Our company practices a groundbreaking work environment where collaboration is exercised throughout all levels of the company. We are expanding rapidly and have now worked with 50+ clients! We currently have more Mobile work than we can handle and need to grow our team! We have positions for both Mid-shift Night-Shift, so, if you are smart, excited about Mobile development and want to potentially double your salary...we want you to join our team! If you are interested, please email Kim at k...@sourcepad.com or text at 0916.496.83.46 Look forward to speaking with you! Kim Abunado Recruiting Manager SourcePad LLC 0916.496.8346 www.sourcepad.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding .img file in running emulator.
And adding it to it Even I give the path of .img file but still I am unable to mount this on my emulator. I want to access files of this card through my application. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Error installing Android SDK Tools, revision 9
I had a similar problem with the rename of the SDK directory (the basically unload that Xavier mentioned). Solution was to uninstall the previous package and reinstall the new version. Extra step but not a big issue to do. Steps were: - Uninstall the package that had problems - restart Eclipse - Install the new version All worked ok after that. Thanks to the Google Android team for continuous innovation and improvement. Robert On Jan 26, 10:36 pm, Xavier Ducrohet x...@android.com wrote: actually you're right. Updating from eclipse might be worse. We've mostly improved the regular avd manager. We'll do more work on the eclipse version (which basically has to unload the current sdk to make sure components can be updated) On Wed, Jan 26, 2011 at 7:27 PM, Zsolt Vasvari zvasv...@gmail.com wrote: We're still tweaking things and will improve the experience, but r9 should be better already. Actually, it's worse, at least for me. I've never had a problem updating right from Eclipse, but I do with this one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc.http://developer.android.com|http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Honeycomb browser broken?
Yeah, I can't get it to work either. When I fire up ithe browser, it crashes rendering the homepage. I don't have time to click the X to stop it so I've never managed to type in a different address yet. Your screenshot is the same as mine - the blue progress bar has never got past the l in google in the address bar. I get over 30 of these: 01-27 12:00:11.457: ERROR/libEGL(603): call to OpenGL ES API with no current context (logged once per thread) Followed by a dump: 01-27 12:00:16.576: INFO/DEBUG(602): Build fingerprint: 'generic/sdk/generic:Honeycomb/HPI20B/eng.xav.20110125.162619:eng/test-keys' 01-27 12:00:16.586: INFO/DEBUG(602): pid: 603, tid: 635 com.android.browser 01-27 12:00:16.606: INFO/DEBUG(602): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr cad5fb30 01-27 12:00:16.606: INFO/DEBUG(602): r0 caa137c0 r1 00c4 r2 0008 r3 0034c370 01-27 12:00:16.628: INFO/DEBUG(602): r4 0001 r5 acaa137c r6 acaa137c r7 49ff9dfc 01-27 12:00:16.628: INFO/DEBUG(602): r8 a801c061 r9 00342a50 10 0010 fp 0001 01-27 12:00:16.637: INFO/DEBUG(602): ip 8166ecd8 sp 49ff9da8 lr abe04eb9 pc abe042a4 cpsr 0030 01-27 12:00:20.417: INFO/DEBUG(602): #00 pc 42a4 /system/lib/libEGL.so 01-27 12:00:20.498: INFO/DEBUG(602): #01 pc 4eb4 /system/lib/libEGL.so (eglCreatePbufferSurface) 01-27 12:00:20.507: INFO/DEBUG(602): #02 pc 003a2064 /system/lib/libwebcore.so 01-27 12:00:20.546: INFO/DEBUG(602): #03 pc 003a1b06 /system/lib/libwebcore.so 01-27 12:00:20.566: INFO/DEBUG(602): #04 pc 003a7982 /system/lib/libwebcore.so 01-27 12:00:20.618: INFO/DEBUG(602): #05 pc 003a7356 /system/lib/libwebcore.so 01-27 12:00:20.647: INFO/DEBUG(602): #06 pc 0001bb68 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv) 01-27 12:00:20.676: INFO/DEBUG(602): #07 pc 00030414 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv) 01-27 12:00:20.707: INFO/DEBUG(602): #08 pc 0001c0f2 /system/lib/libutils.so 01-27 12:00:20.738: INFO/DEBUG(602): #09 pc 00011a58 /system/lib/libc.so (__thread_entry) 01-27 12:00:20.787: INFO/DEBUG(602): #10 pc 00011660 /system/lib/libc.so (pthread_create) and then android kills the browser after locking up for several minutes: 01-27 12:01:22.666: INFO/DEBUG(602): debuggerd committing suicide to free the zombie! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Handling force close [Exception] to stop my native application.
Hi, My android application internally starting a native application[exe] as a separate process when it was launched. Problem is when there is any exception occurred my android application, android framework killing only my android application. But native application[exe] runs in background. Is there any way to handle this in my application to cleanup every this before android framework kills my application. Regards Anzi. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Error installing Android SDK Tools, revision 9
I rebooted the machine and tried it again under eclipse but still had the same problem. So I fired up processexplorer and closed the handle eclipse had on dx.jar (always fingers crossed!) and closed any running instances of adb just to be sure and it seemed to work then. As for the sdkmanager, I just manually copied it from the tools/lib to the root of the sdk folder. Although it has the same filesize as r8 so I guess it may not have even had any 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Honeycomb browser broken?
I even tried to fire up an empty webpage to see if it was just the graphics rendering that was broken, but I still get the same error now with a completely blank page: adb shell am start -a android.intent.action.VIEW -d about:blank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Permission Denied exception on SD Card Write - Manifest has the permission
Problem solved: 1. Checked the state of the card using the method explained on the developer site. Turned out the card was in shared mode meaning mounted on USB hence unavailable from application 2. On the device changed the USB connection to PC (earlier it was mass storage). On Jan 26, 9:05 pm, RS raj...@yahoo.com wrote: Hello .. I am writing a file to the SD card but getting INFO/SdCardManager(24132): Failed to create the temp file..java.io.FileNotFoundException: /mnt/ sdcard/jest/t.txt (Permission denied) In the manifest I have the following: uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-permission android:name=android.permission.INTERNET/ Totally lost - how can I resolve this issue? I need direction :( Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How many ways to find out..?
Any help please... On Thu, Jan 27, 2011 at 12:38 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi, In how many ways we can find the current location of the user. Can we find the current location without using GPS. Can anyone help me out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Cannot find my own Apps in the Market
After 2.2 update I cannot find my own Apps in the android market. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android SDK is so slow that is ridiculous.
Performance problem on android SDK isn't related on what you are talking here. Android SDK is so slow also with android 2.2 and 2.2. The SDK uses only one core and this is a shame. Too slow for everything that needs more power than a fart app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyev kmans...@gmail.com wrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those intents in a HashMap, but I need the PendingIntent when I'll cancel the alarm and it worked. Maybe I have to optimize something, but now I understood how to work with the AlarmManager AND multiple scheduling tasks. Thans a lot! -DannyS. On 19 Jan., 17:26, Kostya Vasilyevkmans...@gmail.com wrote: Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/threa... -- Kostya 19.01.2011 19:09,DannyS. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml and wondered why the alarm is not fired ^^ But now it works, but only for the last data I set on the manager. Hope you can help, meanwhile I go home and do some searches on Google :D ´Thanks! -DannyS. On Jan 19, 10:49 am, DannyS.danny.schi...@googlemail.com wrote: Hello Kostya, WOW, thank you very much, I'll have a look and reply with results and questions if I have ;-) -DannyS. On Jan 19, 9:09 am, Kostya Vasilyevkmans...@gmail.com wrote: 19.01.2011 10:07,DannyS. пишет: Hi, I have a service that is running in background. It needs to send notifications to the user. In my application you can create data with date and time. The service now can fetch this data and give the user a notification t-x minutes before the saved time is reached (remind for appointments). Can I set a fix moment when the service should send the user a notification instead of listen/check all the time for (approximately) time identity? See AlarmManager And a secondary question: how can I set Autostart for the applications service? See Intent.ACTION_BOOT_COMPLETED -- Kostya Thanks a lot! -DannyS. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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
[android-developers] Re: How many ways to find out..?
Please don't post your questions to several pages without waiting for an answer. http://stackoverflow.com/questions/4816554/in-how-many-ways-we-can-find-the-location-in-android Tom On Jan 27, 1:34 pm, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Any help please... On Thu, Jan 27, 2011 at 12:38 PM, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Hi, In how many ways we can find the current location of the user. Can we find the current location without using GPS. Can anyone help me out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Schedule notification instead of permanently check
receiver android:name=.BootCompletedBroadcastReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver public class BootCompletedBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { ... your code on boot } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How many ways to find out..?
On 27 January 2011 13:34, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote: Any help please... RTFM please? http://developer.android.com/guide/topics/location/obtaining-user-location.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Schedule notification instead of permanently check
Danny, You don't need a category in the filter to receive BOOT_COMPLETED, just action. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those intents in a HashMap, but I need the PendingIntent when I'll cancel the alarm and it worked. Maybe I have to optimize something, but now I understood how to work with the AlarmManager AND multiple scheduling tasks. Thans a lot! -DannyS. On 19 Jan., 17:26, Kostya Vasilyevkmans...@gmail.comwrote: Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/threa... -- Kostya 19.01.2011 19:09,DannyS. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml and wondered why the alarm is not fired ^^ But now it works, but only for the last data I set on the manager. Hope you can help, meanwhile I go home and do some searches on Google :D ´Thanks! -DannyS. On Jan 19, 10:49 am, DannyS.danny.schi...@googlemail.com wrote: Hello Kostya, WOW, thank you very much, I'll have a look and reply with results and questions if I have ;-) -DannyS. On Jan 19, 9:09 am, Kostya Vasilyevkmans...@gmail.com wrote: 19.01.2011 10:07,DannyS. пишет: Hi, I have a service that is running in background. It needs to send notifications to the user. In my application you can create data with date and time. The service now can fetch this data and give the user a notification t-x minutes before the saved time is reached (remind for appointments). Can I set a fix moment when the service should send the user a notification instead of listen/check all the time for (approximately) time identity? See AlarmManager And a secondary question: how can I set Autostart for the applications service? See Intent.ACTION_BOOT_COMPLETED -- Kostya Thanks a lot! -DannyS. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You
[android-developers] Re: Schedule notification instead of permanently check
Hey Kostya, you were right. I dont need to hold the intents in java, I can cancel it this way: mAlarmManager.cancel(PendingIntent.getBroadcast(this, intentId, myBroadcastIntent, 0)); Thanks a lot for this!!! ;-) -Danny S. On 20 Jan., 10:33, Kostya Vasilyev kmans...@gmail.com wrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those intents in a HashMap, but I need the PendingIntent when I'll cancel the alarm and it worked. Maybe I have to optimize something, but now I understood how to work with the AlarmManager AND multiple scheduling tasks. Thans a lot! -DannyS. On 19 Jan., 17:26, Kostya Vasilyevkmans...@gmail.com wrote: Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/threa... -- Kostya 19.01.2011 19:09,DannyS. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml and wondered why the alarm is not fired ^^ But now it works, but only for the last data I set on the manager. Hope you can help, meanwhile I go home and do some searches on Google :D ´Thanks! -DannyS. On Jan 19, 10:49 am, DannyS.danny.schi...@googlemail.com wrote: Hello Kostya, WOW, thank you very much, I'll have a look and reply with results and questions if I have ;-) -DannyS. On Jan 19, 9:09 am, Kostya Vasilyevkmans...@gmail.com wrote: 19.01.2011 10:07,DannyS. пишет: Hi, I have a service that is running in background. It needs to send notifications to the user. In my application you can create data with date and time. The service now can fetch this data and give the user a notification t-x minutes before the saved time is reached (remind for appointments). Can I set a fix moment when the service should send the user a notification instead of listen/check all the time for (approximately) time identity? See AlarmManager And a secondary question: how can I set Autostart for the applications service? See Intent.ACTION_BOOT_COMPLETED -- Kostya Thanks a lot! -DannyS. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why cant I install an apk from asset folder
I don't know if its possible or not, but I kind of hope not. It would be the perfect way to installed a worm on a phone. I think the use needs to take direct action. - Brill Pappin On Jan 27, 2:06 am, Titus titus.mor...@gmail.com wrote:t Hello, I have an X.apk which contains another Y.apk within is asset folder. While X activity is trying to install the Y.apk android shows a parsing error while installation. The Error message shown on the UI is There is a problem in parsing the package, while the adb logs shows WARN/PackageInstaller(270): Parse error when parsing manifest. Discontinuing installation. The same Y.apk if i put in another location (data/data/Y.apk) i can install fine from X.apk. Is there a reason why Y.apk can't be put in asset folder ? or is there a neater way to do this ? thanks for your inputs, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Hide each view after LayoutAnimation
That is exactly what I wanted. Thanks for giving me a *real* suggestion. Joe On Jan 26, 5:51 pm, Hari Edo hari@gmail.com wrote: Are you setting fill-afterto true on this animation? On Jan 26, 4:58 pm, chrismanster chrismans...@gmail.com wrote: I have a GridView with several n Views in the Layout. When one is clicked I want to reverse theLayoutAnimationto give the affect that everything is being removed. Once the animation ends I do something, in this case start an activity. My problem is that once theLayoutAnimationoneachviewis complete it returns to its original position. This doesn't give me the affect I am going for. Is there anyway to keep the Views from returning untilafterthe activity is started? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new Intent(this, AlertReceiver.class); alarmSender = PendingIntent.getBroadcast(this, task.getId(), alertReceiverIntent, 0); // insert a new alert mAlarmManager.set(AlarmManager.RTC_WAKEUP, deliverTime, alarmSender); ... The receiver is used like expected, onReceive() is called, but never when the device came up. I can try using a second receiver if it is ever possible, only for boot recognization. But this seems not the best way... My receiver should be able to differ between actions and do several things... Thanks a lot! -Danny S. On 27 Jan., 14:15, Kostya Vasilyev kmans...@gmail.com wrote: Danny, You don't need a category in the filter to receive BOOT_COMPLETED, just action. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those intents in a HashMap, but I need the PendingIntent when I'll cancel the alarm and it worked. Maybe I have to optimize something, but now I understood how to work with the AlarmManager AND multiple scheduling tasks. Thans a lot! -DannyS. On 19 Jan., 17:26, Kostya Vasilyevkmans...@gmail.com wrote: Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/threa... -- Kostya 19.01.2011 19:09,DannyS. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml and wondered why the alarm is not fired ^^ But now it works, but only for the last data I set on the manager. Hope you can help, meanwhile I go home and do some searches on Google :D ´Thanks! -DannyS. On Jan 19, 10:49 am, DannyS.danny.schi...@googlemail.com wrote: Hello Kostya, WOW, thank you very much, I'll have a look and reply with results and questions if I have ;-) -DannyS. On Jan 19, 9:09 am, Kostya Vasilyevkmans...@gmail.com wrote:
[android-developers] need help for screen rotation
Hi, I have developed an Android paint app through which one can draw different shapes and freehand drawing on the canvas. However i have reached a stumbling block now... i would like to retain the information of the different shapes when the screen is rotated... hence i need to store an array of shape objects... as i was looking at the SDK documentation i found public Object onRetainNonConfigurationInstance()... however i need such functionality which returns an array of Object[]. it would be very helpful for me if someone can point out how i can do it for the Android Paint app... Thanks in advance. Som -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Schedule notification instead of permanently check
Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the logcat message? Try doing something more visible, like a notification or starting an activity. -- Kostya 27.01.2011 16:49, Danny S. пишет: Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new Intent(this, AlertReceiver.class); alarmSender = PendingIntent.getBroadcast(this, task.getId(), alertReceiverIntent, 0); // insert a new alert mAlarmManager.set(AlarmManager.RTC_WAKEUP, deliverTime, alarmSender); ... The receiver is used like expected, onReceive() is called, but never when the device came up. I can try using a second receiver if it is ever possible, only for boot recognization. But this seems not the best way... My receiver should be able to differ between actions and do several things... Thanks a lot! -Danny S. On 27 Jan., 14:15, Kostya Vasilyevkmans...@gmail.com wrote: Danny, You don't need acategory in the filter to receive BOOT_COMPLETED, justaction. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED /is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyevkmans...@gmail.comwrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those intents in a HashMap, but I need the PendingIntent when I'll cancel the alarm and it worked. Maybe I have to optimize something, but now I understood how to work with the AlarmManager AND multiple scheduling tasks. Thans a lot! -DannyS. On 19 Jan., 17:26, Kostya Vasilyevkmans...@gmail.com wrote: Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/threa... -- Kostya 19.01.2011 19:09,DannyS. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml and wondered why the alarm is not fired ^^ But now it works, but only for the last data I set on the manager. Hope you can help, meanwhile I go home and do some searches on Google
Re: [android-developers] Re: Post with image attachment
thanx for reply what do u mean with format? i guess there is a problem on line that sends image ByteArrayInputStream : entity.addPart(jpg,new InputStreamBody(new ByteArrayInputStream(byteData),jpeg)); because it posts stringBody successfuly. 2011/1/24 Kumar Bibek coomar@gmail.com You should first check what format your server accepts requests for this particular call. This is a little bit tricky, but you should be able to get it working. On Jan 23, 3:14 am, ugurbayram ugurb...@gmail.com wrote: hi everyone. im new in android dev and stuck on posting an image to jersey web service. here is code snipets of android app and web service. Android app HttpClient httpClint = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(BASE_URI); MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); Bitmap bmImg = BitmapFactory.decodeFile(sdcard/22_6185.jpg); ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmImg.compress(CompressFormat.JPEG, 100, bos); byte[] bitmapdata = bos.toByteArray(); entity.addPart(Default,new StringBody(Default, Charset.forName(UTF-8))); entity.addPart(6,new StringBody(6,Charset.forName(UTF-8))); entity.addPart(100, new StringBody(100,Charset.forName(UTF-8))); entity.addPart(jpg,new InputStreamBody(new ByteArrayInputStream(byteData),jpeg)); httpPost.setEntity(entity); HttpResponse httpResponse = httpClint.execute(httpPost); Web service try { newSearchOption = getStringFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(0).getEntity()).getInputStream()); newCategoryName = getStringFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(1).getEntity()).getInputStream()); newCategoryId = Integer.parseInt(newCategoryName); numberOfResult = getIntegerFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(2).getEntity()).getInputStream()); BodyPartEntity bpe = (BodyPartEntity) multipart.getBodyParts().get(3).getEntity(); InputStream is = bpe.getInputStream(); bufferedImage = ImageIO.read(is); } catch (IOException e) { e.printStackTrace(); } and here is the error message a receive everytime : HTTP Status 415 - Status report message description The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (). GlassFish Server Open Source Edition 3.0.1 it seems there is a problem on entity parts but couldnt figure out. i tried afew more code snipets on this forum eigther but nothing changed. thanks in a 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Image capturing
DDMS 3 On 1/25/11, KAKLOTAR DILIPKUMAR dilipkaklo...@gmail.com wrote: in DDMS there is one option to capture the screen shot in android -- dilip kaklotar Mobile No: 8000722607 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Post with image attachment
actually i found a way to post the image by creating my own AbstractContentBodyhttp://www.anddev.org/multimedia-problems-f28/post-with-image-attachment-t50630.htmlinstead of InputStreamBody but i really wonder why this doesnt work. 2011/1/27 ugur ugurb...@gmail.com thanx for reply what do u mean with format? i guess there is a problem on line that sends image ByteArrayInputStream : entity.addPart(jpg,new InputStreamBody(new ByteArrayInputStream(byteData),jpeg)); because it posts stringBody successfuly. 2011/1/24 Kumar Bibek coomar@gmail.com You should first check what format your server accepts requests for this particular call. This is a little bit tricky, but you should be able to get it working. On Jan 23, 3:14 am, ugurbayram ugurb...@gmail.com wrote: hi everyone. im new in android dev and stuck on posting an image to jersey web service. here is code snipets of android app and web service. Android app HttpClient httpClint = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(BASE_URI); MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); Bitmap bmImg = BitmapFactory.decodeFile(sdcard/22_6185.jpg); ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmImg.compress(CompressFormat.JPEG, 100, bos); byte[] bitmapdata = bos.toByteArray(); entity.addPart(Default,new StringBody(Default, Charset.forName(UTF-8))); entity.addPart(6,new StringBody(6,Charset.forName(UTF-8))); entity.addPart(100, new StringBody(100,Charset.forName(UTF-8))); entity.addPart(jpg,new InputStreamBody(new ByteArrayInputStream(byteData),jpeg)); httpPost.setEntity(entity); HttpResponse httpResponse = httpClint.execute(httpPost); Web service try { newSearchOption = getStringFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(0).getEntity()).getInputStream()); newCategoryName = getStringFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(1).getEntity()).getInputStream()); newCategoryId = Integer.parseInt(newCategoryName); numberOfResult = getIntegerFromInputStream(((BodyPartEntity) multipart.getBodyParts().get(2).getEntity()).getInputStream()); BodyPartEntity bpe = (BodyPartEntity) multipart.getBodyParts().get(3).getEntity(); InputStream is = bpe.getInputStream(); bufferedImage = ImageIO.read(is); } catch (IOException e) { e.printStackTrace(); } and here is the error message a receive everytime : HTTP Status 415 - Status report message description The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (). GlassFish Server Open Source Edition 3.0.1 it seems there is a problem on entity parts but couldnt figure out. i tried afew more code snipets on this forum eigther but nothing changed. thanks in a 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers]
empty? On 1/25/11, fird hardys firdhar...@gmail.com wrote: -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Ramesh Solanki wants to chat
i added you :p On 1/25/11, Ramesh Solanki rkindia1...@gmail.com wrote: --- Ramesh Solanki wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-334a51fa6f-50da7c6066-dJxVP-ElmiEKtctrZ_iv1dU3UlI You'll need to click this link to be able to chat with Ramesh Solanki. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with Ramesh Solanki, visit: http://mail.google.com/mail/a-334a51fa6f-50da7c6066-dJxVP-ElmiEKtctrZ_iv1dU3UlI Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into conversations - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers]
empty? On 1/25/11, fird hardys firdhar...@gmail.com wrote: -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Schedule notification instead of permanently check
Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver that handles the boot action and nothing else... hope I can solve the problem soon ;-) Thanks for your help! -Danny S. On 27 Jan., 15:23, Kostya Vasilyev kmans...@gmail.com wrote: Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the logcat message? Try doing something more visible, like a notification or starting an activity. -- Kostya 27.01.2011 16:49, Danny S. пишет: Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new Intent(this, AlertReceiver.class); alarmSender = PendingIntent.getBroadcast(this, task.getId(), alertReceiverIntent, 0); // insert a new alert mAlarmManager.set(AlarmManager.RTC_WAKEUP, deliverTime, alarmSender); ... The receiver is used like expected, onReceive() is called, but never when the device came up. I can try using a second receiver if it is ever possible, only for boot recognization. But this seems not the best way... My receiver should be able to differ between actions and do several things... Thanks a lot! -Danny S. On 27 Jan., 14:15, Kostya Vasilyevkmans...@gmail.com wrote: Danny, You don't need acategory in the filter to receive BOOT_COMPLETED, justaction. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm (including the request code). The hash table can go away with the process, while alarms persist (with them being inside Android). If you're relying on the map being an up-to-date representation of your alarms, make sure that it's correctly reconstructed from scratch - or get rid of it altogether. -- Kostya 20.01.2011 11:55,DannyS. пишет: Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them
[android-developers] Re: Schedule notification instead of permanently check
Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver ... I am confused doing it this way. I would have preferred using only one receiver for handling corresponding actions but it seems this is the only way... Maybe it has to be like this, but somebody would explain to me ;-) Thanks! -Danny S. On 27 Jan., 16:19, Danny S. danny.schi...@googlemail.com wrote: Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device and show up a notification with information about intent's action when onReceive() is called. I temporery implemented notification output and tested it on emulator. One for boot action and one for any other. In any case there should be a notification but when I restart the emulator nothing happened... onReceive is not called. As said I'll try with my real device and give response ASAP. If it does not work I try using a second receiver that handles the boot action and nothing else... hope I can solve the problem soon ;-) Thanks for your help! -Danny S. On 27 Jan., 15:23, Kostya Vasilyev kmans...@gmail.com wrote: Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the logcat message? Try doing something more visible, like a notification or starting an activity. -- Kostya 27.01.2011 16:49, Danny S. пишет: Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new Intent(this, AlertReceiver.class); alarmSender = PendingIntent.getBroadcast(this, task.getId(), alertReceiverIntent, 0); // insert a new alert mAlarmManager.set(AlarmManager.RTC_WAKEUP, deliverTime, alarmSender); ... The receiver is used like expected, onReceive() is called, but never when the device came up. I can try using a second receiver if it is ever possible, only for boot recognization. But this seems not the best way... My receiver should be able to differ between actions and do several things... Thanks a lot! -Danny S. On 27 Jan., 14:15, Kostya Vasilyevkmans...@gmail.com wrote: Danny, You don't need acategory in the filter to receive BOOT_COMPLETED, justaction. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / is already added in AndroidManifest.xml. I am using the receiver for recognizing alarms AND want to use the same for check whether the device has booted. The alarm came up, but I found no output on log console for recognizing that the device booted successfully. Here is the code of the receivers onReceive() method: if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) Log.i(AlertReceiver, Boot completed :D); else { Log.d(AlertReceiver, Intent action is: + intent.getAction()); Toast.makeText(context, Alarm scheduled, Toast.LENGTH_SHORT).show(); System.out.println(AlertManager alert succeeded!); } I started the emulator without new installation of my app so I expected the output Boot completed :D... What is my fault? Is my receiver construct in the manifest incorrect? Hope you can help me, Thanks a lot! -Danny S. On 20 Jan., 10:33, Kostya Vasilyevkmans...@gmail.com wrote: Danny, Android already keeps a global
[android-developers] Question about android.view.WindowManagerImpl
Hi, I want to reuse the drag and drop control code from luncher application. But I found it uses some of private API such as android.view.WindowManagerImpl class. Since I am developing my application in SDK I can not use it. Can any one suggest some work around for it. Thanks in advance. argongold -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: need help for screen rotation
Rotation causes a complete teardown and recreate of your Activity, as you have already learned. So here are some options to consider: - overide onSaveInstanceState(), and place your info into a Bundle, and pull it back out in onCreate() - Application instance (android.app.Application) - Singleton - Static variables The first option is great if you don't have too much data. Otherwise, the remaining 3 are roughly equivalent, and the choice is a matter of design preference. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] need help for screen rotation
27.01.2011 16:57, som пишет: as i was looking at the SDK documentation i found public Object onRetainNonConfigurationInstance()... however i need such functionality which returns an array of Object[]. Hint: in Java, everything is an Object, including: - Listyourclass - yourclass[] - Instance of: class Data { Listyourclass a; yourclass[] b; }; -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Close or uninstall DDMS from Eclipse
The ADT plugin depends on the DDMS plugin. You can remove both or nothing of them. Regards, Peco On Jan 25, 11:36 am, Johannes Mario Ringheim j...@ringheimsauto.org wrote: Is there any way to close or uninstall the DDMS from Eclipse? I'm using the standalone one, and have no use for two of them at the same time. Also, programs seem to show up in only one of the DDMS's at random, displaying a question mark in the other. Thanks for any ideas. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] FullScreen/NoTitleBar/Landscape activity incosistently shifting visually
I have an activity with a somewhat complicated view. Not complicated in a technical sense...there's just a lot going on. All activities in this particular app are set to FullScreen NoTitleBar, and they're all set to Landscape orientation. I noticed early on in development when the app is hidden and then resumes, there was an infrequent tendency for the layout to slide down vertically as if to make room for the titlebar and statusbar. Later on in development, the app now calls out to various external intents. I notice now that there is more of a tendency to make this same shift when resuming from an externally handled fired intent (such as creating a chooser intent or picking an image). I am able to reproduce it inconsistently using the exact same steps...sometimes it happens sometimes it doesn't. It seems as if there's a race condition in between various phases of measuring and laying out. I assume that one of these steps that the system is doing for me is checking for fullscreen and notitlebar, and making the necessary shift. This is probably happening late in some cases. I put a bunch of logging, and calls to invalidate(), requestLayout(), etc trying to maybe catch the race condition, but the problem seems external to my layouts. The top() and bottom() values of my root layout are always 0 and the height of my screen, respectively, even when I'm logging this while the issue is occurring. I asked this on StackOverflow, and neither of the two suggestions I was given worked (setting the fullscreen/notitlebar business in both the xml and in code, and calling getWindow().getDecorView().invalidate(); ). Is there some other method of the Window, WindowManager or any other system view-related object that I can force a full remeasure, redraw, re-check for current theme/style flags? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: PreferenceActivity how to display ListPreference value
On Wed, Jan 26, 2011 at 7:31 PM, jotobjects jotobje...@gmail.com wrote: BTW - the forum post editor seems to wrap around 55 characters and do other weird formatting. Is there a way to make it not do that ;-) Use Gmail. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] What layout objects are allowed in honeycomb app widgets?
Reading through the Honeycomb highlights doc here: http://developer.android.com/sdk/android-3.0-highlights.html It says: Android 3.0 lets developers take home screen widgets to the next level, offering more types of content and new modes of interaction with users. Developers can now use more standard UI widget types home screen widgets, including widgets that let users flip through collections of content as 3D stacks, grids, or lists. Users can interact with the home screen widgets in new ways, such as by using touch gestures to scroll and flip the content displayed in a widget. However, as a developer I am not clear on what this means exactly. In the honeycomb SDK docs, there are no new layout/viewgroup types that are called out as being 'newly allowed' in honeycomb app widgets, however by looking at the samples I saw that there is a StackView in one app widget. Can you please give us more details about which layout objects are allowed in honeycomb app widgets? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: High sensor usage in stand by
Did you check CPU usage using adb shell top ? On Jan 27, 2:42 am, Alex Munteanu alex.munte...@gmail.com wrote: Similar to:http://groups.google.com/group/android-developers/browse_thread/threa...http://groups.google.com/group/android-developers/browse_thread/threa...http://groups.google.com/group/android-developers/browse_thread/threa... Please help On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote: I'm struggling to find the root cause of a problem that occurs apparently randomly in my application. I have a listener registered for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast I unregister the listener, and on Screen ON a register it again. From time to time, after phone reboot, or maybe unplug, while the most of the time the phone is in stand by I get a high sensor usage in phone information (along with high battery use associated with my app...) In logcat I find lines like this just before Screen OFF : 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener: alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor These are some kind of errors that shows that the Listener could not be unregistered ? If yes, why and what can I do ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: High sensor usage in stand by
Yes, is not there. On Jan 27, 6:23 pm, ip332 iprile...@gmail.com wrote: Did you check CPU usage using adb shell top ? On Jan 27, 2:42 am, Alex Munteanu alex.munte...@gmail.com wrote: Similar to:http://groups.google.com/group/android-developers/browse_thread/threa.. Please help On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote: I'm struggling to find the root cause of a problem that occurs apparently randomly in my application. I have a listener registered for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast I unregister the listener, and on Screen ON a register it again. From time to time, after phone reboot, or maybe unplug, while the most of the time the phone is in stand by I get a high sensor usage in phone information (along with high battery use associated with my app...) In logcat I find lines like this just before Screen OFF : 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener: alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor These are some kind of errors that shows that the Listener could not be unregistered ? If yes, why and what can I do ?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Switch to already opened application from Notification
Hi, all I have service and application. In some cases my service creates Ongoing Notification in the Status bar. When user click it - my application started. It is good, but sometimes my application is already opened at this moment, Tell me, please, what should I do to _switch_ to my application if it is already opened, istead of creating new activity? I want to get the same behavior as when I press application icon from the Application list. From manifest: activity android:name=com.myapp.MyAppMainActivity android:launchMode=singleTop intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity Using code: public static void startNotification(Context context, int resID, int iconID, int titleTextID, int contentTextID) { NotificationManager mNM = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); CharSequence text = context.getText(contentTextID); Notification notification = new Notification(iconID, text, System.currentTimeMillis()); Intent activityToStart = new Intent(context, MyAppMainActivity.class); activityToStart.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, activityToStart, 0); notification.setLatestEventInfo(context, context.getText(titleTextID), text, contentIntent); mNM.notify(resID, notification); } With greate hope, Tina -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] regarding onretainnonconfigurationinstance
On Wed, Jan 26, 2011 at 7:27 PM, som som.mukhopadh...@googlemail.comwrote: which means onretainnonconfigurationinstance should return an array of objects. does the API support it? how can i do this? What does the function return? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to Add Item Status Bar Dropdown Menu/List?
On Wed, Jan 26, 2011 at 9:36 PM, AndroidDevTime androiddevd...@gmail.comwrote: I would like to place an item in the Status Bar Dropdown List. How can this be done? By reading the documentation: http://developer.android.com/guide/topics/ui/notifiers/notifications.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Custom Status Bar Icons Lifecycle
On Wed, Jan 26, 2011 at 9:39 PM, AndroidDevTime androiddevd...@gmail.comwrote: Is this the right way however to maintain icons in the status bar over a period of time like to duration that my app is running? Yes. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android SDK is so slow that is ridiculous.
I agree, the SDK itself is slow, not just the emulator. I've noticed that with every release of the SDK it gets slower. -niko On Jan 27, 6:56 am, sblantipodi perini.dav...@dpsoftware.org wrote: Performance problem on android SDK isn't related on what you are talking here. Android SDK is so slow also with android 2.2 and 2.2. The SDK uses only one core and this is a shame. Too slow for everything that needs more power than a fart app. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Developer Position for a NY Based Internet Company
I've never heard of a software *development* position that's stuffed into a mid-shift or night-shift slot. Either you're really advertising for operations technicians to be on call for those hours, or you are expecting a groundbreaking work environment where collaboration is excercised primarily with calls to offshore outsource labor in a remote timezone. Nothing wrong with global economy and all that, but it's hard to tell what you're really seeking in candidates. Can you give more info on your unusual ad in this regard? On Jan 27, 6:45 am, Kim Abunado kim.abun...@gmail.com wrote: Hi There, SourcePad is a New York City based Internet company focusing on outsourcing services for SME. Our company practices a groundbreaking work environment where collaboration is exercised throughout all levels of the company. We are expanding rapidly and have now worked with 50+ clients! We currently have more Mobile work than we can handle and need to grow our team! We have positions for both Mid-shift Night-Shift, so, if you are smart, excited about Mobile development and want to potentially double your salary...we want you to join our team! If you are interested, please email Kim at k...@sourcepad.com or text at 0916.496.83.46 Look forward to speaking with you! Kim Abunado Recruiting Manager SourcePad LLC 0916.496.8346www.sourcepad.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] About Live Wallpaper
On Mon, Jan 24, 2011 at 11:56 PM, Dilipkaklotar dilipkaklo...@gmail.comwrote: /res/raw the /raw folder contain my images Images should be in the drawable folder. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] simple image question from a noob
On Tue, Jan 25, 2011 at 4:35 PM, TJ tjlundgre...@gmail.com wrote: I am trying to create a very simple application that displays an image when you click a button. Displays an image *where*? On the button? In the title area? On a separate device? On your computer? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: High sensor usage in stand by
D-le Alex, you should learn to read between the lines :) Here is a snapshot from a phone I had once: PID CPU% S #THR VSS RSS PCY UID Name 2383 40% S 5 6340K760K fg compass /system/bin/some sensor server 3004 18% S15 240340K 31352K fg app_90 gpsstatus app from the market 2941 16% R 9 224140K 22656K bg app_87 my_top_secret_app_:) 2465 10% S64 336464K 62780K fg system system_server 3033 1% R 1844K412K fg root top As you can see the system process eats 40% of the CPU which is way too much for sensor reading task. Now, I'm not sure if it was a production phone or a development device with root access - this is why the phone name is not disclosed. But it is an example of how bad the low level sensors stuff could be implemented. Most likely they poll data from the port instead of waiting for an event. I did sensors porting once and pretty much sure this task should not take such large amount of CPU. Now, back to your case. List the top 10 CPU-eating processes and see if you have similar picture to the one above. If yes, then accept this as a feature of the phone and check on another one ;) On Jan 27, 8:38 am, Alex Munteanu alex.munte...@gmail.com wrote: Yes, is not there. On Jan 27, 6:23 pm, ip332 iprile...@gmail.com wrote: Did you check CPU usage using adb shell top ? On Jan 27, 2:42 am, Alex Munteanu alex.munte...@gmail.com wrote: Similar to:http://groups.google.com/group/android-developers/browse_thread/threa.. Please help On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote: I'm struggling to find the root cause of a problem that occurs apparently randomly in my application. I have a listener registered for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast I unregister the listener, and on Screen ON a register it again. From time to time, after phone reboot, or maybe unplug, while the most of the time the phone is in stand by I get a high sensor usage in phone information (along with high battery use associated with my app...) In logcat I find lines like this just before Screen OFF : 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener: alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor These are some kind of errors that shows that the Listener could not be unregistered ? If yes, why and what can I do ?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] System Bar location and height in Honeycomb?
You can't. Don't use Display.getWidth()/Height(), and you will be fine. This is one of the reasons I have been saying for years to not use the raw Display dimensions to do UI layout. If you aren't using Display to get dimensions, some more details about you are doing are needed. Apps will never be given any space on the screen that infringes on the system bar or otherwise have any idea it is there. On Thu, Jan 27, 2011 at 3:29 AM, blindfold seeingwithso...@gmail.comwrote: How can I find the location (bottom or top) and height of the System Bar (status bar) in Honeycomb? In compatibility testing of my app I find that I get some vertical offsets in screen locations wrong in Honeycomb, apparently because I did not yet account for the System Bar at the bottom of the screen in Honeycomb. 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb SDK
You shouldn't be building production apps against an in-development version of the platform. If you build against one of the other production versions of the platform, that is fine. On Thu, Jan 27, 2011 at 12:53 AM, String sterling.ud...@googlemail.comwrote: From the release notes: - You *cannot* publish an application that's built against the preview SDK—you can only run an application built against the Preview SDK on the Android emulator. I take this to mean that, if I install the preview SDK, I can't publish ANY apps from that installation - even if the android:targetSdkVersion = 9. Which means that, without a spare high-end machine to throw at it, the preview SDK is useless to me (and I'm sure, many others). Or am I reading this wrong? Is the publishability actually controlled by the android:targetSdkVersion value? Xavier? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] DDMS Screen Capture won't work for WVGA854?
And with more testing, I've found that it only works intermittently. Also, if there is any animation happening, it often grabs the screen during a refresh, so 1/2 the screen is from the previous frame. Looks pretty crappy. On Sun, Jan 23, 2011 at 2:02 PM, John Lussmyer johnlussm...@gmail.comwrote: Yes. And on the 3rd try, it finally worked. 2011/1/23 Kostya Vasilyev kmans...@gmail.com Did you select the emulator in the list before clicking the capture button? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Built-in resource unexpectedly not found
On Wed, Jan 26, 2011 at 5:34 PM, H m...@howardb.com wrote: I suspect that the user has (e.g.) rotated the phone and at that split moment, the activity is being dropped and restarted by android. But things running in other threads may still linger and if they try to access app resources, the context may respond with resource not found while it is temporarily in a limbo state. I think there are other scenarios that could also cause this - maybe a user exiting an app while a thread is still running and again the resources are no longer retrievable but a running thread tries to access them before it is shut down by android. That's not how things work. There is only one Resources object created for you for your .apk in your process. When a configuration change happens, its configuration is just updated. When that happens, it just flushes out any previously cached resources it had (holding an internal lock while doing so), so the next request will re-load it with the new configuration. Also, on the shipping platform fundamental resources like button images are pre-loaded in zygote, so they never need to be loaded by apps. It is very odd that you would ever see in your app even an attempt to load the standard button image. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] openFileOutput, FileNotFoundException
On Tue, Jan 25, 2011 at 6:56 AM, Michael dahl.mi...@gmail.com wrote: Som alla andra (tydligen) så får jag FileNotFound på raden där jag kör openFileOutput. Borde det inte funka i en activityklass? Vad tusan är fel? Jag har läst trådar till förbannelse men hittar ingen lösning. You may want to try that again in English. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb SDK
It works the following way: - you can keep building your project against a previous version and install it on the Honeycomb emulator. - if you compile against the Honeycomb APIs then it can only be installed on the Honeycomb preview emulator (because to build you have to put Honeycomb in the minSdkVersion of your manifest instead of an integer). This is because the current platform is tagged as being a preview. Those APIs are likely to change so we don't want you to publish something that will crash on the final version of Honeycomb. On Thu, Jan 27, 2011 at 12:53 AM, String sterling.ud...@googlemail.com wrote: From the release notes: You cannot publish an application that's built against the preview SDK—you can only run an application built against the Preview SDK on the Android emulator. I take this to mean that, if I install the preview SDK, I can't publish ANY apps from that installation - even if the android:targetSdkVersion = 9. Which means that, without a spare high-end machine to throw at it, the preview SDK is useless to me (and I'm sure, many others). Or am I reading this wrong? Is the publishability actually controlled by the android:targetSdkVersion value? Xavier? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why cant I install an apk from asset folder
Hello All, @Marcin : I don't want much user interaction thereby dont want to copy t the SD card. @Sarwar, the apk is 1586 KB Its just that Y apk is a service and when the users are using I didn't want them to have the trouble of installing both On Jan 27, 5:24 am, Brill Pappin br...@pappin.ca wrote: I don't know if its possible or not, but I kind of hope not. It would be the perfect way to installed a worm on a phone. I think the use needs to take direct action. - Brill Pappin On Jan 27, 2:06 am, Titus titus.mor...@gmail.com wrote:t Hello, I have an X.apk which contains another Y.apk within is asset folder. While X activity is trying to install the Y.apk android shows a parsing error while installation. The Error message shown on the UI is There is a problem in parsing the package, while the adb logs shows WARN/PackageInstaller(270): Parse error when parsing manifest. Discontinuing installation. The same Y.apk if i put in another location (data/data/Y.apk) i can install fine from X.apk. Is there a reason why Y.apk can't be put in asset folder ? or is there a neater way to do this ? thanks for your inputs, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Views with the same dip width number have different widths in appearance
On Tue, Jan 25, 2011 at 12:56 PM, Michael Smith msmith10...@gmail.comwrote: I'm wondering if there is an explanation for this or a way around it. http://developer.android.com/guide/practices/screens_support.html Very last section. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Built-in resource unexpectedly not found
On Wed, Jan 26, 2011 at 7:55 PM, Bob Kerns r...@acm.org wrote: Just to be very clear about it -- given the current reality, I suggest viewing all firmware-defined resources as, well, infirm. No. Any resources that are in the public SDK are officially supported resources, there for you to use. Of course any that are not in the public SDK (that is you are accessing them from com.android.internal.R or the resource XML trick involving '*'), then you put yourself at risk for breaking. In fact with the way resources work, you are guaranteed to be broken on everything except the exact build you are compiling against when using non-public resources. The resource compiler dynamically assign the resource identifier for these, so they are basically random, and change constantly. The standard platform has a number of common drawables in the public resources, including the button background: http://developer.android.com/reference/android/R.drawable.html There are also a number of styles you can use in your XML to get even more consistent behavior with the default widgets: http://developer.android.com/reference/android/R.style.html And, often best, the theme has attributes you can use to get a variety of standard visuals, styles, and other appearances that are appropriate for the current theme: http://developer.android.com/reference/android/R.styleable.html#Theme For example, if you have a View that you want to be styled like a button, you can write in XML something like this: com.foo.MyView style=?android:attr/buttonStyle / -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] the command add to home screen
On Tue, Jan 25, 2011 at 11:24 AM, WINDRUNNER windrunne...@gmail.com wrote: what command in activities would i be looking for? showDialog? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: apkbuilder ?
If you're just getting started you really shouldn't try to make your own build scripts. Therefore you should use the normal Ant build system, or Eclipse. Lots of info at http://developer.android.com/guide/developing/other-ide.html and http://developer.android.com/guide/developing/eclipse-adt.html Xav On Thu, Jan 27, 2011 at 3:27 AM, Bachowny Plamborgs bacho...@gmail.com wrote: Argh you people are unbelievable! WHAT is the replacement? WHAT ant command should I call, or failing that WHAT Java class can I start other than ApkBuilderMain? Seriously, it's great to put a massive deprecation notice into everyone's build script, but at some stage people might want to know how to get rid of it! I'm no expert on Android, just trying to get started using the tools for my IDE. I'm sorry, but this is like the 18 trillionth thread I've found saying yes, yes, it IS deprecated, isn't it... FOR THE LOVE OF ALL THAT IS SACRED WHAT REPLACED IT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why cant I install an apk from asset folder
@Marcin : I don't want much user interaction thereby dont want to copy t the SD card. @Sarwar, the Y.apk is 780 KB and thereby i can see that aapt is not trying to compress the Y.apk. On Jan 27, 5:24 am, Brill Pappin br...@pappin.ca wrote: I don't know if its possible or not, but I kind of hope not. It would be the perfect way to installed a worm on a phone. I think the use needs to take direct action. - Brill Pappin On Jan 27, 2:06 am, Titus titus.mor...@gmail.com wrote:t Hello, I have an X.apk which contains another Y.apk within is asset folder. While X activity is trying to install the Y.apk android shows a parsing error while installation. The Error message shown on the UI is There is a problem in parsing the package, while the adb logs shows WARN/PackageInstaller(270): Parse error when parsing manifest. Discontinuing installation. The same Y.apk if i put in another location (data/data/Y.apk) i can install fine from X.apk. Is there a reason why Y.apk can't be put in asset folder ? or is there a neater way to do this ? thanks for your inputs, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Built-in resource unexpectedly not found
On Thu, Jan 27, 2011 at 12:21 AM, Mark Carter mjc1...@googlemail.comwrote: As a test, building against SDK 9, I compiled an APK referencing @android:drawable/presence_video_away which was introduced in SDK 9. Then I ran the APK on a SDK 4 emulator and got an exception indicating resource not found (as above). However, it referenced a seemingly random resource (one defined in the APK). This problem was raised here 8 months ago: This isn't really a problem; it is working as intended. You are using something from a newer platform that doesn't exist on an older platform. What do you expect to happen when you run on the older platform? The older platform never knew what this thing was. It turns out that there are a lot of drawables in the platform that aren't in the SDK, so you are using a larger resource number than what was publicly defined in the older platform, ending up with (pretty randomly) one of its private drawables. If you are using new APIs and trying to run on an older platform, you just need to make sure that you don't try to use them when on the older platform. This applies to Java APIs as well as resources. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Renderscript documentation
As romain said, more information will come with the final SDK for Honeycomb. Renderscript also requires special build steps that are not ready in the SDK Tools. Xav On Wed, Jan 26, 2011 at 9:54 PM, Peter Eastman peter.east...@gmail.com wrote: Is there any documentation available for Renderscript? I downloaded the SDK docs, but aside from the Javadocs (which aren't very enlightening), it doesn't seem to be mentioned at all. What are the capabilities of Renderscript? When would it make sense to use it instead of OpenGL? Peter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: PreferenceActivity how to display ListPreference value
Not sure what you mean by use gmail. Howerver I just found the new google groups web interface that seems to have a wiki-ish kind of editor. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Eclipse Stuck at Android SDK: Resolving error markers
On Tue, Jan 25, 2011 at 12:04 PM, paul french paul.french.kir...@gmail.comwrote: Any ideas what the problem might be? Going here http://tinyurl.com/5ujmllq leads to herehttp://www.netmite.com/android/mydroid/2.0/development/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/AndroidClasspathContainerInitializer.java, which indicates that: // In some cases, the workspace may be locked for modification when we // pass here. // We schedule a new job to put the marker after. So make sure your workspace is not locked for modification (i.e., it's writable on disk). Why they don't put this in the error itself is beyond me. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Eclipse Stuck at Android SDK: Resolving error markers
Actually this doesn't make sense. The task Android SDK: Resolving error markers is a job because this is guaranteed to be executed when the workspace can be changed. I'm not sure why it would block and do nothing. (if the workspace was locked, then an exception would be thrown and the job would finish early instead of blocking) However at the end of the job, a refresh is call and this is what I'm thinking is failing to finish. I'm not sure why to be honest. Xav On Thu, Jan 27, 2011 at 9:47 AM, TreKing treking...@gmail.com wrote: On Tue, Jan 25, 2011 at 12:04 PM, paul french paul.french.kir...@gmail.com wrote: Any ideas what the problem might be? Going here leads to here, which indicates that: // In some cases, the workspace may be locked for modification when we // pass here. // We schedule a new job to put the marker after. So make sure your workspace is not locked for modification (i.e., it's writable on disk). Why they don't put this in the error itself is beyond me. - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: PreferenceActivity how to display ListPreference value
On Thu, Jan 27, 2011 at 11:45 AM, jotobjects jotobje...@gmail.com wrote: Not sure what you mean by use gmail. I mean use Gmail as the interface to read and post to the group. There's a setting to get emails (each email, a daily digest, or weekly, I think) so you get emails for each post. And you can send an email to group-name@googlegroups.com to post to the group. I played briefly with the new interface - it's a minor improvement to an atrocious implementation. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Eclipse Stuck at Android SDK: Resolving error markers
BTW this is not a matter of the workspace being not writeable on disk. When Eclipse starts it locks the workspace for modification while plug-ins are loaded and projects opened. This is what the comment talks about. On Thu, Jan 27, 2011 at 9:52 AM, Xavier Ducrohet x...@android.com wrote: Actually this doesn't make sense. The task Android SDK: Resolving error markers is a job because this is guaranteed to be executed when the workspace can be changed. I'm not sure why it would block and do nothing. (if the workspace was locked, then an exception would be thrown and the job would finish early instead of blocking) However at the end of the job, a refresh is call and this is what I'm thinking is failing to finish. I'm not sure why to be honest. Xav On Thu, Jan 27, 2011 at 9:47 AM, TreKing treking...@gmail.com wrote: On Tue, Jan 25, 2011 at 12:04 PM, paul french paul.french.kir...@gmail.com wrote: Any ideas what the problem might be? Going here leads to here, which indicates that: // In some cases, the workspace may be locked for modification when we // pass here. // We schedule a new job to put the marker after. So make sure your workspace is not locked for modification (i.e., it's writable on disk). Why they don't put this in the error itself is beyond me. - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Cannot find my own Apps in the Market
On Thu, Jan 27, 2011 at 6:41 AM, Droid rod...@gmail.com wrote: After 2.2 update I cannot find my own Apps in the android market. OK. Sorry to hear that. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: System Bar location and height in Honeycomb?
Thank you, Dianne. Yes we can - for better or for worse. I have a graphical screen where I track touch locations through getRawY() in relation to my graphics. However, in the mean-time I already fixed my problem using getLocationOnScreen() for my main view, such that along with its getHeight() I do know both bottom and top absolute coordinates. Perhaps an appalling approach, but it now works fine for both the new Honeycomb UI and Android 2.3-. Problem solved. On Jan 27, 6:24 pm, Dianne Hackborn hack...@android.com wrote: You can't. Don't use Display.getWidth()/Height(), and you will be fine. This is one of the reasons I have been saying for years to not use the raw Display dimensions to do UI layout. If you aren't using Display to get dimensions, some more details about you are doing are needed. Apps will never be given any space on the screen that infringes on the system bar or otherwise have any idea it is there. On Thu, Jan 27, 2011 at 3:29 AM, blindfold seeingwithso...@gmail.comwrote: How can I find the location (bottom or top) and height of the System Bar (status bar) in Honeycomb? In compatibility testing of my app I find that I get some vertical offsets in screen locations wrong in Honeycomb, apparently because I did not yet account for the System Bar at the bottom of the screen in Honeycomb. 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to Read Device Properties
I don't know how to read device properties like value of LED? I do know how to write such properties using Notification Manager. So are these write-only properties? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: performance when passing background data to ui thread
I'm actually seeing the handler code show up in my profiler. And I'm passing a lot of small data many times. As the code was initially built for parsing while loading from the network with xml. And not the download then parse json code. In terms of synchronization issues, I use an interface between those pieces of code anyway. So that shouldn't be a problem. On Wed, Jan 26, 2011 at 10:24 PM, Pepijn Van Eeckhoudt pep...@vaneeckhoudt.net wrote: I tend to prefer the handler approach over synchronized methods just because it's less easy to shoot yourself in the foot if only a single thread touches your data structures. Performance wise there shouldn't be any fundamental difference between the handler approach and the synchronized method approach since it's all within the same process. No data copies are occuring in either case. The one thing you might notice is a little bit of additional latency when using the handler as this posts a runnable to the end of an event queue. Pepijn Op 26 Jan 2011 om 21:28 heeft Anders Aagaard aagaa...@gmail.com het volgende geschreven: Thank you! I wasn't sure what was the cleanest way of doing it. And I'm very familiar with threading, just not how java does it (and the synchronized isn't something I'm familiar with from other platforms). I'll try to push some of the sorting/filtering into the threads as well, to reduce amount of time I spend in the main thread. On Wed, Jan 26, 2011 at 8:09 PM, Hari Edo hari@gmail.com hari@gmail.com wrote: If you're sure that all users of the data are within the same process (the same app), then using Java synchronized is the best way to go. However, you will need to be very careful to understand your semaphore dependencies, or deadlock will occur. Not responding is almost as bad as Data corrupted due to bad inter-thread communication. The use of Bundles and/or ContentProviders are to enable inter-process data passing, and to avoid some of the danger of errant deadlock situations. On Jan 26, 10:37 am, neuron aagaa...@gmail.com wrote: Hi I've got an app that spawns of a seperate thread. Parses JSON data into a structure. And passes it back to the main thread through a handler. Each part of data is sent through the handler individually. That worked fairly well with my previous XML parser, as XML parses data while it downloads. But JSON doesn't (atleast I haven't found a way to get that working). In either way the JSON data is much smaller and much faster to parse. I've recently added a feature that requires me to load several sources of json in parallel, parse in the background, and pass all the data back again using a Handler. This is a bit slower than I was hoping. Would it be faster (and possible) for me to do this: BackgroundThread extends Thread { onCreate (Parent) { this.parent = parent; } onData { parent.addParsedData(x); } } Parent extends ListActivity { ListAdapter list; onCreate { setListAdapter(list); new BackgroundThread(this); } public synchronized addParsedData(data) { list.add(data) } } I'm thinking this won't be thread safe, as ListAdapter is in the parent thread. Am I right? Should I instead inside the listadapter (which puts data in an array) have synchronized access to it's items? -- 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.comandroid-developers@googlegroups.com To unsubscribe from this group, send email to android-developers%2bunsubscr...@googlegroups.com android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en http://groups.google.com/group/android-developers?hl=en -- Weeks of coding can save you hours of planning. - http://code.google.com/p/aagaande/http://code.google.com/p/aagaande/ -- 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at
Re: [android-developers] Eclipse Stuck at Android SDK: Resolving error markers
On Thu, Jan 27, 2011 at 11:53 AM, Xavier Ducrohet x...@android.com wrote: BTW this is not a matter of the workspace being not writeable on disk. When Eclipse starts it locks the workspace for modification while plug-ins are loaded and projects opened. This is what the comment talks about. Ah. Thanks for the clarification. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Honeycomb surprising result for WallpaperManager.getDesiredMinimumHeight()
Any one? I would also be happy to hear any kind of educated guess on the issue On Jan 27, 1:26 am, Shai levys...@gmail.com wrote: Hi, In the new Android 3.0HoneycombPreview emulator WallpaperManager.getDesiredMinimumHeight() returns 1408. getDesiredMinimumHeight=1408 getDesiredMinimumWidth=1920 The 1408 result is a bit surprising, is this planned ? is there any special reason the desired Height is 1408 and not just 1400 ? Thanks, Shai Levy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Couple of Honeycomb API errors
Hi! Thanks for your feedback. android.database.sqlite.SQLiteDatabase.getAttachedDbs() returns ArrayList instead of List We'll get this fixed. android.os.AsyncTask onCancelled() uses the UK spelling of the word where everywhere else in the API, the US spelling variations are used. It's not just Canceled vs. Cancelled, but *ize vs. *ise. Yeah we noticed this in the API review. Unfortunately this *is* consistent with the other APIs on AsyncTask (and probably not coincidentally, the standard Java APIs like Future that AsyncTask is implemented on top of). :/ We decided it was better to keep the AsyncTask APIs self-consistent, rather than inconsistently consistent with other Android APIs. :} -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb surprising result for WallpaperManager.getDesiredMinimumHeight()
These are just returning the values that the current home-screen set; they can be the same size as the longest size of the screen, or any size larger, depending on the kind if parallax scrolling the current home screen wants to do. On Thu, Jan 27, 2011 at 10:40 AM, Shai levys...@gmail.com wrote: Any one? I would also be happy to hear any kind of educated guess on the issue On Jan 27, 1:26 am, Shai levys...@gmail.com wrote: Hi, In the new Android 3.0HoneycombPreview emulator WallpaperManager.getDesiredMinimumHeight() returns 1408. getDesiredMinimumHeight=1408 getDesiredMinimumWidth=1920 The 1408 result is a bit surprising, is this planned ? is there any special reason the desired Height is 1408 and not just 1400 ? Thanks, Shai Levy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en