[android-developers] progress dialog
I am having a little problem of using progress dialog. Trying to figure out how and the optimal way of using the progress dialog. My application needs to grab information from different servers, so I am trying to show the progress dialog at the appropriate moment. I am trying to use a gallery to grab different images. At the start of the activity, I will have a pop up that says loading, and then spin off a different thread to start retrieving images in the background and store the images in a bitmap array. And once I get the first few images, the thread would send a message to the activity to let it know that it can set up the adapter and start displaying the first few images. The user then can start flipping through different images. In the adapter getView method, I will check the bitmap array from the thread to see if the image in the specific position that the user is trying to view is loaded yet. If the bitmap array for the position is null then the adapter will send a message to the activity and asks the activity to display the progress dialog and at the same time the adapter will tell the thread that the user is trying to view the image at that specific position. Then the thread will then send a message to the activity to dismiss the progress dialog once the image of that specific position has been loaded. That's the general idea, but for some reason the message been sent from the adapter to the activity for showing the progress dialog is not working. I can see the message been send because the logging is been printed out in the message handler but the dialog is not showing up. Anyone has a clue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Comment spam in android market :(
I think the market comments are completely different from those on youtube. I've used the market comments to see what the general opinion was about a few apps that had similar purposes. Apps with comments like fails miserably when you press the 'a' button tended to be pretty helpful. -- Andrew Burgess Sent from my T-Mobile G1 On Nov 11, 2008 12:20 AM, plusminus [EMAIL PROTECTED] wrote: Comments with bad ratings get hidden and need to be expanded by the user -- Almost no one will see them anymore +1 for Comment-Rating-System On 11 Nov., 00:10, zl25drexel [EMAIL PROTECTED] wrote: well the ratings/comments now are jus... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shares Preferences are not getting deleted
Hi Sudha, Thanks for your reply. Just now I came to my place. Before that I was in meeting. Hey, I have done one application. It will play a song(Airtel) if the SMS reached the mobile. Demerit : The user is not able to hear their favourite song. So I would like to allow the user to select a song from SD card then that song will be played whenever the SMS reaches the mobile\emulator. For this, I've modified my application. But activities happend in the following way, 1. SMS Reached Mobile. 2. Display the list of Song from SD card.(Using ListView) 3. Select the song automatically it will play. *FYI : I'll send the source code for above things.* But the above thing is not good know. Since, the user would like to select a song before SMS received not after they received SMS. So I would like to change it as follows, 1. Display a list of Songs 2. Select any one of song (I need to store that song using Shared Preferences) 3. Play the song whenever SMS reached the mobile(Here, I will get the name of song from the Preferences) For this, How I'll include shared preference U just send your application code \ tell the steps Thanks for your time!!! I'm waiting for your reply..So Please.. Thanks again!!! Yasmin On Tue, Nov 11, 2008 at 1:12 PM, Sudha [EMAIL PROTECTED] wrote: hi what I did is I created a sharedpreference to store my application data.. when the application is deleting..its not removing the data stored. just like our desktop application.. thats the problem faced by me.. so I want toknow is there nayway to do that.. Plz mention ur problem so that I can help u -- Everything is Possible For U only --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to run AT Commands on Emulator
ok, I'll look into it On Nov 6, 7:08 am, AlexZhang [EMAIL PROTECTED] wrote: SDK1.0 does not seem work with the option of -radio, but old SDK works! On Nov 3, 11:06 pm, David Turner [EMAIL PROTECTED] wrote: try emulator -help-radio On Mon, Nov 3, 2008 at 9:52 AM, Abraham [EMAIL PROTECTED]wrote: HI All, I would like to fine out if Android emulator provided along with SDK1.0 allows the users to send AT commands to perform some action. If some has tried this, could someone pls let me know how this can be achieved. Thanks --Abraham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Games
Can any one give some idea in developing some gaming projects in Android --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Anybody analyzing media player library
Hi All, Anybody trying to understand how the media player works? How the media player library(external\opencore\protocols\http_parcom \*.*) are linked with the framework media files(frameworks\base\media \*.*)? How the content is passed back from library to framework or application? Anybody looking into this please share your knowledge on this. regards Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shares Preferences are not getting deleted
Hi shared preferences are very simple. 1.create it prefereceObj = context.getSharedPreferences(preferenceName, modeOfAccess) 2.to write the data 1.obtain the editor Editor edr= prefereceObj.edit(); 2.use edr.putString(key, value)..putBoolean etc etc 3.edr.commit() 3.to read it prefereceObj.getFloat(key, defaultvalue if the pref/key is not there); 4.that it... but I am not getting my answer... mine is like a game application.if u ones delete the game.. the data will be there and if you reinstall it teh game is using the old data.. thats bad... how to do it... its behaving like ur desktop application..if u delete the front end the back end will be there.. hmmm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Two Notifications
On Nov 11, 2:39 am, hackbod [EMAIL PROTECTED] wrote: Perhaps think about doing something like the calendar app, where selecting the notification brings you to a list of the interesting things behind it. Well, that's kind of what I was hoping to achieve by having one icon pop up multiple notifications in the screen that slides down when you pull down the task bar icon. I can do that, but it shows two icons rather than one. My problem is not the notifications, my problem is that I get two icons for one Notificationmanager where I need one icon. On Nov 10, 4:06 pm, Christine [EMAIL PROTECTED] wrote: Just got an email from a user who says why can't the app just start right when you click the task bar icon. If that could be done, my app would have one icon per action. But the user gets these bars that come down, where you can put multiple notifications. So what you want is one icon, even if you have multiple notifications at the same time. I want to keep both of them, because they represent different user actions. What bothers me is that you have multiple bars appearing, but why do you get multiple icons also? It looks very cute, a whole series of tweeting birds in the task bar, but I don't think a user appreciates that, after an initial smile :-) On Nov 11, 12:27 am, Peli [EMAIL PROTECTED] wrote: Can't you simply remove your existing notification before you add the new one? Peli On Nov 10, 11:14 pm, Christine [EMAIL PROTECTED] wrote: How can I send two Notifications to one NotificationManager in a way that I get only one icon for that NotificationManager? What happens now is that you get a second icon for the second notification - and a third, fourth, etc. I've seen this question before, but I don't think it got answered? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Pay app support?
Or you could have a demo version for free which is crippled or only a partial app then the full app which is the paid version. On Nov 10, 7:18 pm, Jesse Scherer [EMAIL PROTECTED] wrote: If you absolutely must offer a trial, and the Market won't support it, you could offer a trial version of your app with some sort of kill switch (the application sets a flag and tells itself to stop working after 10 days) and a paid version that does not do this. It would not prevent a truly determined person from circumventing your terms, but given the nature of Android, why couldn't somebody just hack the Market app to ignore trial periods anyway? My 2c Jesse On Mon, Nov 10, 2008 at 7:10 PM, Christine [EMAIL PROTECTED]wrote: Hopefully, they will allow a trial period. iPhone market doesn't allow that, so you're forced to either charge for the first download, or make the app free. On Nov 10, 9:52 pm, Eric [EMAIL PROTECTED] wrote: It was announced that a 30% cut of the Market price will be paid to the carrier(s), and the remaining 70% will be paid to the developer. You can also sell apps through venues other than the Market, and avoid the 30% cut, but it seems likely that most phone owners will only look for apps in the 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Pre settings for each application
With in that URL, which application I need to go through... SInce lot of examples are there. :( Perhaps if you search for 'SharedPreferences'? Perhaps if you look through the sample applications and API demos that came with the SDK? A simple search for 'SharedPreferences' turns up many examples. - michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AlarmManager.RTC_WAKEUP Not Waking Device?
Interesting... I'll give that a shot. Thanks. On Nov 11, 3:51 am, hackbod [EMAIL PROTECTED] wrote: It does wake it up, but you are going to need to hold a wake lock to keep the device awake after your intent receiver returns. On Nov 10, 11:14 pm,g1bb[EMAIL PROTECTED] wrote: Hello, I've been trying to use AlarmManager.RTC_WAKEUP to wake up my device while it's sleeping, and then play some sounds. It seems like when it's charging, this works fine, but when it's not, the service doesn't start until I hit the menu button and am presented with the lock screen. Also, this seems to be working fine in the emulator, but not my real phone. Here's the alarm scheduling: ntent intent = new Intent(Main.this, OneShotAlarm.class); PendingIntent sender = PendingIntent.getBroadcast(Main.this, 0, intent, 0); // We want the alarm to go off 30 seconds from now. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, 60); // Schedule the alarm! AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender); - The OneShotAlarm BroadCastReceiver: public class OneShotAlarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, OneShotAlarm Broadcast invoked, 1000).show(); intent = new Intent(context, ServiceClassToRun.class); context.startService(intent); } - The Service: public class ServiceClassToRun extends Service { protected static final int Rnd = 0; public void onStart(Intent intent, int startId) { //do some business here } - And finally, my manifest: receiver android:name=.OneShotAlarm android:process=:remote / service android:name=.ServiceClassToRun / Any ideas are greatly appreciated. Has anyone else experienced this as well? Thanks in advance.- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: no callback to onItemClick() on clicking my ListView
Add some id or attribute to your Button which has the information about the List item - say the position or index of the list item. So when a button click is received, you not only get the button clicked but also the position in the list. Maybe this will help. I am not sure if Android allows event bubbling and capture like in Javascript. - Sunit On Mon, Nov 10, 2008 at 5:24 PM, Nickname [EMAIL PROTECTED] wrote: Hi, Romain and Sunit. Thanks for replies from you both. My app needs to get both callbacks from the Button as well as from the other area of a ListView item. Right now, I use a onClick listener to the LinearLayout of every ListView item. It works so far :-) On Nov 10, 8:34 am, Romain Guy [EMAIL PROTECTED] wrote: If you put a focusable View inside a list item, then the list item will not be clickable. You would have to set a click listener on the button for instance. On Sun, Nov 9, 2008 at 10:18 PM, Nickname [EMAIL PROTECTED] wrote: One of my ListView's has a Button view on every item's LinearLayout. I just found that clicking on any item of the ListView does not callback its onItemClick(), which is set thru ListView.setOnItemClickListener(). If I remove the Button view from item layout, callback is ok then. Can anybody advise me how I get the callback on the ListView with Button? Thanks. -- Romain Guywww.curious-creature.org -- - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: disable home button
anyone? On Nov 10, 9:53 pm, zl25drexel [EMAIL PROTECTED] wrote: so how did the toddlers lock disable the home button? On Nov 10, 9:41 pm, Romain Guy [EMAIL PROTECTED] wrote: Not if the app starts on boot. (You can always boot in safe mode but still... it's annoying.) The Home key is the best way for the user to go back to a familiar place. That's why pressing Home twice, no matter where you are, will always take you back to the center screen on Home's desktop. On Mon, Nov 10, 2008 at 6:26 PM, zl25drexel [EMAIL PROTECTED] wrote: you only need to restart the phone. On Nov 10, 8:51 pm, Mark Murphy [EMAIL PROTECTED] wrote: zl25drexel wrote: why is making the screen lock actually lock evil? 1. If the app has a bug, and won't unlock, the user is hosed 2. If the app is malicious, and won't unlock, the user is hosed The Google team has tried to minimize any chance of a rogue application causing problems, particularly permanent ones. This approach has trade-offs; making it difficult to disable the home button is one of those. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Connect via USB resets prefs
Now I'm not sure what clears my preferences. I've tested the USB connection theory and it is quite inconsistent. Has anyone else experienced a loss of preference state in their apps? Thanks, Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Comment spam in android market :(
Agreed. Something needs to be done. I think google could allocate one employee to scanning the comments for now and perhaps banning/ warning users who made inappropriate comments from commenting? On Nov 11, 8:29 am, Al Sutton [EMAIL PROTECTED] wrote: Ratings are always a highly subjective thing which is why AndAppStore hasn't included them . My 2/5 might be your 3/5 for no other reason than I've seen better elsewhere that you haven't, your 4/5 may be my 2/5 just because you like a colour scheme that I don't. You can't say people can only rate lower than 3 if they type a long comment because you'll end up with junk comments just to pad the space, and if you're going to say 300 characters for below 3, why not 300 characters for above 3 so people have to justify high rating to avoid attempts to bump apps to the top of the popular list. Al. Protocol-X wrote: Yes it is rediculous, There is swearing, racial slurs, comments about body parts, all randomly out of nowhere. Google needs to kill the comments from being displayed so that only the app creator can see them and the rating system is defunk as well because people are ratting 1;'s because they dont understand apps or there is a german online book being rated ones because people are commenting its stupud because its in german... what do u expect even the descripion is German if u cannot see this was in German dont rate it poorly.. these are all situations and issue that need to be worked out. or require atleast a 300 character comment inorder to rate lower than a 3 so people are not just rated unfairly because of immature people. On Nov 11, 5:56 am, Al Sutton [EMAIL PROTECTED] wrote: I can see this as a good idea so I've comment ratings into AndAppStore.com, sorted the displayed comments by ranking, and show 5 at a time. It took me a couple of hours to put the code together, so I'd hope that the guys at google can do something similar for marketplace in the next few days. Al. plusminus wrote: Comments with bad ratings get hidden and need to be expanded by the user -- Almost no one will see them anymore +1 for Comment-Rating-System On 11 Nov., 00:10, zl25drexel [EMAIL PROTECTED] wrote: well the ratings/comments now are just the same as the ratings/ comments on youtube. does any1 ever reads them? On Nov 10, 4:29 pm, Andrew Burgess [EMAIL PROTECTED] wrote: On Mon, Nov 10, 2008 at 4:18 PM, Disconnect [EMAIL PROTECTED] wrote: ..or just punt out users for ToS violations. On Sat, Nov 8, 2008 at 3:24 PM, ryaninc [EMAIL PROTECTED] wrote: I wholeheartedly agree. The comments are invaluable for determining how well an application works, but it's almost to the point where the comments are worthless because there's so much spam and completely off- topic discussion. While I don't like comment moderation as a whole, there should be automatic filtering at the very least. Maybe Google could implement a filter that would delete comments with swear words, or even just turn them into asterisks. There really needs to be a solution to this, it's really getting bad. :-( Perhaps an implementation similar to many online retailers where users can say whether a review was helpful. Comments that others found helpful in making their decision could be floated to the top (or at least supply a sorting option/preference) so that it's easier to find more useful information. Similarly, a comment with enough bad feedback could be put up for some sort of review, and if deemed acceptable, the offending user could have comment privileges banned for some period of time. -- Andrew Burgess -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries.- Hide quoted text - - Show quoted text - -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Pay app support?
Some applications have already implemented the expiration date and have been cracked already. The Android Market seems to be rather secure, the problem seems to be in the developers coding of protection schemes in products... A registration method with online check would probably be your best bet. On Nov 10, 8:18 pm, Jesse Scherer [EMAIL PROTECTED] wrote: If you absolutely must offer a trial, and the Market won't support it, you could offer a trial version of your app with some sort of kill switch (the application sets a flag and tells itself to stop working after 10 days) and a paid version that does not do this. It would not prevent a truly determined person from circumventing your terms, but given the nature of Android, why couldn't somebody just hack the Market app to ignore trial periods anyway? My 2c Jesse On Mon, Nov 10, 2008 at 7:10 PM, Christine [EMAIL PROTECTED]wrote: Hopefully, they will allow a trial period. iPhone market doesn't allow that, so you're forced to either charge for the first download, or make the app free. On Nov 10, 9:52 pm, Eric [EMAIL PROTECTED] wrote: It was announced that a 30% cut of the Market price will be paid to the carrier(s), and the remaining 70% will be paid to the developer. You can also sell apps through venues other than the Market, and avoid the 30% cut, but it seems likely that most phone owners will only look for apps in the 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Signing Apps for a external testing group
Hi All, I want to sign my application to let a group of tester install it to there mobiles. Is it possible to create certifications with limited time of use for the test people. Or can I use the existing signing method with a validity period from 60 days? I need a new certification, or? Is it possible to re-install a app with a different certification? Or should I give them the app with the dev-certification? Greetings WampBier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AlarmManager.RTC_WAKEUP Not Waking Device?
Another question on this: Have you seen the Stopwatch application developed by Tom Taylor? I just downloaded it, and it keeps counting after the phone is put to sleep entirely. Any ideas on how he's doing that? I'm looking for that kind of functionality. Thanks again. On Nov 11, 3:51 am, hackbod [EMAIL PROTECTED] wrote: It does wake it up, but you are going to need to hold a wake lock to keep the device awake after your intent receiver returns. On Nov 10, 11:14 pm,g1bb[EMAIL PROTECTED] wrote: Hello, I've been trying to use AlarmManager.RTC_WAKEUP to wake up my device while it's sleeping, and then play some sounds. It seems like when it's charging, this works fine, but when it's not, the service doesn't start until I hit the menu button and am presented with the lock screen. Also, this seems to be working fine in the emulator, but not my real phone. Here's the alarm scheduling: ntent intent = new Intent(Main.this, OneShotAlarm.class); PendingIntent sender = PendingIntent.getBroadcast(Main.this, 0, intent, 0); // We want the alarm to go off 30 seconds from now. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, 60); // Schedule the alarm! AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender); - The OneShotAlarm BroadCastReceiver: public class OneShotAlarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, OneShotAlarm Broadcast invoked, 1000).show(); intent = new Intent(context, ServiceClassToRun.class); context.startService(intent); } - The Service: public class ServiceClassToRun extends Service { protected static final int Rnd = 0; public void onStart(Intent intent, int startId) { //do some business here } - And finally, my manifest: receiver android:name=.OneShotAlarm android:process=:remote / service android:name=.ServiceClassToRun / Any ideas are greatly appreciated. Has anyone else experienced this as well? Thanks in advance.- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Check for new version of applications
As far as I understand, Google plans something like this for the future (maybe when paid apps start to become possible). For now the developer is left by themselves. We also initially copied an update checker routine in all of our OI applications, but this has 2 major drawbacks: 1) It requires each application to have the INTERNET permission, even though the app itself won't use it. 2) A lot of code is duplicated in the various applications. We have been developing OI Update, an open source update checker, which is ready to be released soon. We wrote it mainly for our own applications, but it is written generally enough to allow other applications to take advantage of it as well easily. Your application only needs to include a small meta-data in your manifest, and you need to keep a file on a server with update information (which can be compatible to VeeCheck; AndAppStore.com can generate that file on the fly). This inconvenience is necessary, because the Market does not provide version information to 3rd party applications (or at least I'm not aware of how to do it). All the rest is handled by OI Update. It checks every couple of days (as set by the user) for updates, and notifies the user. If the user wishes they are then directly forwarded to the Market where they can download the new version. I hope this could clarify a couple of points. Peli www.openintents.org On Nov 11, 3:48 pm, loty [EMAIL PROTECTED] wrote: I'm wondering about the same thing. All applications need to have a simple ability to notify users of new versions. For me 3rd party updaters/checkers is not an option - I can just as easily add simple check against my web site and download new APK file directly. A much cleaner solution is to query Android Market directly for new version. Can anyone illuminate me if this is possible or planned in the future. On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote: So version checking needs to be done through an outside resource... Is there anintentwe can use to launch theAndroidMarketApp directly to the listing for our own app, for when an update is available? On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote: Hi, we have prepared a release version of the OI Updater. There is no need to send intents, but developers only need to add a meta-data node to the application manifest in order to be handled by the updater. Early feedback welcome! Description:http://www.openintents.org/en/node/136 Download:http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk Cheers, Friedger On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote: Because we use a XMPP based application, we chosed Pubsub as a way to notify new versions to the user. The main advantage is that it uses a push model. The user is aware of a new version when he launches the app or in real time if he's online while a new version has just been released. No timer or service at all in the application code. On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote: Currently, relying on an external resource is the way to do updates, this is how it is described in the documentation. If someone is checking againstMarket, please let us know. Friedger On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote: isn't there some way tocheckthe version against theMarketinstead of having to host version information somewhere else? I know the app Locale somehow knows when anupdateis available, it seems reasonable to query theMarketrather than relying on outside sources :\ On Nov 1, 1:50 pm,friedger[EMAIL PROTECTED] wrote: I'd say the package name is the global identifier. Maybe you can just provide a VeeCheck url based on the package name (as alternative to the app id). So I couldcheckthat url. If you don't host an app for the package name or if it is not unique you could return a HTTP 400. Friedger On 1 Nov., 17:37, Al Sutton [EMAIL PROTECTED] wrote: Friedger, How are you identifying the apps?, I'd happily add an extra field or two to the AndAppStore.com data that you can search for if it would be useful. Al. friedgerwrote: The idea is that the Updater will also be ablecheckall applications it knows about by a single button clicked or scheduled task. So, once theintentfrom one application is processed by theUpdateit is possible to include this application to the periodicupdate. A more general solution that includes all installed applications is currently not possible as I can't determine the location of the versioninfo file. The apk mentioned above is provided for developers to test. In the releaseversionthe interval between two checks will be at least 24
[android-developers] locationprovider on/of
Am I correct to assume that registering a locationlistener with a locationprovider will not switch on that locationprovider if it wasn't on already? I don't want my app to swich on gps, but I do want it to get updates when the user or another app switches on gps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Comment spam in android market :(
I can see this as a good idea so I've comment ratings into AndAppStore.com, sorted the displayed comments by ranking, and show 5 at a time. It took me a couple of hours to put the code together, so I'd hope that the guys at google can do something similar for marketplace in the next few days. Al. plusminus wrote: Comments with bad ratings get hidden and need to be expanded by the user -- Almost no one will see them anymore +1 for Comment-Rating-System On 11 Nov., 00:10, zl25drexel [EMAIL PROTECTED] wrote: well the ratings/comments now are just the same as the ratings/ comments on youtube. does any1 ever reads them? On Nov 10, 4:29 pm, Andrew Burgess [EMAIL PROTECTED] wrote: On Mon, Nov 10, 2008 at 4:18 PM, Disconnect [EMAIL PROTECTED] wrote: ..or just punt out users for ToS violations. On Sat, Nov 8, 2008 at 3:24 PM, ryaninc [EMAIL PROTECTED] wrote: I wholeheartedly agree. The comments are invaluable for determining how well an application works, but it's almost to the point where the comments are worthless because there's so much spam and completely off- topic discussion. While I don't like comment moderation as a whole, there should be automatic filtering at the very least. Maybe Google could implement a filter that would delete comments with swear words, or even just turn them into asterisks. There really needs to be a solution to this, it's really getting bad. :-( Perhaps an implementation similar to many online retailers where users can say whether a review was helpful. Comments that others found helpful in making their decision could be floated to the top (or at least supply a sorting option/preference) so that it's easier to find more useful information. Similarly, a comment with enough bad feedback could be put up for some sort of review, and if deemed acceptable, the offending user could have comment privileges banned for some period of time. -- Andrew Burgess -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Two Notifications
Maybe this helps: http://code.google.com/android/reference/android/app/Notification.html#number The number of events that this notification represents. For example, if this is the new mail notification, this would be the number of unread messages. This number is be superimposed over the icon in the status bar. If the number is 0 or negative, it is not shown in the status bar. The idea is to only show 1 notification, also when you slide down the screen, leaving the user with only 1 choice. But this 1 choice directs her to your application where you present a list of possible options (the ones you wanted to show in separate notifications in the first place). Peli On Nov 11, 3:34 pm, Christine [EMAIL PROTECTED] wrote: On Nov 11, 2:39 am, hackbod [EMAIL PROTECTED] wrote: Perhaps think about doing something like the calendar app, where selecting the notification brings you to a list of the interesting things behind it. Well, that's kind of what I was hoping to achieve by having one icon pop up multiple notifications in the screen that slides down when you pull down the task bar icon. I can do that, but it shows two icons rather than one. My problem is not the notifications, my problem is that I get two icons for one Notificationmanager where I need one icon. On Nov 10, 4:06 pm, Christine [EMAIL PROTECTED] wrote: Just got an email from a user who says why can't the app just start right when you click the task bar icon. If that could be done, my app would have one icon per action. But the user gets these bars that come down, where you can put multiple notifications. So what you want is one icon, even if you have multiple notifications at the same time. I want to keep both of them, because they represent different user actions. What bothers me is that you have multiple bars appearing, but why do you get multiple icons also? It looks very cute, a whole series of tweeting birds in the task bar, but I don't think a user appreciates that, after an initial smile :-) On Nov 11, 12:27 am, Peli [EMAIL PROTECTED] wrote: Can't you simply remove your existing notification before you add the new one? Peli On Nov 10, 11:14 pm, Christine [EMAIL PROTECTED] wrote: How can I send two Notifications to one NotificationManager in a way that I get only one icon for that NotificationManager? What happens now is that you get a second icon for the second notification - and a third, fourth, etc. I've seen this question before, but I don't think it got answered? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: no callback to onItemClick() on clicking my ListView
AlarmClock does not select the whole row. It uses two different widgets inside one list item. You can however give the highlight to the entire row by using android:addStatesFromChildren (or something similar, check the documentation of ViewGroup.) On Tue, Nov 11, 2008 at 8:46 AM, Peli [EMAIL PROTECTED] wrote: I have a similar problem. I want to do something similar as the AlarmClock application does (with CheckBox to the right, and clickable area to the left). With the onClick listeners this works in touch mode. Still, using the trackball, the whole row is selected. How can I prevent that and have the clickable area and the checkbox be selectable by trackball? Peli On Nov 11, 3:02 am, Romain Guy [EMAIL PROTECTED] wrote: Test trackball navigation then, it might not work. On Mon, Nov 10, 2008 at 5:24 PM, Nickname [EMAIL PROTECTED] wrote: Hi, Romain and Sunit. Thanks for replies from you both. My app needs to get both callbacks from the Button as well as from the other area of a ListView item. Right now, I use a onClick listener to the LinearLayout of every ListView item. It works so far :-) On Nov 10, 8:34 am, Romain Guy [EMAIL PROTECTED] wrote: If you put a focusable View inside a list item, then the list item will not be clickable. You would have to set a click listener on the button for instance. On Sun, Nov 9, 2008 at 10:18 PM, Nickname [EMAIL PROTECTED] wrote: One of my ListView's has a Button view on every item's LinearLayout. I just found that clicking on any item of the ListView does not callback its onItemClick(), which is set thru ListView.setOnItemClickListener(). If I remove the Button view from item layout, callback is ok then. Can anybody advise me how I get the callback on the ListView with Button? Thanks. -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem with Service Permission
Hi, I am using 0.9 beta SDK. I want to have a service defined within one application to be invokable from another. The application hosting the service has, in its manifest, the following inside the application tag: service android:name=.service.BackgroundService android:process=:remote android:exported=true android:permission=android.permission.ACCESS_BACKGROUND_SERVICE intent-filter action android:name=com.abc.xyz.service.BackgroundService / /intent-filter /service It also has the following inside the manifest tag: permission android:name=android.permission.BACKGROUND_SERVICE android:protectionLevel=dangerous/ In my client application's manifest xml file, I have the following inside manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / The client Activity code has the following API called from its onCreate() method: private void startBackgroundService() { mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.i(TAG, Connected to background service); mService = BackgroundService.Stub.asInterface(service); } public void onServiceDisconnected(ComponentName className) { mService = null; Log.i(TAG, Background service disconnected); } }; Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); startService(intent); boolean result = bindService(intent, mConnection, Context.BIND_AUTO_CREATE); Log.i(TAG, Background service bind result: + result); } When I run the client Activity, it can not bind to the service: - the log statement at the end has Background service bind result: false. - the onServiceConnected() method is not called - There is a waring log from ActivityManager: WARN/ActivityManager(58): Unable to start service Intent { comp={com.abc.xyz.client/com.abc.xyz.service.BackgroundService} }: not found I have tried running the same without any permission in the service application manifest and also without the uses-permission tag in client. The result was the same. But when I run a similar client code inside my service application (without specifying any permissions), it runs perfectly. Finally, the most peculiar thing is happening when I am running this client code inside my service application but with the permissions specified (as written above) in the manifest - it runs with this error at the statement startService(intent): Caused by: java.lang.SecurityException: Not allowed to start service Intent { comp={com.abc.xyz/com.abc.xyz.service.BackgroundService} } without permission android.permission.ACCESS_BACKGROUND_SERVICE Any hint on this will be highly appreciated. I'd also like to know whether I can start and access the service from an ActivityGroup outside the service application domain. Thanks, -Raktim. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
initiateCall is just an Activity. Activity initiateCall = new Activity(); (actually a derived class of Activity with nothing added but debug statements to signal when each lifecycle/callback method is called). On Nov 10, 5:37 pm, dreamerBoy [EMAIL PROTECTED] wrote: Hi - thank you for your reply. Yes, line 254 is just: initiateCall.startActivityForResult(myIntent, CALL_SETUP_ACTIVITY_ID); That is the statement that throws the NullPointerException. On Nov 10, 4:28 pm, Christine [EMAIL PROTECTED] wrote: Your log says that the error is in line 254 of PhoneTestService, if that's a class you wrote. On Nov 11, 1:20 am,dreamerBoy[EMAIL PROTECTED] wrote: Taking a hint from the source code, I tried to implement an Instrumentation class in the hopes that that was what Android was looking for - Added: instrumentation android:targetPackage=test.phone android:name=.PhoneTestInstrumentation/instrumentation and uses-permission android:name=android.permission.RUN_INSTRUMENTATION/uses- permission to the manifest. However, same error. On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote: Thanks for your reply - ha ha, wouldn't that be nice if it were that simple. Nope, I checked the return from the Uri.parse - not null. I got a hold of the Android source code. It is crashing here in Activity.java: public void startActivityForResult(Intent intent, int requestCode) { if (mParent == null) { Instrumentation.ActivityResult ar = - mInstrumentation.execStartActivity( this, mMainThread.getApplicationThread(), mToken, th intent, requestCode); Apparently, mInstrumentation is null. mInstrumentation is set in a routine called attach in Activity.java. I am trying to launch the Activity inside a Service - I don't see anything that says that's illegal. However, clearly, I'm not giving Android something that it wants. Still scratching my head on this one for the time being... On Nov 7, 6:10 pm, Chris [EMAIL PROTECTED] wrote: You don't check if Uri.parse returns null, do you? On Fri, Nov 7, 2008 at 3:53 PM,dreamerBoy[EMAIL PROTECTED] wrote: Hi, I'm attempting to initiate an outgoing call from inside a Service. In onStart(), I create an ACTION_CALL Intent, then attempt to start an Activity myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber)); initiateCall.startActivityForResult(myIntent, CALL_SETUP_ACTIVITY_ID); However, when I run the code I get a NullPointerException. Clearly, the intent and activity are non-null, so I'm wondering what Android is lacking here. 11-07 13:24:19.801: INFO/PhoneTestService(1250): onCreate called 11-07 13:24:19.801: INFO/PhoneTestService(1250): onStart called 11-07 13:24:19.801: INFO/PhoneTestService(1250): doIt called 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): creating initiateCall activity 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): initiateCall is NOT NULL! 11-07 13:24:19.820: INFO/PhoneTestService(1250): phone state is: CALL_STATE_IDLE 11-07 13:24:21.601: INFO/PhoneTestService(1250): starting to listen Fri Nov 07 13:24:19 PST 2008 11-07 13:24:21.622: INFO/PhoneTestService(1250): starting call intent. 11-07 13:24:21.622: DEBUG/PhoneTestService(1250): myIntent is NOT NULL! 11-07 13:24:21.632: ERROR/PhoneTestService(1250): ERROR: java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.doIt(PhoneTestService.java:254) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.onStart(PhoneTestService.java:145) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2429) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.access$3100(ActivityThread.java:112) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Handler.dispatchMessage(Handler.java:88) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Looper.loop(Looper.java:123) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.main(ActivityThread.java:3742) 11-07
[android-developers] Re: Does SoundPool work or has anyone successfully used it?
Thx for the code but I have that onCompletion working with the MediaPlayer already. The problem actually is that the volume is s silent on some files (even after volume-normalizing them). Does anyone which values to choose, calling the following method on a MediaPlayer: -- setVolume(float leftVolume, float rightVolume) Sets the volume on this player. -- I was using 10, as that had been returned once from mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); SoundPool is playing them in the proper loudness. :( But using an unstable API is not what I'd like to do :( On Nov 11, 9:43 am, Robert Green [EMAIL PROTECTED] wrote: Here's an example for managing sounds that will be played many times (like gunshots, explosions, clicks, etc) using a pool and then sounds that are just one-offs, like an announcer or an intro sound. public class MediaPlayerPool { private static final String TAG = MediaPlayerPool; private Context context; private int streamType; private HashMapInteger, ArrayListMediaPlayer pools; public MediaPlayerPool(Context context, int streamType) { this.context = context; this.streamType = streamType; pools = new HashMapInteger, ArrayListMediaPlayer(); } public boolean hasMedia(int resourceId) { return pools.keySet().contains(resourceId); } public void addMedia(int resourceId, int poolSize) { ArrayListMediaPlayer pool = pools.get(resourceId); if (pool == null) { pool = new ArrayListMediaPlayer(); } for (int i = 0; i poolSize; i++) { pool.add(createMediaPlayer(resourceId)); } pools.put(resourceId, pool); } public void playMedia(int resourceId) { ArrayListMediaPlayer pool = pools.get(resourceId); MediaPlayer player = null; if (pool.size() 0) { player = pool.remove(0); } if (player == null) { Log.e(TAG, Pool is empty for resource + resourceId); } else { player.start(); } } public void release() { for (Integer key : pools.keySet()) { ArrayListMediaPlayer pool = pools.get(key); for (MediaPlayer player : pool) { if (player.isPlaying()) { player.stop(); } player.release(); } pool.clear(); } pools.clear(); } private MediaPlayer createMediaPlayer(final int resourceId) { MediaPlayer mp = MediaPlayer.create(context, resourceId); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer player) { player.seekTo(0); returnToPool(resourceId, player); } }); mp.setAudioStreamType(streamType); return mp; } private void returnToPool(int resourceId, MediaPlayer player) { ArrayListMediaPlayer pool = pools.get(new Integer(resourceId)); pool.add(player); } } public class MediaPlayerSoundManager { private static final String TAG = MediaPlayerSoundManager; private Context context; private MediaPlayerPool pool; private HashMapInteger, Integer soundResourceMap; public MediaPlayerSoundManager(Context context) { this.context = context; this.pool = new MediaPlayerPool(context, AudioManager.STREAM_MUSIC); this.soundResourceMap = new HashMapInteger, Integer(); } public void init() { release(); pool.addMedia(R.raw.sound_1, 2); soundResourceMap.put(SOUND_1, R.raw.sound_1); } public void playSound(int soundId) { int resourceId = getResourceId(soundId); if (pool.hasMedia(resourceId)) { pool.playMedia(resourceId); } else { playOneShotSound(resourceId); } } private int getResourceId(int soundId) { Integer resourceId = soundResourceMap.get(soundId); if (resourceId == null) { Log.e(TAG, No resource found for soundId + soundId); }
[android-developers] Re: progress dialog
At the start of your program, do requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); Then when you want to display a rotating little circle in the title bar, do setProgressBarIndeterminateVisibility(true); When updating or whatever is done, do setProgressBarIndeterminateVisibility(false); Of course, you can use other types of progress bars in pretty much the same way. On Nov 11, 9:00 am, chouman82 [EMAIL PROTECTED] wrote: I am having a little problem of using progress dialog. Trying to figure out how and the optimal way of using the progress dialog. My application needs to grab information from different servers, so I am trying to show the progress dialog at the appropriate moment. I am trying to use a gallery to grab different images. At the start of the activity, I will have a pop up that says loading, and then spin off a different thread to start retrieving images in the background and store the images in a bitmap array. And once I get the first few images, the thread would send a message to the activity to let it know that it can set up the adapter and start displaying the first few images. The user then can start flipping through different images. In the adapter getView method, I will check the bitmap array from the thread to see if the image in the specific position that the user is trying to view is loaded yet. If the bitmap array for the position is null then the adapter will send a message to the activity and asks the activity to display the progress dialog and at the same time the adapter will tell the thread that the user is trying to view the image at that specific position. Then the thread will then send a message to the activity to dismiss the progress dialog once the image of that specific position has been loaded. That's the general idea, but for some reason the message been sent from the adapter to the activity for showing the progress dialog is not working. I can see the message been send because the logging is been printed out in the message handler but the dialog is not showing up. Anyone has a clue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
Hmmm... so perhaps I can call wait() or use some other kind of synchronizer until I get the proper onCreate callback. Thank you very much for that ... it's a start. On Nov 10, 5:42 pm, hackbod [EMAIL PROTECTED] wrote: Probably you are calling this before Activity.onCreate(), which is where the mInstrumentation field is set. Note that calling into an activity from a Service like this is pretty sketchy -- you will need to be very very careful about activity lifecycle and updating the service as the activity changes. On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote: Thanks for your reply - ha ha, wouldn't that be nice if it were that simple. Nope, I checked the return from the Uri.parse - not null. I got a hold of the Android source code. It is crashing here in Activity.java: public void startActivityForResult(Intent intent, int requestCode) { if (mParent == null) { Instrumentation.ActivityResult ar = - mInstrumentation.execStartActivity( this, mMainThread.getApplicationThread(), mToken, th intent, requestCode); Apparently, mInstrumentation is null. mInstrumentation is set in a routine called attach in Activity.java. I am trying to launch the Activity inside a Service - I don't see anything that says that's illegal. However, clearly, I'm not giving Android something that it wants. Still scratching my head on this one for the time being... On Nov 7, 6:10 pm, Chris [EMAIL PROTECTED] wrote: You don't check if Uri.parse returns null, do you? On Fri, Nov 7, 2008 at 3:53 PM,dreamerBoy[EMAIL PROTECTED] wrote: Hi, I'm attempting to initiate an outgoing call from inside a Service. In onStart(), I create an ACTION_CALL Intent, then attempt to start an Activity myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber)); initiateCall.startActivityForResult(myIntent, CALL_SETUP_ACTIVITY_ID); However, when I run the code I get a NullPointerException. Clearly, the intent and activity are non-null, so I'm wondering what Android is lacking here. 11-07 13:24:19.801: INFO/PhoneTestService(1250): onCreate called 11-07 13:24:19.801: INFO/PhoneTestService(1250): onStart called 11-07 13:24:19.801: INFO/PhoneTestService(1250): doIt called 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): creating initiateCall activity 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): initiateCall is NOT NULL! 11-07 13:24:19.820: INFO/PhoneTestService(1250): phone state is: CALL_STATE_IDLE 11-07 13:24:21.601: INFO/PhoneTestService(1250): starting to listen Fri Nov 07 13:24:19 PST 2008 11-07 13:24:21.622: INFO/PhoneTestService(1250): starting call intent. 11-07 13:24:21.622: DEBUG/PhoneTestService(1250): myIntent is NOT NULL! 11-07 13:24:21.632: ERROR/PhoneTestService(1250): ERROR: java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.doIt(PhoneTestService.java:254) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.onStart(PhoneTestService.java:145) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2429) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.access$3100(ActivityThread.java:112) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Handler.dispatchMessage(Handler.java:88) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Looper.loop(Looper.java:123) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.main(ActivityThread.java:3742) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invokeNative(Native Method) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invoke(Method.java:515) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at dalvik.system.NativeStart.main(Native Method) Don't know where to go from here... ?xml version=1.0 encoding=utf-8? manifest
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
Sorry... I should have checked my logCat ... in fact onCreate has already been called at the point where the NullPointerException is thrown. On Nov 10, 5:42 pm, hackbod [EMAIL PROTECTED] wrote: Probably you are calling this before Activity.onCreate(), which is where the mInstrumentation field is set. Note that calling into an activity from a Service like this is pretty sketchy -- you will need to be very very careful about activity lifecycle and updating the service as the activity changes. On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote: Thanks for your reply - ha ha, wouldn't that be nice if it were that simple. Nope, I checked the return from the Uri.parse - not null. I got a hold of the Android source code. It is crashing here in Activity.java: public void startActivityForResult(Intent intent, int requestCode) { if (mParent == null) { Instrumentation.ActivityResult ar = - mInstrumentation.execStartActivity( this, mMainThread.getApplicationThread(), mToken, th intent, requestCode); Apparently, mInstrumentation is null. mInstrumentation is set in a routine called attach in Activity.java. I am trying to launch the Activity inside a Service - I don't see anything that says that's illegal. However, clearly, I'm not giving Android something that it wants. Still scratching my head on this one for the time being... On Nov 7, 6:10 pm, Chris [EMAIL PROTECTED] wrote: You don't check if Uri.parse returns null, do you? On Fri, Nov 7, 2008 at 3:53 PM,dreamerBoy[EMAIL PROTECTED] wrote: Hi, I'm attempting to initiate an outgoing call from inside a Service. In onStart(), I create an ACTION_CALL Intent, then attempt to start an Activity myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber)); initiateCall.startActivityForResult(myIntent, CALL_SETUP_ACTIVITY_ID); However, when I run the code I get a NullPointerException. Clearly, the intent and activity are non-null, so I'm wondering what Android is lacking here. 11-07 13:24:19.801: INFO/PhoneTestService(1250): onCreate called 11-07 13:24:19.801: INFO/PhoneTestService(1250): onStart called 11-07 13:24:19.801: INFO/PhoneTestService(1250): doIt called 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): creating initiateCall activity 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): initiateCall is NOT NULL! 11-07 13:24:19.820: INFO/PhoneTestService(1250): phone state is: CALL_STATE_IDLE 11-07 13:24:21.601: INFO/PhoneTestService(1250): starting to listen Fri Nov 07 13:24:19 PST 2008 11-07 13:24:21.622: INFO/PhoneTestService(1250): starting call intent. 11-07 13:24:21.622: DEBUG/PhoneTestService(1250): myIntent is NOT NULL! 11-07 13:24:21.632: ERROR/PhoneTestService(1250): ERROR: java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.doIt(PhoneTestService.java:254) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.onStart(PhoneTestService.java:145) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2429) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.access$3100(ActivityThread.java:112) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Handler.dispatchMessage(Handler.java:88) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Looper.loop(Looper.java:123) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.main(ActivityThread.java:3742) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invokeNative(Native Method) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invoke(Method.java:515) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at dalvik.system.NativeStart.main(Native Method) Don't know where to go from here... ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android;
[android-developers] progress dialog
I am having a little problem of using progress dialog. Trying to figure out how and the optimal way of using the progress dialog. My application needs to grab information from different servers, so I am trying to show the progress dialog at the appropriate moment. I am trying to use a gallery to grab different images. At the start of the activity, I will have a pop up that says loading, and then spin off a different thread to start retrieving images in the background and store the images in a bitmap array. And once I get the first few images, the thread would send a message to the activity to let it know that it can set up the adapter and start displaying the first few images. The user then can start flipping through different images. In the adapter getView method, I will check the bitmap array from the thread to see if the image in the specific position that the user is trying to view is loaded yet. If the bitmap array for the position is null then the adapter will send a message to the activity and asks the activity to display the progress dialog and at the same time the adapter will tell the thread that the user is trying to view the image at that specific position. Then the thread will then send a message to the activity to dismiss the progress dialog once the image of that specific position has been loaded. That's the general idea, but for some reason the message been sent from the adapter to the activity for showing the progress dialog is not working. I can see the message been send because the logging is been printed out in the message handler but the dialog is not showing up. Anyone has a clue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot finish download. There is not enough space.
I've checked the code, and there is no difference whatsoever between the download code in RC19 and RC28/29/30. If anyone runs into this issue and has their device configured to run adb, the following information could help me diagnose what's going on: -the result of adb shell df -any line output by adb logcat that contains the string DownloadManager. Thanks, JBQ On Mon, Nov 10, 2008 at 12:11 PM, Seismic Gelatin [EMAIL PROTECTED] wrote: It seems to have happened after the RC28/29 OTA (or manual for those who chose that route) Update. Apparently the browser now only wishes to download to the internal memory reserved for the OS, and makes no notice of the microSD card. For example, on my phone (now running RC30) Going into Settings SD card and phone storage reports 53mb free internal storage and a nearly empty SD card. However, using the System Monitor app I downloaded from the Market, internal storage is listed as 63mb used out of a total of 67mb. (the SD card still shows that it's nearly empty) All attempts to download through the browser fail. I have done a factory reset and it does not remedy the issue. I can only assume that a symlink is broken or that it was purposefully done to impede the download and installation of non-Market applications. Any resolution to this issue would be greatly appreciated. On Nov 3, 11:53 am, Kipling Inscore [EMAIL PROTECTED] wrote: Is that 48MB on the device's internal memory or on the SD card in the device? Downloads go to the SD card. On Sun, Nov 2, 2008 at 10:22 PM, GasBot [EMAIL PROTECTED] wrote: I'm trying to set up my IIS server to serve out my APK for anyone who wants todownloadit directly from my site. I added the .apk extension and mime type to my site which changed the error I was getting in the android's browser from not compatible with the device, to not enough space on the device. However it's showing that I have more than enough space (the apk is only 9KB and device shows over 48MB available). I'm guessing there's some other kind of configuration error going on with this. Has anyone seen this issue before? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Two Notifications
On Nov 11, 6:21 pm, Peli [EMAIL PROTECTED] wrote: The idea is to only show 1 notification, also when you slide down the screen, leaving the user with only 1 choice. Then I don't see the point of having an extended statusbar. Why not execute the intent soon as the user clicks the icon? My preference would be if there's one notification, execute it soon as the user clicks it, if there's more, show the extended status bar. But this 1 choice directs her to your application where you present a list of possible options (the ones you wanted to show in separate notifications in the first place). So you click the icon, then you click the extended notification bar's one option, then you select an option. I found my way around it, my app removes the old notification and places a new one, so there's always one icon. What also works is to give the second notification a transparent icon, which doesn't show. Then you have one visible icon and two or more lines in the extended notification bar. But I won't do that, don't want to steal space in the task bar :-) Peli On Nov 11, 3:34 pm, Christine [EMAIL PROTECTED] wrote: On Nov 11, 2:39 am, hackbod [EMAIL PROTECTED] wrote: Perhaps think about doing something like the calendar app, where selecting the notification brings you to a list of the interesting things behind it. Well, that's kind of what I was hoping to achieve by having one icon pop up multiple notifications in the screen that slides down when you pull down the task bar icon. I can do that, but it shows two icons rather than one. My problem is not the notifications, my problem is that I get two icons for one Notificationmanager where I need one icon. On Nov 10, 4:06 pm, Christine [EMAIL PROTECTED] wrote: Just got an email from a user who says why can't the app just start right when you click the task bar icon. If that could be done, my app would have one icon per action. But the user gets these bars that come down, where you can put multiple notifications. So what you want is one icon, even if you have multiple notifications at the same time. I want to keep both of them, because they represent different user actions. What bothers me is that you have multiple bars appearing, but why do you get multiple icons also? It looks very cute, a whole series of tweeting birds in the task bar, but I don't think a user appreciates that, after an initial smile :-) On Nov 11, 12:27 am, Peli [EMAIL PROTECTED] wrote: Can't you simply remove your existing notification before you add the new one? Peli On Nov 10, 11:14 pm, Christine [EMAIL PROTECTED] wrote: How can I send two Notifications to one NotificationManager in a way that I get only one icon for that NotificationManager? What happens now is that you get a second icon for the second notification - and a third, fourth, etc. I've seen this question before, but I don't think it got answered? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Check for new version of applications
It would be cool if google added the ability to check your version against the market, but for the time being, I'm fine with using a version URL as you described. But I'm still fuzzy on one thing, is there an action available to launch the market app directly to your product page? Example: -user opens app -app checks update url finds new version exists -app presents dialog box - click ok to goto the Android Market -user clicks ok -new intent launches android market with your app's content_id Does anyone know if a simple solution like that currently exists, or do we just have to notify the user about the update, and tell them to goto the market? Also in regards to the OI Update app, is there a way to require it be installed as well, or would my app have to download and install it directly on it's first run? And would that even be possible if the user never checked off Allow Non-Market Apps? On Nov 11, 12:53 pm, Peli [EMAIL PROTECTED] wrote: As far as I understand, Google plans something like this for the future (maybe when paid apps start to become possible). For now the developer is left by themselves. We also initially copied an update checker routine in all of our OI applications, but this has 2 major drawbacks: 1) It requires each application to have the INTERNET permission, even though the app itself won't use it. 2) A lot of code is duplicated in the various applications. We have been developing OI Update, an open source update checker, which is ready to be released soon. We wrote it mainly for our own applications, but it is written generally enough to allow other applications to take advantage of it as well easily. Your application only needs to include a small meta-data in your manifest, and you need to keep a file on a server with update information (which can be compatible to VeeCheck; AndAppStore.com can generate that file on the fly). This inconvenience is necessary, because the Market does not provide version information to 3rd party applications (or at least I'm not aware of how to do it). All the rest is handled by OI Update. It checks every couple of days (as set by the user) for updates, and notifies the user. If the user wishes they are then directly forwarded to the Market where they can download the new version. I hope this could clarify a couple of points. Peliwww.openintents.org On Nov 11, 3:48 pm, loty [EMAIL PROTECTED] wrote: I'm wondering about the same thing. All applications need to have a simple ability to notify users of new versions. For me 3rd party updaters/checkers is not an option - I can just as easily add simple check against my web site and download new APK file directly. A much cleaner solution is to query Android Market directly for new version. Can anyone illuminate me if this is possible or planned in the future. On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote: So version checking needs to be done through an outside resource... Is there anintentwe can use to launch theAndroidMarketApp directly to the listing for our own app, for when an update is available? On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote: Hi, we have prepared a release version of the OI Updater. There is no need to send intents, but developers only need to add a meta-data node to the application manifest in order to be handled by the updater. Early feedback welcome! Description:http://www.openintents.org/en/node/136 Download:http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk Cheers, Friedger On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote: Because we use a XMPP based application, we chosed Pubsub as a way to notify new versions to the user. The main advantage is that it uses a push model. The user is aware of a new version when he launches the app or in real time if he's online while a new version has just been released. No timer or service at all in the application code. On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote: Currently, relying on an external resource is the way to do updates, this is how it is described in the documentation. If someone is checking againstMarket, please let us know. Friedger On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote: isn't there some way tocheckthe version against theMarketinstead of having to host version information somewhere else? I know the app Locale somehow knows when anupdateis available, it seems reasonable to query theMarketrather than relying on outside sources :\ On Nov 1, 1:50 pm,friedger[EMAIL PROTECTED] wrote: I'd say the package name is the global identifier. Maybe you can just provide a VeeCheck url based on the package name (as alternative to the app id). So I couldcheckthat url. If you don't host an app for the package name or if it is
[android-developers] Re: Check for new version of applications
We also have an update notification feature in SAM. If you update you application version at SlideME site, the user will receive a notification, allowing them to download the new version. This does require, however, that the user have downloaded the application through SAM. Shane On Tue, Nov 11, 2008 at 9:53 AM, Peli [EMAIL PROTECTED] wrote: As far as I understand, Google plans something like this for the future (maybe when paid apps start to become possible). For now the developer is left by themselves. We also initially copied an update checker routine in all of our OI applications, but this has 2 major drawbacks: 1) It requires each application to have the INTERNET permission, even though the app itself won't use it. 2) A lot of code is duplicated in the various applications. We have been developing OI Update, an open source update checker, which is ready to be released soon. We wrote it mainly for our own applications, but it is written generally enough to allow other applications to take advantage of it as well easily. Your application only needs to include a small meta-data in your manifest, and you need to keep a file on a server with update information (which can be compatible to VeeCheck; AndAppStore.com can generate that file on the fly). This inconvenience is necessary, because the Market does not provide version information to 3rd party applications (or at least I'm not aware of how to do it). All the rest is handled by OI Update. It checks every couple of days (as set by the user) for updates, and notifies the user. If the user wishes they are then directly forwarded to the Market where they can download the new version. I hope this could clarify a couple of points. Peli www.openintents.org On Nov 11, 3:48 pm, loty [EMAIL PROTECTED] wrote: I'm wondering about the same thing. All applications need to have a simple ability to notify users of new versions. For me 3rd party updaters/checkers is not an option - I can just as easily add simple check against my web site and download new APK file directly. A much cleaner solution is to query Android Market directly for new version. Can anyone illuminate me if this is possible or planned in the future. On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote: So version checking needs to be done through an outside resource... Is there anintentwe can use to launch theAndroidMarketApp directly to the listing for our own app, for when an update is available? On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote: Hi, we have prepared a release version of the OI Updater. There is no need to send intents, but developers only need to add a meta-data node to the application manifest in order to be handled by the updater. Early feedback welcome! Description:http://www.openintents.org/en/node/136 Download: http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk Cheers, Friedger On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote: Because we use a XMPP based application, we chosed Pubsub as a way to notify new versions to the user. The main advantage is that it uses a push model. The user is aware of a new version when he launches the app or in real time if he's online while a new version has just been released. No timer or service at all in the application code. On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote: Currently, relying on an external resource is the way to do updates, this is how it is described in the documentation. If someone is checking againstMarket, please let us know. Friedger On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote: isn't there some way tocheckthe version against theMarketinstead of having to host version information somewhere else? I know the app Locale somehow knows when anupdateis available, it seems reasonable to query theMarketrather than relying on outside sources :\ On Nov 1, 1:50 pm,friedger[EMAIL PROTECTED] wrote: I'd say the package name is the global identifier. Maybe you can just provide a VeeCheck url based on the package name (as alternative to the app id). So I couldcheckthat url. If you don't host an app for the package name or if it is not unique you could return a HTTP 400. Friedger On 1 Nov., 17:37, Al Sutton [EMAIL PROTECTED] wrote: Friedger, How are you identifying the apps?, I'd happily add an extra field or two to the AndAppStore.com data that you can search for if it would be useful. Al. friedgerwrote: The idea is that the Updater will also be ablecheckall applications it knows about by a single button clicked or scheduled task. So, once theintentfrom one application is processed by theUpdateit is
[android-developers] Re: whoever wrote the email app for the G1.....
I think a large number of G1 users are not programmers, so unable to contribute changes/code, and even tho I am a software engineer, I do not have time to myself! So that leaves most users commenting/giving feedback, for app owners/google to read in and act opon. IV --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
On Nov 10, 6:12 pm, Mark Murphy [EMAIL PROTECTED] wrote: dreamerBoywrote: Thanks for the reply, Mark (I recognize the name - I read your book.) In the ACTION_CALL documentation, it states: Note: there will be restrictions on which applications can initiate a call; most applications should use the ACTION_DIAL. Whoever wrote that sounds like a politician - lots of room to maneuver there - Now, probably it will work, as there have been recent tutorials demonstrating that it works from an activity, but I could see where this might get locked down sometime in the future. Ahhh - I miss the good ole days when there was something called a SecurityPolicy that one could customize ... I am also wondering if there exists within the exposed Android API, a way to hang up a call in an automated fashion. No appropriate intents exist - it seems the only remaining possibility is calling finish() or finishActivity(ACTIVITY_ID) on the Activity used to place or answer the call. However, there is nothing in the docs which actually states that. If I can get past my currently difficulty, I will definitely test it. You could putter through the source code to see how the in-call application handles it. Again, whatever technique it uses is probably not for public consumption, your mileage may vary, do not taunt Happy Fun Android, etc. I thought that Android was supposed to be about empowering developers to create new breeds of applications. I'll be reconfiguring the program to see if I can get different results - perhaps I missed something simple in the Manifest. However, a NullPointerException really does merit some explanation. Well, hackbod took a guess, and her guesses are pretty damn good. According to my logCat readout - onCreate was already called a while back - time to drill in deeper I guess. I'm wondering why my attempt to install my own Instrumentation object doesn't appear to be working (at least, none of the lifecycle callbacks are talking to me). Is whatever Context represented by initiateCall real? For example, if initiateCall is some Activity you instantiated yourself as part of this automated , that may not be fully-formed (i.e., gone through the normal lifecycle) and therefore may not be able to start other activities. Yep, it's possible that I got my life cycle out of order .. working on that - I hate to be the bearer of bad tidings, since you read my book and all ;-), Actually your book, Haseman's book (Android Essentials), Gramlich's book (Programming in Android), and DiMarzio's book (Programming in Android). but I'm not terribly hopeful you'll be able to place a call, initiated by some remote application, automatically, without user intervention. I could think of some quite useful applications that would utilize automated calling. Leave a voice or text message for a bunch o' people. Try to contact computer support or the IRS every 15 minutes - if someone actually picks up, then transfer the call to the user ... Yes, I suppose the latter capability could be used in a malicious way e.g., to stalk someone - however, there's something called a Previous Number Dialed button which can be used to do the same thing manually. Or, to put it another way, if it works, it'll scare the crap out of me, because there's all sorts of nasty things one can do with that technique. Yes, that situation already came up in the case of Applets ... download an Applet - it will steal your passwords, start emailing advertisements for erectile dysfunction cures, harass old ladies etc... See: http://www.securingjava.com/chapter-two/ Not saying you're wrong - Android designers may have indeed been afraid of this but if there are limitations they should be enumerated somehow - sigh. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: adding OGC-compliant WMS map services to MapView
Excellent! Thanks Ludwig. I'll try this out. On Nov 10, 9:27 am, Ludwig [EMAIL PROTECTED] wrote: I have implemented a simple WMS client for Android, it is not difficult: projections aside, you can simply specify the required coordinates as input to the WMS service and then overlay the image: all the work is done on the WMS server.I have some more info (not complete, too lazy) here:http://androidgps.blogspot.com/2008/09/simple-wms-client-for-androidas well as some of the newer entries. HTH Ludwig 2008/11/9 diatom [EMAIL PROTECTED] Hello, Is there a way to add a WMS map service to the MapView object? If so, can you provide direction or sample code on how to do this? Thanks, Clint- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] announcement Emulator tester AnETTe
Hi folks, Android Emulator Telnet Tester names AnETTe is a small Java application written by me to make Android development and testing little bit easier. What can you do with AnETTe? place inbound-call accept inbound-call cancel inbound or outbound-call reject outbound-call with busy-message set a call on hold simulate incoming sms-message set geo position (longitude latitude) AnETTe is free please leave some comments on the homepage. dont care bout language, my blog is german but you can write engl. comments. is this app helpful? is it buggy? download at http://android-telefonie.de/wp-content/uploads/2008/11/anette.jar homepage http://android-telefonie.de/anette/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Does SoundPool work or has anyone successfully used it?
By default, the MediaPlayer volume should be set to 1.0, i.e. no attenuation. Which stream type are you using when you create the MediaPlayer? Have you checked to make sure that the master stream volume is set correctly? On Nov 11, 10:10 am, plusminus [EMAIL PROTECTED] wrote: Thx for the code but I have that onCompletion working with the MediaPlayer already. The problem actually is that the volume is s silent on some files (even after volume-normalizing them). Does anyone which values to choose, calling the following method on a MediaPlayer: -- setVolume(float leftVolume, float rightVolume) Sets the volume on this player. -- I was using 10, as that had been returned once from mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); SoundPool is playing them in the proper loudness. :( But using an unstable API is not what I'd like to do :( On Nov 11, 9:43 am, Robert Green [EMAIL PROTECTED] wrote: Here's an example for managing sounds that will be played many times (like gunshots, explosions, clicks, etc) using a pool and then sounds that are just one-offs, like an announcer or an intro sound. public class MediaPlayerPool { private static final String TAG = MediaPlayerPool; private Context context; private int streamType; private HashMapInteger, ArrayListMediaPlayer pools; public MediaPlayerPool(Context context, int streamType) { this.context = context; this.streamType = streamType; pools = new HashMapInteger, ArrayListMediaPlayer(); } public boolean hasMedia(int resourceId) { return pools.keySet().contains(resourceId); } public void addMedia(int resourceId, int poolSize) { ArrayListMediaPlayer pool = pools.get(resourceId); if (pool == null) { pool = new ArrayListMediaPlayer(); } for (int i = 0; i poolSize; i++) { pool.add(createMediaPlayer(resourceId)); } pools.put(resourceId, pool); } public void playMedia(int resourceId) { ArrayListMediaPlayer pool = pools.get(resourceId); MediaPlayer player = null; if (pool.size() 0) { player = pool.remove(0); } if (player == null) { Log.e(TAG, Pool is empty for resource + resourceId); } else { player.start(); } } public void release() { for (Integer key : pools.keySet()) { ArrayListMediaPlayer pool = pools.get(key); for (MediaPlayer player : pool) { if (player.isPlaying()) { player.stop(); } player.release(); } pool.clear(); } pools.clear(); } private MediaPlayer createMediaPlayer(final int resourceId) { MediaPlayer mp = MediaPlayer.create(context, resourceId); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer player) { player.seekTo(0); returnToPool(resourceId, player); } }); mp.setAudioStreamType(streamType); return mp; } private void returnToPool(int resourceId, MediaPlayer player) { ArrayListMediaPlayer pool = pools.get(new Integer(resourceId)); pool.add(player); } } public class MediaPlayerSoundManager { private static final String TAG = MediaPlayerSoundManager; private Context context; private MediaPlayerPool pool; private HashMapInteger, Integer soundResourceMap; public MediaPlayerSoundManager(Context context) { this.context = context; this.pool = new MediaPlayerPool(context, AudioManager.STREAM_MUSIC); this.soundResourceMap = new HashMapInteger, Integer(); } public void init() { release(); pool.addMedia(R.raw.sound_1, 2); soundResourceMap.put(SOUND_1, R.raw.sound_1); } public void playSound(int soundId) { int resourceId = getResourceId(soundId); if (pool.hasMedia(resourceId)) {
[android-developers] does android phone have a IP address?
Hi all I want to program a server on android phone. I use socket. Is the android emulator's IP address the same to the PC's? I got exceptions from the client which I program on the same PC. the exceptions is: java.net.ConnectException: Connection refused: connect java.lang.NullPointerException the code is below: java client: import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; public class JavaClient { public static void main(String argv[]) { Socket ClientSocket = null; DataOutputStream os= null; DataInputStream is = null; try { // Retrieve the ServerName InetAddress serverAddr = InetAddress.getByName(SERVERIP); /* Create new UDP-Socket */ ClientSocket = new Socket(serverAddr,SERVERPORT); os= new DataOutputStream(ClientSocket.getOutputStream()); is = new DataInputStream(ClientSocket.getInputStream()); } catch (UnknownHostException e) { System.err.println(Don't know about host: hostname); } catch (IOException e) { System.err.println(e); } try { os.writeBytes(hello); byte[] input = new byte[100]; while(is.read(input, 0, 10)!=-1) { System.out.println(new String(input)); } os.close(); is.close(); ClientSocket.close(); } catch (Exception e) { System.out.println(e); } } public static final String SERVERIP = 142.19.128.114; // 'Within' the emulator! public static final int SERVERPORT = ; } android server: public class AndroidServer extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); DataOutputStream os=null; DataInputStream is = null; ServerSocket socket = null; Socket ClientSocket = null; try { /* Create new UDP-Socket */ socket = new ServerSocket(SERVERPORT); ClientSocket = socket.accept(); os = new DataOutputStream(ClientSocket.getOutputStream()); is = new DataInputStream(ClientSocket.getInputStream()); /* By magic we know, how much data will be waiting for us */ byte[] buf = new byte[100]; while(is.read(buf, 0, 10)!=0) { Log.d(TCP, new String(buf)); os.writeBytes(end); } os.close(); is.close(); socket.close(); ClientSocket.close(); } catch (Exception e) { System.out.println(e); } } public static final int SERVERPORT = ; } Regards, Lei --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Any way to have two MediaRecorders recording at once?
No, this use case is not supported. On Nov 11, 5:34 am, Blake B. [EMAIL PROTECTED] wrote: Hi all, For my app I need to have two audio recordings that overlap each other - that is, at some points in time there will be two separate audio files being created from the same audio source. I have attempted to use two MediaRecorders and start the second one while the first is still recording. When I do this I get the following error: ERROR/AudioFlinger(25): Record channel already open Is there any way to get around this? Thanks in advance, Blake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Database storage
Is there a way to store a SQLite database instance to an external storage like a SD card? My database is growing and don't want it to take up all the internal storage. Thanks!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
Actually, thank you - you WERE correct - onCreate is NOT being called for this Activity. I tried doing a wait() for 5 - then 30 seconds on the onCreate callback being called - the wait timed out... Hmmm how to force an Activity to properly initialize itself. On Nov 10, 5:42 pm, hackbod [EMAIL PROTECTED] wrote: Probably you are calling this before Activity.onCreate(), which is where the mInstrumentation field is set. Note that calling into an activity from a Service like this is pretty sketchy -- you will need to be very very careful about activity lifecycle and updating the service as the activity changes. On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote: Thanks for your reply - ha ha, wouldn't that be nice if it were that simple. Nope, I checked the return from the Uri.parse - not null. I got a hold of the Android source code. It is crashing here in Activity.java: public void startActivityForResult(Intent intent, int requestCode) { if (mParent == null) { Instrumentation.ActivityResult ar = - mInstrumentation.execStartActivity( this, mMainThread.getApplicationThread(), mToken, th intent, requestCode); Apparently, mInstrumentation is null. mInstrumentation is set in a routine called attach in Activity.java. I am trying to launch the Activity inside a Service - I don't see anything that says that's illegal. However, clearly, I'm not giving Android something that it wants. Still scratching my head on this one for the time being... On Nov 7, 6:10 pm, Chris [EMAIL PROTECTED] wrote: You don't check if Uri.parse returns null, do you? On Fri, Nov 7, 2008 at 3:53 PM,dreamerBoy[EMAIL PROTECTED] wrote: Hi, I'm attempting to initiate an outgoing call from inside a Service. In onStart(), I create an ACTION_CALL Intent, then attempt to start an Activity myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber)); initiateCall.startActivityForResult(myIntent, CALL_SETUP_ACTIVITY_ID); However, when I run the code I get a NullPointerException. Clearly, the intent and activity are non-null, so I'm wondering what Android is lacking here. 11-07 13:24:19.801: INFO/PhoneTestService(1250): onCreate called 11-07 13:24:19.801: INFO/PhoneTestService(1250): onStart called 11-07 13:24:19.801: INFO/PhoneTestService(1250): doIt called 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): creating initiateCall activity 11-07 13:24:19.811: DEBUG/PhoneTestService(1250): initiateCall is NOT NULL! 11-07 13:24:19.820: INFO/PhoneTestService(1250): phone state is: CALL_STATE_IDLE 11-07 13:24:21.601: INFO/PhoneTestService(1250): starting to listen Fri Nov 07 13:24:19 PST 2008 11-07 13:24:21.622: INFO/PhoneTestService(1250): starting call intent. 11-07 13:24:21.622: DEBUG/PhoneTestService(1250): myIntent is NOT NULL! 11-07 13:24:21.632: ERROR/PhoneTestService(1250): ERROR: java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): java.lang.NullPointerException 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.doIt(PhoneTestService.java:254) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at test.phone.PhoneTestService.onStart(PhoneTestService.java:145) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2429) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.access$3100(ActivityThread.java:112) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Handler.dispatchMessage(Handler.java:88) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.os.Looper.loop(Looper.java:123) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at android.app.ActivityThread.main(ActivityThread.java:3742) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invokeNative(Native Method) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at java.lang.reflect.Method.invoke(Method.java:515) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 11-07 13:24:21.632: ERROR/PhoneTestService(1250): at dalvik.system.NativeStart.main(Native Method) Don't know where to go
[android-developers] Re: Problem with ContentResolver
I am getting exactly the same problem. I've added TITLE,TRACK,MIME_TYPE,SIZE,ARTIST,DATE_ADDED and DISPLAY_NAME to the list of content values when trying to create the record, but it still returns null and I still get the android.database.sqlite.SQLiteConstraintException: error code 19 error. Ernest: Did you manage to find out what was wrong? Can anyone out there help? Many thanks, Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Service Permission
Thanks a lot for analyzing the problem. First, my comment on your second point - This I had already been doing - as in the client application's manifest, the service application's manifest too has this entry under the manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / Now coming to the first point, I changed the client code line from - Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); to Intent intent = new Intent(com.abc.xyz.service.BackgroundService); After the change, it seems the service is identified and the earlier warning message - Unable to start service Intent{ comp={com.abc.xyz.client/ com.abc.xyz.service.BackgroundService} }:not found is not coming. But then the permission related SecurityException is coming at the client statement startService(intent) as below: - WARN/PackageManager(57): Not granting permission android.permission.ACCESS_BACKGROUND_SERVICE to package com.abc.xyz.client (protectionLevel=3 flags=0x44) - ERROR/AndroidRuntime(): ERROR: thread attach failed - WARN/ActivityManager(57): Permission Denial: Accessing service ComponentInfo{com.abc.xyz/com.abc.xyz.service.BackgroundService} from pid=57, uid=1000 requires android.permission.ACCESS_BACKGROUND_SERVICE - ERROR/AndroidRuntime(1120): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.xyz.client/ com.abc.xyz.client.ClientActivity}: java.lang.SecurityException: Not allowed to start service Intent { action=com.abc.xyz.service.BackgroundService } without permission android.permission.ACCESS_BACKGROUND_SERVICE I think I am missing something with the declaration of permission in the manifest(s). What is your opinion? Thanks, Raktim. On Nov 11, 4:48 am, hackbod [EMAIL PROTECTED] wrote: The Intent you are making to bind to the service is trying to find a component in your own .apk, not the other. The last permission error you mention is because you need to explicitly request to use even your own permissions. On Nov 10, 9:31 pm, Raktim Das [EMAIL PROTECTED] wrote: Hi, I am using 0.9 beta SDK. I want to have a service defined within one application to be invokable from another. The application hosting the service has, in its manifest, the following inside the application tag: service android:name=.service.BackgroundService android:process=:remote android:exported=true android:permission=android.permission.ACCESS_BACKGROUND_SERVICE intent-filter action android:name=com.abc.xyz.service.BackgroundService / /intent-filter /service It also has the following inside the manifest tag: permission android:name=android.permission.BACKGROUND_SERVICE android:protectionLevel=dangerous/ In my client application's manifest xml file, I have the following inside manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / The client Activity code has the following API called from its onCreate() method: private void startBackgroundService() { mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.i(TAG, Connected to background service); mService = BackgroundService.Stub.asInterface(service); } public void onServiceDisconnected(ComponentName className) { mService = null; Log.i(TAG, Background service disconnected); } }; Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); startService(intent); boolean result = bindService(intent, mConnection, Context.BIND_AUTO_CREATE); Log.i(TAG, Background service bind result: + result); } When I run the client Activity, it can not bind to the service: - the log statement at the end has Background service bind result: false. - the onServiceConnected() method is not called - There is a waring log from ActivityManager: WARN/ActivityManager(58): Unable to start service Intent { comp={com.abc.xyz.client/com.abc.xyz.service.BackgroundService} }: not found I have tried running the same without any permission in the service application manifest and also without the uses-permission tag in client. The result was the same. But when I run a similar client code inside my service application (without specifying any permissions), it runs perfectly. Finally, the most peculiar thing is happening when I am running this client code inside my service application but with the permissions specified (as written above) in the manifest - it runs with this error at the statement startService(intent): Caused by: java.lang.SecurityException: Not allowed to start service Intent {
[android-developers] Re: Best approach to fullscreen video?
The following are for the T-Mobile G1, other Android devices will likely have different specs based on their hardware capabilities: H.264 AVC baseline, H.263, and MPEG4-SP codecs are supported in a 3GPP container file. H.264 AVC is also supported in an MP4 container. The H.264 AVC format is preferred due to support for h/w acceleration. Video size up to 480x320, with video bit rates up to 600K bps average. Make sure you disable b-frames (not supported in baseline). VideoView adjusts the surface size based on the reported aspect ratio from the video. If you want it to fill the display, make sure that the video aspect ratio matches the screen aspect ratio. On Nov 10, 6:42 pm, jean-guys [EMAIL PROTECTED] wrote: Our app has a simple 3 second intro video that plays the first time the app is launched. So far we've experienced two issues with this. The first is that we seem to be limited to H263 video in a 3GP container at standard resolutions (i.e. 352x288). H264 video doesn't play at all in a 3GP container. Is there a published list of supported video codec and container combinations? The second is that we can't get the VideoView to fill the screen in the case that the source video does not exactly match the device screen. We'd like to be able to programatically determine the optimum video dimensions and have the video player scale appropriately. Setting the VideoView to FILL_PARENT works fine until the video starts playing, at which time the VideoView is resized to the video dimensions. Is there an equivalent to a setWidth and setHeight that will stick? This is our simple layout: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent VideoView android:id=@+id/surface android:layout_gravity=center android:layout_width=fill_parent android:layout_height=fill_parent android:minHeight=480 /VideoView /LinearLayout Tried with and without the minHeight and the results appear identical. Help? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Service causing application to crash
Have you looked at the log output? There should be a stack trace telling you where the service crashed. On Nov 10, 9:01 pm, roid [EMAIL PROTECTED] wrote: HI I have implemented a service to download online podcast episodes.I have put checks inside service that if there is not enough memory in the Sdcard then it should not download. There is infact enough memory in the card and it is allowing to download but afterwards results a crash. Any idea why this could be happening? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: whoever wrote the email app for the G1.....
On Tue, 2008-11-11 at 12:22 +, Ian wrote: I think a large number of G1 users are not programmers, so unable to contribute changes/code, and even tho I am a software engineer, I do not have time to myself! So that leaves most users commenting/giving feedback, for app owners/google to read in and act opon. Perhaps if they gave reasoned and detailed feedback that might be useful. Hyperbole, and ranting are just childish. If one finds the device unusable return it. IV -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting a bad thing? Brian Beattie LFS12947 | Honor isn't about making the right choices. [EMAIL PROTECTED] | It's about dealing with the consequences. www.beattie-home.net | -- Midori Koto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Trouble with SoundPool
I can't commit to a date, but I can tell you that it will be addressed in the next SDK release. On Nov 10, 1:27 pm, Robert Green [EMAIL PROTECTED] wrote: Unfortunately it is the only suitable API for sounds in games at the moment. I tried to use MediaPlayers for mine and the performance and player management was sub-par. I had problems with it but after I switched to OGGs they seemed to go away. I'm prepared to retrofit my games once the API is finalized but until then it's really the only way to handle multiple triggered sounds well. Dave - got an ETA on when that will be ready? :) On Nov 10, 1:52 pm, Dave [EMAIL PROTECTED] wrote: SoundPool is undocumented because it is not ready as a public API and is subject to change. There are serious problems with it including the likelihood that your application will deadlock if you attempt to use it. When it is ready, we will publish the API documentation. On Nov 9, 5:04 pm, g1bb [EMAIL PROTECTED] wrote: This worked great. Thank you very much. The lack of documentation on SoundPool is disturbting. On Nov 9, 2:10 pm, Robert Green [EMAIL PROTECTED] wrote: Yeah there's something you need to know about SoundPool: Init well before playing - that is, you need to know way ahead of time what sounds you will be using because it doesn't work well to play immediately after initializing. I think they attempt to initialize asynchronously or something because I had problems when I tried to load and play back to back like you're trying there. When I use SoundPool, I load everything upon creation of the instance of the game then trigger the plays whenever I need them. Here's my current code for SoundPoolSoundManager: public class SoundPoolSoundManager implements SoundManager { private static final String TAG = SoundPoolSoundManager; public static final int SOUND_1 = 1; private boolean enabled = true; private Context context; private SoundPool soundPool; private HashMapInteger, Integer soundPoolMap; public SoundPoolSoundManager(Context context) { this.context = context; } public void reInit() { init(); } public void init() { if (enabled) { Log.d(TAG, Initializing new SoundPool); //re-init sound pool to work around bugs release(); soundPool = new SoundPool(SOUNDPOOL_STREAMS, AudioManager.STREAM_MUSIC, 100); soundPoolMap = new HashMapInteger, Integer(); soundPoolMap.put(SOUND_1, soundPool.load(context, R.raw.sound1, 1)); Log.d(TAG, SoundPool initialized); } } public void release() { if (soundPool != null) { Log.d(TAG, Closing SoundPool); soundPool.release(); soundPool = null; Log.d(TAG, SoundPool closed); return; } } public void playSound(int sound) { if (soundPool != null) { Log.d(TAG, Playing Sound + sound); AudioManager mgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC); Integer soundId = soundPoolMap.get(sound); if (soundId != null) { soundPool.play(soundPoolMap.get(sound), streamVolume, streamVolume, 1, 0, 1f); } } } public void setEnabled(boolean enabled) { this.enabled = enabled; } } On Nov 9, 4:28 am, g1bb [EMAIL PROTECTED] wrote: Hello, I posted this on the AndDev forums as well, and I'm somewhat of a novice to Java. I've tried the following code after seeing the snippet athttp://www.anddev.org/using_soundpool_instead_of_mediaplayer-t3115.html, and I can't seem to get this to work. Here's what I have: public class OneShotAlarm extends BroadcastReceiver { private SoundPool soundPool; private HashMapInteger, Integer soundPoolMap; @Override public void onReceive(Context context, Intent intent) { soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100); soundPoolMap = new HashMapInteger, Integer(); soundPoolMap.put(1, soundPool.load(context, R.raw.sound1, 1)); AudioManager mgr =
[android-developers] Re: Text mask
That's how to do it. What did you do exactly? On Tue, Nov 11, 2008 at 8:33 AM, zl25drexel [EMAIL PROTECTED] wrote: Didnt work for me. Any other suggestions? On Nov 8, 3:09 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You would need to draw thetextmanually on a Canvas object (from the onDraw() method of your View for instance.) Then, in the Paint you use to draw thetext, simply set a linear gradient shader. All you have to do is animate the coordinates of the shader to make it look like it's moving and you'll get the desired effect. On Sat, Nov 8, 2008 at 12:03 PM, zl25drexel [EMAIL PROTECTED] wrote: Hi, does anyone know how to dotextmaskeffect in android? like the below in flash http://www.entheosweb.com/Flash/video_tutorials/shining_text_effect.asp thanks, -- Romain Guywww.curious-creature.org -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
Battle of the quotes, from: http://code.google.com/android/reference/android/app/Service.html Other application components running in the same process as the service (such as an Activity) can, of course, increase the importance of the overall process beyond just the importance of the service itself. This is like trying to interpret the Talmud or something... ;-) On Nov 10, 6:12 pm, Mark Murphy [EMAIL PROTECTED] wrote: dreamerBoywrote: Thanks for the reply, Mark (I recognize the name - I read your book.) Thanks! I am trying to place a call with the Activity that may - but need not, have any graphical UI aspect to it. Launching an Activity appears to be the only way to place a call in Android 1.0. If the thinking of the API is to disallow any calls being placed in an automated fashion, it seems to me that there would be no need for ACTION_CALL - only ACTION_DIAL. In the ACTION_CALL documentation, it states: Note: there will be restrictions on which applications can initiate a call; most applications should use the ACTION_DIAL. So even if you can get past the NullPointerException, you may still not be able to place the call. Now, probably it will work, as there have been recent tutorials demonstrating that it works from an activity, but I could see where this might get locked down sometime in the future. I am also wondering if there exists within the exposed Android API, a way to hang up a call in an automated fashion. No appropriate intents exist - it seems the only remaining possibility is calling finish() or finishActivity(ACTIVITY_ID) on the Activity used to place or answer the call. However, there is nothing in the docs which actually states that. If I can get past my currently difficulty, I will definitely test it. You could putter through the source code to see how the in-call application handles it. Again, whatever technique it uses is probably not for public consumption, your mileage may vary, do not taunt Happy Fun Android, etc. I'll be reconfiguring the program to see if I can get different results - perhaps I missed something simple in the Manifest. However, a NullPointerException really does merit some explanation. Well, hackbod took a guess, and her guesses are pretty damn good. Is whatever Context represented by initiateCall real? For example, if initiateCall is some Activity you instantiated yourself as part of this automated , that may not be fully-formed (i.e., gone through the normal lifecycle) and therefore may not be able to start other activities. I hate to be the bearer of bad tidings, since you read my book and all ;-), but I'm not terribly hopeful you'll be able to place a call, initiated by some remote application, automatically, without user intervention. Or, to put it another way, if it works, it'll scare the crap out of me, because there's all sorts of nasty things one can do with that technique. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AlarmManager.RTC_WAKEUP Not Waking Device?
Maybe PARTIAL_WAKE_LOCK, looking at it now... interesting. On Nov 11, 10:45 am, g1bb [EMAIL PROTECTED] wrote: Another question on this: Have you seen the Stopwatch application developed by Tom Taylor? I just downloaded it, and it keeps counting after the phone is put to sleep entirely. Any ideas on how he's doing that? I'm looking for that kind of functionality. Thanks again. On Nov 11, 3:51 am, hackbod [EMAIL PROTECTED] wrote: It does wake it up, but you are going to need to hold a wake lock to keep the device awake after your intent receiver returns. On Nov 10, 11:14 pm,g1bb[EMAIL PROTECTED] wrote: Hello, I've been trying to use AlarmManager.RTC_WAKEUP to wake up my device while it's sleeping, and then play some sounds. It seems like when it's charging, this works fine, but when it's not, the service doesn't start until I hit the menu button and am presented with the lock screen. Also, this seems to be working fine in the emulator, but not my real phone. Here's the alarm scheduling: ntent intent = new Intent(Main.this, OneShotAlarm.class); PendingIntent sender = PendingIntent.getBroadcast(Main.this, 0, intent, 0); // We want the alarm to go off 30 seconds from now. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, 60); // Schedule the alarm! AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender); - The OneShotAlarm BroadCastReceiver: public class OneShotAlarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, OneShotAlarm Broadcast invoked, 1000).show(); intent = new Intent(context, ServiceClassToRun.class); context.startService(intent); } - The Service: public class ServiceClassToRun extends Service { protected static final int Rnd = 0; public void onStart(Intent intent, int startId) { //do some business here } - And finally, my manifest: receiver android:name=.OneShotAlarm android:process=:remote / service android:name=.ServiceClassToRun / Any ideas are greatly appreciated. Has anyone else experienced this as well? Thanks in advance.- Hide quoted text - - Show quoted text -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: generating ui clicks from code
as a follow up of this - is it possible to make an application that can go through another app and get all the code modules from it? On Nov 10, 11:15 am, anu [EMAIL PROTECTED] wrote: Hi, I am trying to automate key presses and UI clicks through code. I know that the monkey tool does this but only pseudo-random clicks are generated. I would like to be able to control which object is clicked at what time. Thanks, Anu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Games
Do you want ideas for games or how to develop games in general? On Nov 11, 3:35 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can any one give some idea in developing some gaming projects in Android --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text mask
all right, answering my own question again. i figured out how to achieve that effect, adjust the matrix and the gradient parameter to adjust effect to your own liking. txtPaint = new Paint(); txtPaint.setColor(Color.GRAY); txtPaint.setAntiAlias(true); txtPaint.setTextSize(25); shader = new LinearGradient(0, 0, 200, 0, new int[]{Color.argb(255, 120, 120, 120), Color.argb(255, 120, 120, 120), Color.argb(255, 255, 255, 255)}, new float[]{0, 0.7f, 1}, TileMode.MIRROR); txtPaint.setShader(shader); @Override protected void onDraw(Canvas canvas) { long now = System.currentTimeMillis(); float elapsed = (now - lastTime)/7; dx+= elapsed; Matrix matrix = new Matrix(); matrix.setTranslate(dx, 0); shader.setLocalMatrix(matrix); canvas.drawText(Text mask effect, 0, 25, txtPaint); lastTime = now; invalidate(); } On Nov 11, 11:39 am, zl25drexel [EMAIL PROTECTED] wrote: Do you have any example codes? Themaskgradient is not clipped over thetext. On Nov 11, 11:35 am, Romain Guy [EMAIL PROTECTED] wrote: That's how to do it. What did you do exactly? On Tue, Nov 11, 2008 at 8:33 AM, zl25drexel [EMAIL PROTECTED] wrote: Didnt work for me. Any other suggestions? On Nov 8, 3:09 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You would need to draw thetextmanually on a Canvas object (from the onDraw() method of your View for instance.) Then, in the Paint you use to draw thetext, simply set a linear gradient shader. All you have to do is animate the coordinates of the shader to make it look like it's moving and you'll get the desired effect. On Sat, Nov 8, 2008 at 12:03 PM, zl25drexel [EMAIL PROTECTED] wrote: Hi, does anyone know how to dotextmaskeffect in android? like the below in flash http://www.entheosweb.com/Flash/video_tutorials/shining_text_effect.asp thanks, -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] PendingIntent and Notification
For status bar icon we used Intent contentIntent = new Intent(this,KeypadLayout.class); contentIntent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent appIntent =PendingIntent.getActivity(this,0, contentIntent, 0); Notification notification = new Notification(R.drawable.icon, null, System.currentTimeMillis()); notification.setLatestEventInfo(c, getText(R.string.app_name), getText(R.string.app_name), appIntent); mNM.notify(0, notification); but can't open new Activity (KeypadLayout class)..plz tel me ..what is wrong.??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Running SensorSimulator with the emulator
Hi, Thanks for your interest in the SensorSimulator. Unfortunately, from your error message I can't yet see what's going wrong. Have you used the 0.9 version, or did you check out the latest version from the repository: http://code.google.com/p/openintents/source/checkout ? You may also contact us in our developer's group: http://groups.google.com/group/openintents as it is easy in this Android forum to miss a post as there are so many... Peli www.openintents.org On Nov 11, 5:14 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I'm new to Android and I'm trying out the accelerometer API and OpenIntent's SensorSimulator. I was able to successfully install OpenIntents, and test the sensor GL with the simulator. As tried to test the simulator with the sample Android's API OS/ Sensors, I get the following error. Thread [3 main] (Suspended (exception VerifyError)) Instrumentation.newActivity(ClassLoader, String, Intent) line: 1096 ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord) line: 2060 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord) line: 2156 ActivityThread.access$1800(ActivityThread, ActivityThread $ActivityRecord) line: 112 ActivityThread$H.handleMessage(Message) line: 1580 ActivityThread$H(Handler).dispatchMessage(Message) line: 88 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3742 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 515 ZygoteInit$MethodAndArgsCaller.run() line: 739 ZygoteInit.main(String[]) line: 497 NativeStart.main(String[]) line: not available [native method] This is the code in Sensors.onCreate() method, protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mGraphView = new GraphView(this); Hardware.mContentResolver = getContentResolver(); mSensorManager = (SensorManager) new SensorManagerSimulator((SensorManager)getSystemService(SENSOR_SERVICE)); Intent intent = new Intent(Intent.ACTION_VIEW, Hardware.Preferences.CONTENT_URI); startActivity(intent); mSensorManager.unregisterListener(mGraphView); SensorManagerSimulator.connectSimulator(); mSensorManager.registerListener(mGraphView, SensorManager.SENSOR_ACCELEROMETER | SensorManager.SENSOR_MAGNETIC_FIELD | SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST); setContentView(mGraphView); } Can someone please help find out what I need to do to fix this. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problems with installation of android usb windows driver
Hi, anybody faced this problem with enabling device debugging in windows? (Win-XP 32bit). I followed the scenario from http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware , but the installation was unsuccessful and the system device Android Phone shows error (code 28 ... drivers are not installed). There is an error in c:\windows\setupapi.log related to the installation: -198 Command line processed: C:\WINDOWS\system32\rundll32.exe C: \WINDOWS\system32\shell32.dll,Control_RunDLL SYSDM.CPL,System #E412 Per-machine codesigning policy settings appear to have been tampered with. Error 13: The data is invalid. #E414 Default of 1 could not be restored to Policy value under HKEY_LOCAL_MACHINE\Software\Microsoft\Driver Signing. Error 5: Access is denied. I tried to set the value in regs manually, but unsuccessfully. The same in safe mode (Access is denied, cannot write value). I also tried to change the signing policy in system settings (Ignore value and Warning value) and then installed the driver again, but result was still the same. Before each installation I cleared the driver completely (removed system device, removed oem??.inf, removed drivers and refreshed windows\inf\infcache.1). Any ideas, please? Thanks, Pavel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Enabling USB debugging of Android apps on Fedora
Thanks. This helped me get the G1 recognized on Fedora. I have no clue what else you're talking about (I'm a n00b). On Oct 30, 8:05 pm, __ [EMAIL PROTECTED] wrote: There is information at the following link about enabling USB debugging on the T1 phone in Ubuntu: http://code.google.com/android/intro/develop-and-debug.html#developin... however those instructions don't work for me in Fedora. I eventually found a udev rule that did work (the syntax is slightly different in Fedora), but then discovered the right solution is to create a hal/ PolicyKit rule to match the device then give r/w access to the console user. As root, I saved the following as /usr/share/hal/fdi/policy/ 20thirdparty/20-tmobile-g1.fdi : ?xml version=1.0 encoding=UTF-8? deviceinfo version=0.2 device match key=info.subsystem contains=usb_device match key=usb_device.vendor_id int=0x0bb4 match key=usb_device.product_id int=0x0c02 append key=info.capabilities type=strlistaccess_control/append merge key=access_control.type type=stringpda/merge merge key=access_control.file type=copy_propertylinux.device_file/merge /match /match /match /device /deviceinfo This gives the device whatever access rights the pda device type gets, which can be changed by running polkit-gnome-authorization (under org.freedesktop.hal.device-access.pda). By default: Anyone: No Console: No Active Console: Yes I had to subsequently reboot my machine (restarting haldaemon caused hal to give weird errors when the phone was plugged in, but after a reboot everything was fine.) With this file in place, after rebooting with the phone plugged in I get: # ls -lR /dev/bus/usb/001 crw-r--r-- 1 root root 189, 0 2008-10-30 23:23 001 crw-r--r-- 1 root root 189, 2 2008-10-30 23:23 003 crw-rw-r--+ 1 root root 189, 3 2008-10-30 23:26 004 The device node is now correctly ACL-controlled (hence the +), however the console user still only has read permission as they are not part of the root group. Additionally, removing the USB plug and plugging it in again causes the SD card to get mounted as an external drive, and the HAL rule above doesn't work the second time (i.e. the node is just owned by root, no ACLs, and has 644 perms). What is the correct way to set this up? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Animation seems slow
I have a Grid View and it has 6 jpeg images. I am applying a scale and alpha animation to that grid and then at the end of the animation i set the visibility of that view to invisible. The animation seems slow. I tried to use an AccelerateInterpolator but that doesnt seem to help. Is there a way to speed up the animation? Here is what my animation looks like (testanim.xml) ?xml version=1.0 encoding=utf-8? set xmlns:android=http://schemas.android.com/apk/res/android; alpha android:fromAlpha=0.2 android:toAlpha=1.0 android:duration=300 / scale android:duration=300 android:fillAfter=true android:fromXScale=1.75 android:toXScale=1 android:fromYScale=1.75 android:toYScale=1 android:pivotX=50% android:pivotY=50% / /set I load this animation in java as follows GridView gv = (GridView) findViewById(R.id.grid); Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); a.setInterpolator(new LinearInterpolator()); gv.startAnimation(a); gv.setVisibility(View.INVISIBLE); any ideas what I need to do to speed up the animation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text mask
Didnt work for me. Any other suggestions? On Nov 8, 3:09 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You would need to draw thetextmanually on a Canvas object (from the onDraw() method of your View for instance.) Then, in the Paint you use to draw thetext, simply set a linear gradient shader. All you have to do is animate the coordinates of the shader to make it look like it's moving and you'll get the desired effect. On Sat, Nov 8, 2008 at 12:03 PM, zl25drexel [EMAIL PROTECTED] wrote: Hi, does anyone know how to dotextmaskeffect in android? like the below in flash http://www.entheosweb.com/Flash/video_tutorials/shining_text_effect.asp thanks, -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Where to find Jarsigner
I have checked the bin folder of my jre and it is not there. Keytool is there, but no jarsigner. I tried googling this but all I found was to check the bin folder. Does anyone know where jarsigner is or know where I can download it from? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Where to find Jarsigner
Check the bin folder of your JDK, not your JRE. Dennis On 11 Nov., 11:20, CM [EMAIL PROTECTED] wrote: I have checked the bin folder of my jre and it is not there. Keytool is there, but no jarsigner. I tried googling this but all I found was to check the bin folder. Does anyone know where jarsigner is or know where I can download it from? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shares Preferences are not getting deleted
On Nov 11, 7:36 am, Sudha [EMAIL PROTECTED] wrote: I am using sharepreferences in my application in the mode MODE_PRIVATE. its working fine.But when I am deleting my application from the emulator and installing it takes the values from the old sharedpreference. Nice, huh? This means that you can upgrade the app without loosing the prefs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text mask
Do you have any example codes? The mask gradient is not clipped over the text. On Nov 11, 11:35 am, Romain Guy [EMAIL PROTECTED] wrote: That's how to do it. What did you do exactly? On Tue, Nov 11, 2008 at 8:33 AM, zl25drexel [EMAIL PROTECTED] wrote: Didnt work for me. Any other suggestions? On Nov 8, 3:09 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, You would need to draw thetextmanually on a Canvas object (from the onDraw() method of your View for instance.) Then, in the Paint you use to draw thetext, simply set a linear gradient shader. All you have to do is animate the coordinates of the shader to make it look like it's moving and you'll get the desired effect. On Sat, Nov 8, 2008 at 12:03 PM, zl25drexel [EMAIL PROTECTED] wrote: Hi, does anyone know how to dotextmaskeffect in android? like the below in flash http://www.entheosweb.com/Flash/video_tutorials/shining_text_effect.asp thanks, -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation seems slow
I moved to using an AnimationListener to make the view invisible at the end of the animation. That seems more correct now but it still doesn't improve the speed or smoothness (yes - i want to know how to do that too) of the animation. Here is my listener : class TestAnimListener implements AnimationListener { @Override public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub gv.setVisibility(View.INVISIBLE); } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } and I set it on the animation as follows: a.setAnimationListener(new TestAnimListener()); Rohit On Nov 11, 1:01 pm, Rohit Mordani [EMAIL PROTECTED] wrote: I have a Grid View and it has 6 jpeg images. I am applying a scale and alpha animation to that grid and then at the end of the animation i set the visibility of that view to invisible. The animation seems slow. I tried to use an AccelerateInterpolator but that doesnt seem to help. Is there a way to speed up the animation? Here is what my animation looks like (testanim.xml) ?xml version=1.0 encoding=utf-8? set xmlns:android=http://schemas.android.com/apk/res/android; alpha android:fromAlpha=0.2 android:toAlpha=1.0 android:duration=300 / scale android:duration=300 android:fillAfter=true android:fromXScale=1.75 android:toXScale=1 android:fromYScale=1.75 android:toYScale=1 android:pivotX=50% android:pivotY=50% / /set I load this animation in java as follows GridView gv = (GridView) findViewById(R.id.grid); Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); a.setInterpolator(new LinearInterpolator()); gv.startAnimation(a); gv.setVisibility(View.INVISIBLE); any ideas what I need to do to speed up the animation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] java.rmi.RemoteException
Hi, How to remove java.rmi.RemoteException in android. Can you please suggest link from where I can download supporting JAR files into eclipse - anroid platform. Thanks, Avi. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation seems slow
Actually the way you did it earlier is simpler and is meant to work. No need for a listener. On Tue, Nov 11, 2008 at 1:14 PM, Rohit Mordani [EMAIL PROTECTED] wrote: I moved to using an AnimationListener to make the view invisible at the end of the animation. That seems more correct now but it still doesn't improve the speed or smoothness (yes - i want to know how to do that too) of the animation. Here is my listener : class TestAnimListener implements AnimationListener { @Override public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub gv.setVisibility(View.INVISIBLE); } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } and I set it on the animation as follows: a.setAnimationListener(new TestAnimListener()); Rohit On Nov 11, 1:01 pm, Rohit Mordani [EMAIL PROTECTED] wrote: I have a Grid View and it has 6 jpeg images. I am applying a scale and alpha animation to that grid and then at the end of the animation i set the visibility of that view to invisible. The animation seems slow. I tried to use an AccelerateInterpolator but that doesnt seem to help. Is there a way to speed up the animation? Here is what my animation looks like (testanim.xml) ?xml version=1.0 encoding=utf-8? set xmlns:android=http://schemas.android.com/apk/res/android; alpha android:fromAlpha=0.2 android:toAlpha=1.0 android:duration=300 / scale android:duration=300 android:fillAfter=true android:fromXScale=1.75 android:toXScale=1 android:fromYScale=1.75 android:toYScale=1 android:pivotX=50% android:pivotY=50% / /set I load this animation in java as follows GridView gv = (GridView) findViewById(R.id.grid); Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); a.setInterpolator(new LinearInterpolator()); gv.startAnimation(a); gv.setVisibility(View.INVISIBLE); any ideas what I need to do to speed up the animation? -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] import error for aidl
Hello, I am trying to create an aidl interface. However when I add the following statement: import android.media.MediaPlayer; I get the following error message when trying to build the aidl through eclipse: couldn't find import for class android.media.MediaPlayer Am I not coding in the import statements correctly? Thanks, Anu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: no callback to onItemClick() on clicking my ListView
Hi Sunit, To get the position/index of the item on which its button is clicked is not hard. It is just equal to the final position parameter passed to getView(). So placing the parameter in onClicked callback of the button gets it done. On Nov 11, 8:16 am, Sunit Katkar [EMAIL PROTECTED] wrote: Add some id or attribute to your Button which has the information about the List item - say the position or index of the list item. So when a button click is received, you not only get the button clicked but also the position in the list. Maybe this will help. I am not sure if Android allows event bubbling and capture like in Javascript. - Sunit On Mon, Nov 10, 2008 at 5:24 PM, Nickname [EMAIL PROTECTED] wrote: Hi, Romain and Sunit. Thanks for replies from you both. My app needs to get both callbacks from the Button as well as from the other area of a ListView item. Right now, I use a onClick listener to the LinearLayout of every ListView item. It works so far :-) On Nov 10, 8:34 am, Romain Guy [EMAIL PROTECTED] wrote: If you put a focusable View inside a list item, then the list item will not be clickable. You would have to set a click listener on the button for instance. On Sun, Nov 9, 2008 at 10:18 PM, Nickname [EMAIL PROTECTED] wrote: One of my ListView's has a Button view on every item's LinearLayout. I just found that clicking on any item of the ListView does not callback its onItemClick(), which is set thru ListView.setOnItemClickListener(). If I remove the Button view from item layout, callback is ok then. Can anybody advise me how I get the callback on the ListView with Button? Thanks. -- Romain Guywww.curious-creature.org -- - Sunit Katkarhttp://sunitkatkar.blogspot.com/- Android OS Tutorials --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Does SoundPool work or has anyone successfully used it?
Here's an example for managing sounds that will be played many times (like gunshots, explosions, clicks, etc) using a pool and then sounds that are just one-offs, like an announcer or an intro sound. public class MediaPlayerPool { private static final String TAG = MediaPlayerPool; private Context context; private int streamType; private HashMapInteger, ArrayListMediaPlayer pools; public MediaPlayerPool(Context context, int streamType) { this.context = context; this.streamType = streamType; pools = new HashMapInteger, ArrayListMediaPlayer(); } public boolean hasMedia(int resourceId) { return pools.keySet().contains(resourceId); } public void addMedia(int resourceId, int poolSize) { ArrayListMediaPlayer pool = pools.get(resourceId); if (pool == null) { pool = new ArrayListMediaPlayer(); } for (int i = 0; i poolSize; i++) { pool.add(createMediaPlayer(resourceId)); } pools.put(resourceId, pool); } public void playMedia(int resourceId) { ArrayListMediaPlayer pool = pools.get(resourceId); MediaPlayer player = null; if (pool.size() 0) { player = pool.remove(0); } if (player == null) { Log.e(TAG, Pool is empty for resource + resourceId); } else { player.start(); } } public void release() { for (Integer key : pools.keySet()) { ArrayListMediaPlayer pool = pools.get(key); for (MediaPlayer player : pool) { if (player.isPlaying()) { player.stop(); } player.release(); } pool.clear(); } pools.clear(); } private MediaPlayer createMediaPlayer(final int resourceId) { MediaPlayer mp = MediaPlayer.create(context, resourceId); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer player) { player.seekTo(0); returnToPool(resourceId, player); } }); mp.setAudioStreamType(streamType); return mp; } private void returnToPool(int resourceId, MediaPlayer player) { ArrayListMediaPlayer pool = pools.get(new Integer(resourceId)); pool.add(player); } } public class MediaPlayerSoundManager { private static final String TAG = MediaPlayerSoundManager; private Context context; private MediaPlayerPool pool; private HashMapInteger, Integer soundResourceMap; public MediaPlayerSoundManager(Context context) { this.context = context; this.pool = new MediaPlayerPool(context, AudioManager.STREAM_MUSIC); this.soundResourceMap = new HashMapInteger, Integer(); } public void init() { release(); pool.addMedia(R.raw.sound_1, 2); soundResourceMap.put(SOUND_1, R.raw.sound_1); } public void playSound(int soundId) { int resourceId = getResourceId(soundId); if (pool.hasMedia(resourceId)) { pool.playMedia(resourceId); } else { playOneShotSound(resourceId); } } private int getResourceId(int soundId) { Integer resourceId = soundResourceMap.get(soundId); if (resourceId == null) { Log.e(TAG, No resource found for soundId + soundId); } return resourceId; } private void playOneShotSound(int resourceId) { MediaPlayer mp = MediaPlayer.create(context, resourceId); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.start(); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer arg0) { arg0.release(); } }); } public void release() { pool.release(); soundResourceMap.clear(); } } On Nov 10, 10:04 pm, plusminus [EMAIL PROTECTED] wrote: Hi all, any ideas on how to implement a kind of OnCompletionListener ? As I want to
[android-developers] How to get the Screen Width and Height?
Is AnyBody kown how to get the phone's Screen Width and Height ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation seems slow
Hmmm...ok - I thought that it might be trying to set the view to invisible while the animation is going on and that might cause some choppiness. You're saying that that is not the case? How can I make the animation smoother and snappier? Rohit On Nov 11, 1:18 pm, Romain Guy [EMAIL PROTECTED] wrote: Actually the way you did it earlier is simpler and is meant to work. No need for a listener. On Tue, Nov 11, 2008 at 1:14 PM, Rohit Mordani [EMAIL PROTECTED] wrote: I moved to using an AnimationListener to make the view invisible at the end of the animation. That seems more correct now but it still doesn't improve the speed or smoothness (yes - i want to know how to do that too) of the animation. Here is my listener : class TestAnimListener implements AnimationListener { [EMAIL PROTECTED] public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub gv.setVisibility(View.INVISIBLE); } [EMAIL PROTECTED] public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } [EMAIL PROTECTED] public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } and I set it on the animation as follows: a.setAnimationListener(new TestAnimListener()); Rohit On Nov 11, 1:01 pm, Rohit Mordani [EMAIL PROTECTED] wrote: I have a Grid View and it has 6 jpeg images. I am applying a scale and alpha animation to that grid and then at the end of the animation i set the visibility of that view to invisible. The animation seems slow. I tried to use an AccelerateInterpolator but that doesnt seem to help. Is there a way to speed up the animation? Here is what my animation looks like (testanim.xml) ?xml version=1.0 encoding=utf-8? set xmlns:android=http://schemas.android.com/apk/res/android; alpha android:fromAlpha=0.2 android:toAlpha=1.0 android:duration=300 / scale android:duration=300 android:fillAfter=true android:fromXScale=1.75 android:toXScale=1 android:fromYScale=1.75 android:toYScale=1 android:pivotX=50% android:pivotY=50% / /set I load this animation in java as follows GridView gv = (GridView) findViewById(R.id.grid); Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); a.setInterpolator(new LinearInterpolator()); gv.startAnimation(a); gv.setVisibility(View.INVISIBLE); any ideas what I need to do to speed up the animation? -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] WiFi within of emulator
Hello, I would like to know how to use a wireless connection of a laptop to simulate WIFI connection in the Android emulator. I would like to add a DLL or SO to the android emulator to use API WIFI. I have sources of android but, I do not understand where is the call to the native library in API java WIFI and I do not understand what is the name of native library for wifi in android. Someone can help me? Thank you very mutch. Monica --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AlarmManager.RTC_WAKEUP Not Waking Device?
Yes, for both these things, you need to hold a partial wake lock to keep the phone from turning off. On Nov 11, 12:02 pm, g1bb [EMAIL PROTECTED] wrote: Maybe PARTIAL_WAKE_LOCK, looking at it now... interesting. On Nov 11, 10:45 am, g1bb [EMAIL PROTECTED] wrote: Another question on this: Have you seen the Stopwatch application developed by Tom Taylor? I just downloaded it, and it keeps counting after the phone is put to sleep entirely. Any ideas on how he's doing that? I'm looking for that kind of functionality. Thanks again. On Nov 11, 3:51 am, hackbod [EMAIL PROTECTED] wrote: It does wake it up, but you are going to need to hold a wake lock to keep the device awake after your intent receiver returns. On Nov 10, 11:14 pm,g1bb[EMAIL PROTECTED] wrote: Hello, I've been trying to use AlarmManager.RTC_WAKEUP to wake up my device while it's sleeping, and then play some sounds. It seems like when it's charging, this works fine, but when it's not, the service doesn't start until I hit the menu button and am presented with the lock screen. Also, this seems to be working fine in the emulator, but not my real phone. Here's the alarm scheduling: ntent intent = new Intent(Main.this, OneShotAlarm.class); PendingIntent sender = PendingIntent.getBroadcast(Main.this, 0, intent, 0); // We want the alarm to go off 30 seconds from now. Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.SECOND, 60); // Schedule the alarm! AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender); - The OneShotAlarm BroadCastReceiver: public class OneShotAlarm extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, OneShotAlarm Broadcast invoked, 1000).show(); intent = new Intent(context, ServiceClassToRun.class); context.startService(intent); } - The Service: public class ServiceClassToRun extends Service { protected static final int Rnd = 0; public void onStart(Intent intent, int startId) { //do some business here } - And finally, my manifest: receiver android:name=.OneShotAlarm android:process=:remote / service android:name=.ServiceClassToRun / Any ideas are greatly appreciated. Has anyone else experienced this as well? Thanks in advance.- Hide quoted text - - Show quoted text -- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Service Permission
Be sure you install the .apk providing the permission before the one using it. You can see what permissions your app has been granted by digging through the output of adb shell dumpsys package. Also PLEASE DO NOT use the name android.permission. The namespaces android.* and com.android.* are reserved for the android platforms, and applications MUST NOT USE THEM. On Nov 11, 11:43 am, Raktim Das [EMAIL PROTECTED] wrote: Thanks a lot for analyzing the problem. First, my comment on your second point - This I had already been doing - as in the client application's manifest, the service application's manifest too has this entry under the manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / Now coming to the first point, I changed the client code line from - Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); to Intent intent = new Intent(com.abc.xyz.service.BackgroundService); After the change, it seems the service is identified and the earlier warning message - Unable to start service Intent{ comp={com.abc.xyz.client/ com.abc.xyz.service.BackgroundService} }:not found is not coming. But then the permission related SecurityException is coming at the client statement startService(intent) as below: - WARN/PackageManager(57): Not granting permission android.permission.ACCESS_BACKGROUND_SERVICE to package com.abc.xyz.client (protectionLevel=3 flags=0x44) - ERROR/AndroidRuntime(): ERROR: thread attach failed - WARN/ActivityManager(57): Permission Denial: Accessing service ComponentInfo{com.abc.xyz/com.abc.xyz.service.BackgroundService} from pid=57, uid=1000 requires android.permission.ACCESS_BACKGROUND_SERVICE - ERROR/AndroidRuntime(1120): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.xyz.client/ com.abc.xyz.client.ClientActivity}: java.lang.SecurityException: Not allowed to start service Intent { action=com.abc.xyz.service.BackgroundService } without permission android.permission.ACCESS_BACKGROUND_SERVICE I think I am missing something with the declaration of permission in the manifest(s). What is your opinion? Thanks, Raktim. On Nov 11, 4:48 am, hackbod [EMAIL PROTECTED] wrote: The Intent you are making to bind to the service is trying to find a component in your own .apk, not the other. The last permission error you mention is because you need to explicitly request to use even your own permissions. On Nov 10, 9:31 pm, Raktim Das [EMAIL PROTECTED] wrote: Hi, I am using 0.9 beta SDK. I want to have a service defined within one application to be invokable from another. The application hosting the service has, in its manifest, the following inside the application tag: service android:name=.service.BackgroundService android:process=:remote android:exported=true android:permission=android.permission.ACCESS_BACKGROUND_SERVICE intent-filter action android:name=com.abc.xyz.service.BackgroundService / /intent-filter /service It also has the following inside the manifest tag: permission android:name=android.permission.BACKGROUND_SERVICE android:protectionLevel=dangerous/ In my client application's manifest xml file, I have the following inside manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / The client Activity code has the following API called from its onCreate() method: private void startBackgroundService() { mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.i(TAG, Connected to background service); mService = BackgroundService.Stub.asInterface(service); } public void onServiceDisconnected(ComponentName className) { mService = null; Log.i(TAG, Background service disconnected); } }; Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); startService(intent); boolean result = bindService(intent, mConnection, Context.BIND_AUTO_CREATE); Log.i(TAG, Background service bind result: + result); } When I run the client Activity, it can not bind to the service: - the log statement at the end has Background service bind result: false. - the onServiceConnected() method is not called - There is a waring log from ActivityManager: WARN/ActivityManager(58): Unable to start service Intent { comp={com.abc.xyz.client/com.abc.xyz.service.BackgroundService} }: not found I have tried running the same without any permission in the service application manifest and also without the uses-permission tag in client. The result
[android-developers] Store audio in SQLite?
Does SQLite support mime type storage like an audio stream? What would be the column type? Any example SQL syntax reference would help. I know it is recommended to store those as files in external devices, but want to explore direct database storage option. Thanks!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android J2ME project
Hi all, I'm a new member of this group a newbie in google android j2me. I'm supposed to do a project that enable people to access their location information using google maps (using mobile phones that aren't GPS enabled). Really need assistance tutorials that will guide me on how to: 1. Basic intro on androids j2me. 2. Overlay lines on maps (to show paths). Assistance will be greatly appreciated. Rgds. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Service Permission
The Intent you are making to bind to the service is trying to find a component in your own .apk, not the other. The last permission error you mention is because you need to explicitly request to use even your own permissions. On Nov 10, 9:31 pm, Raktim Das [EMAIL PROTECTED] wrote: Hi, I am using 0.9 beta SDK. I want to have a service defined within one application to be invokable from another. The application hosting the service has, in its manifest, the following inside the application tag: service android:name=.service.BackgroundService android:process=:remote android:exported=true android:permission=android.permission.ACCESS_BACKGROUND_SERVICE intent-filter action android:name=com.abc.xyz.service.BackgroundService / /intent-filter /service It also has the following inside the manifest tag: permission android:name=android.permission.BACKGROUND_SERVICE android:protectionLevel=dangerous/ In my client application's manifest xml file, I have the following inside manifest tag: uses-permission android:name=android.permission.ACCESS_BACKGROUND_SERVICE / The client Activity code has the following API called from its onCreate() method: private void startBackgroundService() { mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { Log.i(TAG, Connected to background service); mService = BackgroundService.Stub.asInterface(service); } public void onServiceDisconnected(ComponentName className) { mService = null; Log.i(TAG, Background service disconnected); } }; Intent intent = new Intent(this, com.abc.xyz.service.BackgroundService.class); startService(intent); boolean result = bindService(intent, mConnection, Context.BIND_AUTO_CREATE); Log.i(TAG, Background service bind result: + result); } When I run the client Activity, it can not bind to the service: - the log statement at the end has Background service bind result: false. - the onServiceConnected() method is not called - There is a waring log from ActivityManager: WARN/ActivityManager(58): Unable to start service Intent { comp={com.abc.xyz.client/com.abc.xyz.service.BackgroundService} }: not found I have tried running the same without any permission in the service application manifest and also without the uses-permission tag in client. The result was the same. But when I run a similar client code inside my service application (without specifying any permissions), it runs perfectly. Finally, the most peculiar thing is happening when I am running this client code inside my service application but with the permissions specified (as written above) in the manifest - it runs with this error at the statement startService(intent): Caused by: java.lang.SecurityException: Not allowed to start service Intent { comp={com.abc.xyz/com.abc.xyz.service.BackgroundService} } without permission android.permission.ACCESS_BACKGROUND_SERVICE Any hint on this will be highly appreciated. I'd also like to know whether I can start and access the service from an ActivityGroup outside the service application domain. Thanks, -Raktim. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shares Preferences are not getting deleted
Thanks..I got the output... But still I didn't try the delete action. Thanks, Yasmin On Tue, Nov 11, 2008 at 4:56 PM, Sudha [EMAIL PROTECTED] wrote: Hi shared preferences are very simple. 1.create it prefereceObj = context.getSharedPreferences(preferenceName, modeOfAccess) 2.to write the data 1.obtain the editor Editor edr= prefereceObj.edit(); 2.use edr.putString(key, value)..putBoolean etc etc 3.edr.commit() 3.to read it prefereceObj.getFloat(key, defaultvalue if the pref/key is not there); 4.that it... but I am not getting my answer... mine is like a game application.if u ones delete the game.. the data will be there and if you reinstall it teh game is using the old data.. thats bad... how to do it... its behaving like ur desktop application..if u delete the front end the back end will be there.. hmmm -- Everything is Possible For U only --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anybody analyzing media player library
This should go on android-platform or one of the other related groups; this group is for application development with the SDK. On Nov 11, 2:12 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, Anybody trying to understand how the media player works? How the media player library(external\opencore\protocols\http_parcom \*.*) are linked with the framework media files(frameworks\base\media \*.*)? How the content is passed back from library to framework or application? Anybody looking into this please share your knowledge on this. regards Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: no callback to onItemClick() on clicking my ListView
Thanks for the pointer. The following worked in my case: getListView().setAddStatesFromChildren(false); getListView().setItemsCanFocus(true); It is tricky to find the right combination of settings that do what I want :-) Peli On Nov 11, 6:05 pm, Romain Guy [EMAIL PROTECTED] wrote: AlarmClock does not select the whole row. It uses two different widgets inside one list item. You can however give the highlight to the entire row by using android:addStatesFromChildren (or something similar, check the documentation of ViewGroup.) On Tue, Nov 11, 2008 at 8:46 AM, Peli [EMAIL PROTECTED] wrote: I have a similar problem. I want to do something similar as the AlarmClock application does (with CheckBox to the right, and clickable area to the left). With the onClick listeners this works in touch mode. Still, using the trackball, the whole row is selected. How can I prevent that and have the clickable area and the checkbox be selectable by trackball? Peli On Nov 11, 3:02 am, Romain Guy [EMAIL PROTECTED] wrote: Test trackball navigation then, it might not work. On Mon, Nov 10, 2008 at 5:24 PM, Nickname [EMAIL PROTECTED] wrote: Hi, Romain and Sunit. Thanks for replies from you both. My app needs to get both callbacks from the Button as well as from the other area of a ListView item. Right now, I use a onClick listener to the LinearLayout of every ListView item. It works so far :-) On Nov 10, 8:34 am, Romain Guy [EMAIL PROTECTED] wrote: If you put a focusable View inside a list item, then the list item will not be clickable. You would have to set a click listener on the button for instance. On Sun, Nov 9, 2008 at 10:18 PM, Nickname [EMAIL PROTECTED] wrote: One of my ListView's has a Button view on every item's LinearLayout. I just found that clicking on any item of the ListView does not callback its onItemClick(), which is set thru ListView.setOnItemClickListener(). If I remove the Button view from item layout, callback is ok then. Can anybody advise me how I get the callback on the ListView with Button? Thanks. -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: does android phone have a IP address?
Err, is this line in your manifest file? uses-permission android:name=android.permission.INTERNET / just asking On Nov 11, 9:06 am, Lei [EMAIL PROTECTED] wrote: Hi all I want to program a server on android phone. I use socket. Is the android emulator's IP address the same to the PC's? I got exceptions from the client which I program on the same PC. the exceptions is: java.net.ConnectException: Connection refused: connect java.lang.NullPointerException the code is below: java client: import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; public class JavaClient { public static void main(String argv[]) { Socket ClientSocket = null; DataOutputStream os= null; DataInputStream is = null; try { // Retrieve the ServerName InetAddress serverAddr = InetAddress.getByName(SERVERIP); /* Create new UDP-Socket */ ClientSocket = new Socket(serverAddr,SERVERPORT); os= new DataOutputStream(ClientSocket.getOutputStream()); is = new DataInputStream(ClientSocket.getInputStream()); } catch (UnknownHostException e) { System.err.println(Don't know about host: hostname); } catch (IOException e) { System.err.println(e); } try { os.writeBytes(hello); byte[] input = new byte[100]; while(is.read(input, 0, 10)!=-1) { System.out.println(new String(input)); } os.close(); is.close(); ClientSocket.close(); } catch (Exception e) { System.out.println(e); } } public static final String SERVERIP = 142.19.128.114; // 'Within' the emulator! public static final int SERVERPORT = ; } android server: public class AndroidServer extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); DataOutputStream os=null; DataInputStream is = null; ServerSocket socket = null; Socket ClientSocket = null; try { /* Create new UDP-Socket */ socket = new ServerSocket(SERVERPORT); ClientSocket = socket.accept(); os = new DataOutputStream(ClientSocket.getOutputStream()); is = new DataInputStream(ClientSocket.getInputStream()); /* By magic we know, how much data will be waiting for us */ byte[] buf = new byte[100]; while(is.read(buf, 0, 10)!=0) { Log.d(TCP, new String(buf)); os.writeBytes(end); } os.close(); is.close(); socket.close(); ClientSocket.close(); } catch (Exception e) { System.out.println(e); } } public static final int SERVERPORT = ; } Regards, Lei --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shares Preferences are not getting deleted
hi u can delete the values by using the clear() function it wont delete the file..yaarr its getting saved in data/data/ur apkpath/shared_prefs/urpref name.xml On Nov 11, 4:52 pm, yasmin afrose [EMAIL PROTECTED] wrote: Thanks..I got the output... But still I didn't try the delete action. Thanks, Yasmin On Tue, Nov 11, 2008 at 4:56 PM, Sudha [EMAIL PROTECTED] wrote: Hi shared preferences are very simple. 1.create it prefereceObj = context.getSharedPreferences(preferenceName, modeOfAccess) 2.to write the data 1.obtain the editor Editor edr= prefereceObj.edit(); 2.use edr.putString(key, value)..putBoolean etc etc 3.edr.commit() 3.to read it prefereceObj.getFloat(key, defaultvalue if the pref/key is not there); 4.that it... but I am not getting my answer... mine is like a game application.if u ones delete the game.. the data will be there and if you reinstall it teh game is using the old data.. thats bad... how to do it... its behaving like ur desktop application..if u delete the front end the back end will be there.. hmmm -- Everything is Possible For U only- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Check for new version of applications
I'm wondering about the same thing. All applications need to have a simple ability to notify users of new versions. For me 3rd party updaters/checkers is not an option - I can just as easily add simple check against my web site and download new APK file directly. A much cleaner solution is to query Android Market directly for new version. Can anyone illuminate me if this is possible or planned in the future. On Nov 10, 10:02 am, G [EMAIL PROTECTED] wrote: So version checking needs to be done through an outside resource... Is there anintentwe can use to launch theAndroidMarketApp directly to the listing for our own app, for when an update is available? On Nov 10, 4:35 am, friedger [EMAIL PROTECTED] wrote: Hi, we have prepared a release version of the OI Updater. There is no need to send intents, but developers only need to add a meta-data node to the application manifest in order to be handled by the updater. Early feedback welcome! Description:http://www.openintents.org/en/node/136 Download:http://openintents.googlecode.com/files/UpdateChecker-1.0.0.apk Cheers, Friedger On 6 Nov., 20:31, Guillaume Perrot [EMAIL PROTECTED] wrote: Because we use a XMPP based application, we chosed Pubsub as a way to notify new versions to the user. The main advantage is that it uses a push model. The user is aware of a new version when he launches the app or in real time if he's online while a new version has just been released. No timer or service at all in the application code. On Nov 5, 11:57 pm, friedger [EMAIL PROTECTED] wrote: Currently, relying on an external resource is the way to do updates, this is how it is described in the documentation. If someone is checking againstMarket, please let us know. Friedger On Nov 4, 8:49 pm, Dan B. [EMAIL PROTECTED] wrote: isn't there some way tocheckthe version against theMarketinstead of having to host version information somewhere else? I know the app Locale somehow knows when anupdateis available, it seems reasonable to query theMarketrather than relying on outside sources :\ On Nov 1, 1:50 pm,friedger[EMAIL PROTECTED] wrote: I'd say the package name is the global identifier. Maybe you can just provide a VeeCheck url based on the package name (as alternative to the app id). So I couldcheckthat url. If you don't host an app for the package name or if it is not unique you could return a HTTP 400. Friedger On 1 Nov., 17:37, Al Sutton [EMAIL PROTECTED] wrote: Friedger, How are you identifying the apps?, I'd happily add an extra field or two to the AndAppStore.com data that you can search for if it would be useful. Al. friedgerwrote: The idea is that the Updater will also be ablecheckall applications it knows about by a single button clicked or scheduled task. So, once theintentfrom one application is processed by theUpdateit is possible to include this application to the periodicupdate. A more general solution that includes all installed applications is currently not possible as I can't determine the location of the versioninfo file. The apk mentioned above is provided for developers to test. In the releaseversionthe interval between two checks will be at least 24 hours, so you can start the service as often as you like but thecheck is only performed once every 24 hours. Furthermore, only the log cat shows whether the installedversionis up-to-date or not. In both cases the notification is show (this is to simplify the tests). Would you like to have a different Notification text? Any ideas for icons? Friedger On 1 Nov., 13:18, Al Sutton [EMAIL PROTECTED] wrote: HiFriedger, I've updated AndAppStore.com to provide a versionCode in theupdate.xml as you requested. At the moment anyone with applications listed will find that they can specify the versionCode in the details about a releasedversion(not the application details page, the release details page). I am working on code to pull the information from the manifest included in the apk, but this is a little way off yet. Thanks for making this available. Al. friedgerwrote: Hi, we are preparing the OI Updater that checks a given info file for new updates as described in theAndroiddocumentation. You can find the current build (rev 1284) at http://openintents.googlecode.com/files/UpdateChecker.apk In order to initiate theupdatecheckyou just have to add the following code: Intentservice = newIntent();
[android-developers] Re: Where to find Jarsigner
L think that you can input commandline jarsigner . [EMAIL PROTECTED] 2008年11月11日 - Original Message - From: CM To: Android Developers Sent: 2008-11-11, 18:20:39 Subject: [android-developers] Where to find Jarsigner I have checked the bin folder of my jre and it is not there. Keytool is there, but no jarsigner. I tried googling this but all I found was to check the bin folder. Does anyone know where jarsigner is or know where I can download it from? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.rmi.RemoteException
Um, what does downloading jar files have to do with this exception? Perhaps you could post the code in question? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: no callback to onItemClick() on clicking my ListView
The first line is useless :) On Tue, Nov 11, 2008 at 1:49 PM, Peli [EMAIL PROTECTED] wrote: Thanks for the pointer. The following worked in my case: getListView().setAddStatesFromChildren(false); getListView().setItemsCanFocus(true); It is tricky to find the right combination of settings that do what I want :-) Peli On Nov 11, 6:05 pm, Romain Guy [EMAIL PROTECTED] wrote: AlarmClock does not select the whole row. It uses two different widgets inside one list item. You can however give the highlight to the entire row by using android:addStatesFromChildren (or something similar, check the documentation of ViewGroup.) On Tue, Nov 11, 2008 at 8:46 AM, Peli [EMAIL PROTECTED] wrote: I have a similar problem. I want to do something similar as the AlarmClock application does (with CheckBox to the right, and clickable area to the left). With the onClick listeners this works in touch mode. Still, using the trackball, the whole row is selected. How can I prevent that and have the clickable area and the checkbox be selectable by trackball? Peli On Nov 11, 3:02 am, Romain Guy [EMAIL PROTECTED] wrote: Test trackball navigation then, it might not work. On Mon, Nov 10, 2008 at 5:24 PM, Nickname [EMAIL PROTECTED] wrote: Hi, Romain and Sunit. Thanks for replies from you both. My app needs to get both callbacks from the Button as well as from the other area of a ListView item. Right now, I use a onClick listener to the LinearLayout of every ListView item. It works so far :-) On Nov 10, 8:34 am, Romain Guy [EMAIL PROTECTED] wrote: If you put a focusable View inside a list item, then the list item will not be clickable. You would have to set a click listener on the button for instance. On Sun, Nov 9, 2008 at 10:18 PM, Nickname [EMAIL PROTECTED] wrote: One of my ListView's has a Button view on every item's LinearLayout. I just found that clicking on any item of the ListView does not callback its onItemClick(), which is set thru ListView.setOnItemClickListener(). If I remove the Button view from item layout, callback is ok then. Can anybody advise me how I get the callback on the ListView with Button? Thanks. -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guywww.curious-creature.org -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation seems slow
It depends on the rest of your UI. But if you're animating a fullscreen GridView, it's gonna be slow on the G1 (unfortunately.) On Tue, Nov 11, 2008 at 1:27 PM, Rohit Mordani [EMAIL PROTECTED] wrote: Hmmm...ok - I thought that it might be trying to set the view to invisible while the animation is going on and that might cause some choppiness. You're saying that that is not the case? How can I make the animation smoother and snappier? Rohit On Nov 11, 1:18 pm, Romain Guy [EMAIL PROTECTED] wrote: Actually the way you did it earlier is simpler and is meant to work. No need for a listener. On Tue, Nov 11, 2008 at 1:14 PM, Rohit Mordani [EMAIL PROTECTED] wrote: I moved to using an AnimationListener to make the view invisible at the end of the animation. That seems more correct now but it still doesn't improve the speed or smoothness (yes - i want to know how to do that too) of the animation. Here is my listener : class TestAnimListener implements AnimationListener { @Override public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub gv.setVisibility(View.INVISIBLE); } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } and I set it on the animation as follows: a.setAnimationListener(new TestAnimListener()); Rohit On Nov 11, 1:01 pm, Rohit Mordani [EMAIL PROTECTED] wrote: I have a Grid View and it has 6 jpeg images. I am applying a scale and alpha animation to that grid and then at the end of the animation i set the visibility of that view to invisible. The animation seems slow. I tried to use an AccelerateInterpolator but that doesnt seem to help. Is there a way to speed up the animation? Here is what my animation looks like (testanim.xml) ?xml version=1.0 encoding=utf-8? set xmlns:android=http://schemas.android.com/apk/res/android; alpha android:fromAlpha=0.2 android:toAlpha=1.0 android:duration=300 / scale android:duration=300 android:fillAfter=true android:fromXScale=1.75 android:toXScale=1 android:fromYScale=1.75 android:toYScale=1 android:pivotX=50% android:pivotY=50% / /set I load this animation in java as follows GridView gv = (GridView) findViewById(R.id.grid); Animation a = AnimationUtils.loadAnimation(this, R.anim.testanim); a.setInterpolator(new LinearInterpolator()); gv.startAnimation(a); gv.setVisibility(View.INVISIBLE); any ideas what I need to do to speed up the animation? -- Romain Guywww.curious-creature.org -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Head-scratcher: NullPointerException from startActivity(ACTION_CALL)
On Nov 11, 11:35 am, dreamerBoy [EMAIL PROTECTED] wrote: Actually, thank you - you WERE correct - onCreate is NOT being called for this Activity. I tried doing a wait() for 5 - then 30 seconds on the onCreate callback being called - the wait timed out... Hmmm how to force an Activity to properly initialize itself. Wait isn't going to do anything, because all application components are called from them main thread. So if you block in one of the callbacks, none of the others will run either. See the section on threads here: http://code.google.com/android/intro/appmodel.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: EditTextPreference mask passwords
There's a password attribute you can use in the xml file. On Nov 11, 5:25 am, Brian Yarger [EMAIL PROTECTED] wrote: I've got a user preference that is a password. Is there a way to mask the input like there is with an EditText component? Or do I need to subclass EditTextPreference to get this behavior? Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Any way to have two MediaRecorders recording at once?
Hi all, For my app I need to have two audio recordings that overlap each other - that is, at some points in time there will be two separate audio files being created from the same audio source. I have attempted to use two MediaRecorders and start the second one while the first is still recording. When I do this I get the following error: ERROR/AudioFlinger(25): Record channel already open Is there any way to get around this? Thanks in advance, Blake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Store audio in SQLite?
Hi, Only a suggestion. If audio files are the reason of your database size increase, you could store this kind of files in simcard and use a string field in database to access this file. Have fun... Marcelo On Tue, Nov 11, 2008 at 11:31 AM, g1ster [EMAIL PROTECTED] wrote: Does SQLite support mime type storage like an audio stream? What would be the column type? Any example SQL syntax reference would help. I know it is recommended to store those as files in external devices, but want to explore direct database storage option. Thanks!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Comment spam in android market :(
Yes it is rediculous, There is swearing, racial slurs, comments about body parts, all randomly out of nowhere. Google needs to kill the comments from being displayed so that only the app creator can see them and the rating system is defunk as well because people are ratting 1;'s because they dont understand apps or there is a german online book being rated ones because people are commenting its stupud because its in german... what do u expect even the descripion is German if u cannot see this was in German dont rate it poorly.. these are all situations and issue that need to be worked out. or require atleast a 300 character comment inorder to rate lower than a 3 so people are not just rated unfairly because of immature people. On Nov 11, 5:56 am, Al Sutton [EMAIL PROTECTED] wrote: I can see this as a good idea so I've comment ratings into AndAppStore.com, sorted the displayed comments by ranking, and show 5 at a time. It took me a couple of hours to put the code together, so I'd hope that the guys at google can do something similar for marketplace in the next few days. Al. plusminus wrote: Comments with bad ratings get hidden and need to be expanded by the user -- Almost no one will see them anymore +1 for Comment-Rating-System On 11 Nov., 00:10, zl25drexel [EMAIL PROTECTED] wrote: well the ratings/comments now are just the same as the ratings/ comments on youtube. does any1 ever reads them? On Nov 10, 4:29 pm, Andrew Burgess [EMAIL PROTECTED] wrote: On Mon, Nov 10, 2008 at 4:18 PM, Disconnect [EMAIL PROTECTED] wrote: ..or just punt out users for ToS violations. On Sat, Nov 8, 2008 at 3:24 PM, ryaninc [EMAIL PROTECTED] wrote: I wholeheartedly agree. The comments are invaluable for determining how well an application works, but it's almost to the point where the comments are worthless because there's so much spam and completely off- topic discussion. While I don't like comment moderation as a whole, there should be automatic filtering at the very least. Maybe Google could implement a filter that would delete comments with swear words, or even just turn them into asterisks. There really needs to be a solution to this, it's really getting bad. :-( Perhaps an implementation similar to many online retailers where users can say whether a review was helpful. Comments that others found helpful in making their decision could be floated to the top (or at least supply a sorting option/preference) so that it's easier to find more useful information. Similarly, a comment with enough bad feedback could be put up for some sort of review, and if deemed acceptable, the offending user could have comment privileges banned for some period of time. -- Andrew Burgess -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries.- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need help using hat to track down memory usage
Hi, I also asked this question several times already. I think having a great memory usage analysis for Android would be a key differentiator compared to other environments. I would be willing to help out the get the Eclipse Memory Analyzer (JHat sucks, sorry :]) to support Android. Why is the heap format different? Regards, Markus (http://kohlerm.blogspot.com/) On Nov 7, 1:24 am, fadden [EMAIL PROTECTED] wrote: On Nov 5, 11:12 am, Disco Stu 010 [EMAIL PROTECTED] wrote: java.io.IOException: Version string not recognized at byte 17 at hat.parser.HprofReader.readVersionHeader(HprofReader.java:325) at hat.parser.HprofReader.read(HprofReader.java:169) at hat.parser.Reader.readFile(Reader.java:90) at hat.Main.main(Main.java:149) The output isn't compatible. Unfortunately we were not able to include the modified hat tool in the 1.0 source release. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get the Screen Width and Height?
You can get the size of the usable area by asking your activity's top- level view (typically a layout object) for its width and height. Make sure your XML file defines an ID for it, then use getViewById to get the view. That width and height will be the screen size less the status bar and title bar (if present), and will vary depending on the device orientation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android J2ME project
brownbear wrote: [...] I'm a new member of this group a newbie in google android j2me. Unfortunately Android doesn't actually support J2ME --- it's J2SE more than anything else. You're unlikely to be able to use any existing J2ME code. The documentation is excellent; try the 'getting started' pages on the left: http://code.google.com/android/documentation.html -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: problem obtaining android source from windows/cygwin
Just so that we have a trace in the group archives... The instructions at http://source.android.com/download should work on MacOS and linux, which are the supported environments. Under Windows, which is not a supported environment, you're indeed on your own. Also, you should note that, without using repo (which requires MacOS or linux), you will not be able to contribute changes back to the Android Open Source Project. Some people have reported success using repo in a VMWare environment running linux, hosted on Windows. (Finally, this thread would probably fit better in android-platform or maybe repo-discuss, so that android-developers can remain focused on discussion topics that primarily target application developers using the SDK). Cheers, JBQ On Mon, Nov 10, 2008 at 2:23 PM, dreamerBoy [EMAIL PROTECTED] wrote: Fixed my own problem: Go to: http://android.git.kernel.org/ Depending on your particular interest, you may want other packages but you probably definitely want platform/frameworks/base.git Nota Bene: Do ~~NOT~~ go to: http://source.android.com/download Guaranteed, you will waste a few hours struggling with repo, Python, gnugp, key encryption and other things (ask me how I know). Paul On Nov 6, 12:40 pm, dreamerBoy [EMAIL PROTECTED] wrote: bash-3.2$ /cygdrive/c/myRepo/repo init -u git://android.git.kernel.org/platform/manifest.git Traceback (most recent call last): File /cygdrive/c/myRepo/repo, line 587, in module main(sys.argv[1:]) File /cygdrive/c/myRepo/repo, line 554, in main _Init(args) File /cygdrive/c/myRepo/repo, line 173, in _Init _CheckGitVersion() File /cygdrive/c/myRepo/repo, line 202, in _CheckGitVersion proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) File /cygdrive/c/cygwin/lib/python2.5/subprocess.py, line 593, in __init__ errread, errwrite) File /cygdrive/c/cygwin/lib/python2.5/subprocess.py, line 1079, in _execute_ child raise child_exception OSError: [Errno 2] No such file or directory I wouldn't describe myself as a Python guru. Has anyone been able to overcome and fix this problem? Thanks much. Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: does android phone have a IP address?
Lei wrote: I want to program a server on android phone. I use socket. Is the android emulator's IP address the same to the PC's? No. On the emulator, 10.0.2.2 is a magic IP address that converts into localhost on your PC. http://code.google.com/android/reference/emulator.html#networkaddresses -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: progress dialog
Hi Christine, Thanks for your help. That seems to only work in the initial loading screen. How do I go about doing the same when the user scroll to an image that I am still loading and then show the loading progress bar. Is there an example somewhere that i can follow? thanks On Nov 11, 4:45 am, Christine [EMAIL PROTECTED] wrote: At the start of your program, do requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); Then when you want to display a rotating little circle in the title bar, do setProgressBarIndeterminateVisibility(true); When updating or whatever is done, do setProgressBarIndeterminateVisibility(false); Of course, you can use other types of progress bars in pretty much the same way. On Nov 11, 9:00 am, chouman82 [EMAIL PROTECTED] wrote: I am having a little problem of using progress dialog. Trying to figure out how and the optimal way of using the progress dialog. My application needs to grab information from different servers, so I am trying to show the progress dialog at the appropriate moment. I am trying to use a gallery to grab different images. At the start of the activity, I will have a pop up that says loading, and then spin off a different thread to start retrieving images in the background and store the images in a bitmap array. And once I get the first few images, the thread would send a message to the activity to let it know that it can set up the adapter and start displaying the first few images. The user then can start flipping through different images. In the adapter getView method, I will check the bitmap array from the thread to see if the image in the specific position that the user is trying to view is loaded yet. If the bitmap array for the position is null then the adapter will send a message to the activity and asks the activity to display the progress dialog and at the same time the adapter will tell the thread that the user is trying to view the image at that specific position. Then the thread will then send a message to the activity to dismiss the progress dialog once the image of that specific position has been loaded. That's the general idea, but for some reason the message been sent from the adapter to the activity for showing the progress dialog is not working. I can see the message been send because the logging is been printed out in the message handler but the dialog is not showing up. Anyone has a clue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---