答复: [android-developers] Re: How to launch YouTu be with specified keywords?
Got you and this article is great! But If you searched with YouTube by some keyword, even you changed the keyword for the second time, YouTube won't renew the Result list, that means on this way, YouTube will always shows the result list by the keyword which inputted at the very first time. Thanks, Best Regards, David -邮件原件- 发件人: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] 代表 Kumar Bibek 发送时间: 2010年3月11日 20:12 收件人: Android Developers 主题: [android-developers] Re: How to launch YouTube with specified keywords? Check this link http://tech-droid.blogspot.com/2010/03/youtube-intent-for-search-in-android.html Thanks and Regards, Kumar Bibek On Mar 11, 5:01 pm, Kumar Bibek coomar@gmail.com wrote: This works Intent intent = new Intent(Intent.ACTION_SEARCH); intent.setPackage(com.google.android.youtube); intent.putExtra(query, Android); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Thanks and Regards, Kumar Bibek. On Mar 11, 10:13 am, Kumar Bibek coomar@gmail.com wrote: Try this. Intent intent = new Intent(Intent.ACTION_SEARCH); intent.putExtra(query, Android); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Here, you will get a Chooser activity. Now when you select Youtube, you will get video results for Android. Thanks and Regards, Kumar Bibek On Mar 11, 6:28 am, David android.and...@gmail.com wrote: Dear All, I want launch the YouTube with specified video searching list at startup(e.g I want YouTube shows the video list all related with the key word Susan and U.S in the first page.) But The YouTube application is not open source in Éclair, would you please tell me which YuTube API can implement this feature? Thanks, Best Regards, David -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: to get/generate nonce. error in random, getBytes Options
thanks a lot. it helped. On Mar 12, 12:25 am, Bob Kerns r...@acm.org wrote: The author meant to say 'nextBytes(byte[])' instead of 'getBytes(byte[])' It's called nextBytes instead of getBytes because you can call it repeatedly, getting additional random bytes each time. On Mar 8, 6:19 pm, sebby zml sebby@gmail.com wrote: thanks a lot for letting me know that the code written there is incorrect. i'll work on it. On Mar 9, 9:59 am, Mark Murphy mmur...@commonsware.com wrote: sebby zml wrote: Hello every1, I am now working on a program which is someting related to IMS. I want the Server to send back a nonce to the Client. In order to get nonce, I tried using the code from this site. == http://forums.sun.com/thread.jspa?threadID=595626 -Use java.security.SecureRandom: --byte[] nonce = new byte[16]; --Random rand; --rand = SecureRandom.getInstance (SHA1PRNG); --rand.getBytes (nonce); But the problem is I could not use rand.getBytes as the class Random doesn't provide methot getbytes(). Is there any other way to get or generate nonce? please help. Thanks a lot. There has not been a getBytes() method on Random or SecureRandom going back at least to Java 1.4.2, and perhaps earlier. I suggest you find a better sample of using SecureRandom -- that forum post is incorrect. I would recommend you consider posting on StackOverflow, with the #java tag. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in NYC: 1-2 May 2010:http://guruloft.com-Hidequoted 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Custom MediaPlayer Interface Thru JNI
Hi Kavitha, You can look up the source code of android to get an idea about how Android have implemented the MediaPlayer interface in Java. You can follow on similar lines. Cheers Sandeep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AbstractAccountAuthenticator.getAccountRemovalAllowed query
hi, I'm trying to create a sync account which should not be deleted by user ( On selecting RemoveAccounts from Accounts settngs). For that, I overriden getAccountRemovalAllowed() function. From the java docs (@ http://developer.android.com/reference/android/accounts/AbstractAccountAuthenticator.html) it says we can return a bundle with any of the below keys. - KEY_INTENT../../../reference/android/accounts/AccountManager.html#KEY_INTENT, or - KEY_BOOLEAN_RESULT../../../reference/android/accounts/AccountManager.html#KEY_BOOLEAN_RESULT, true if the removal of the account is allowed, false otherwise - KEY_ERROR_CODE../../../reference/android/accounts/AccountManager.html#KEY_ERROR_CODEand KEY_ERROR_MESSAGE../../../reference/android/accounts/AccountManager.html#KEY_ERROR_MESSAGEto indicate an error The problem I'm seeing is, it always shows the same Dialog on selecting Remove account even if I return any key bundle ( KEY_INTENT, BOOLEAN,ERROR_CODE). I wanted to shown my own custom activity with the reason for not deleting. I'm creating the Intent of my custom activity and returning it in Bundle from getAccountRemovalAllowed() api. Instead launching my custom activity, Its showing a Dialog with text This account is required by some applications, You can only Please let me know, If I missed something?. Thanks. Regards, Sukumar. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] What is difference between intent and pending intent ?
hey friends, can anyone say me the main difference between intent and pending intent? and their usage in application with example -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] try to load system JNIs
hello if i try to load libwebcore or libmedia from my app it will fail because the system libs has been loaded by zygote and by JNI spec *The same JNI native library cannot be loaded into more than one class loader.* but from the log and the code (dalvik/system/VMStack) the bootstrap class loader ( the ClassLoader of Zygote) is null although the Class.getClassLoader() can get the instance of the bootstrap class loader Isn't it strange here? libwebcore.so is loaded by a classloader before which is a null object thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bind to system service
Anybody? Or is this again one of these cases where that's not how the information is supposed to be used... On 11 Mrz., 17:41, Chrissshen chri...@googlemail.com wrote: Hi, is it possible somehow to bind to private system services? What I want to do is listen to the activitymanagerservice and be notified when other activites are started. I tried implementing the IActivityController.aidl from the Sourcecode. It has methods like activityStarting and activityResuming but this didn't really work. (I used the idea from here:http://blog.codetastrophe.com/2008/12/accessing-hidden-system-service... , problem is there is no proper private field one could use at least c.getDeclaredFields() doesn't return anything useful from the activity manager) Any ideas how I can get notified of things going on in the Activity Manager without having to do a getRunningTasks all the time? Because this is the only workaround I came up with but it slows down the phone. Every help is appreciated. Many Thanks, Chris ##IActivityController.aidl: /* ** ** Copyright 2009, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the License); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an AS IS BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ package android.app; import android.content.Intent; import android.app.IActivityWatcher; /** * Testing interface to monitor what is happening in the activity manager * while tests are running. Not for normal application development. * {...@hide} */ interface IActivityController { /** * The system is trying to start an activity. Return true to allow * it to be started as normal, or false to cancel/reject this activity. */ boolean activityStarting(in Intent intent, String pkg); /** * The system is trying to return to an activity. Return true to allow * it to be resumed as normal, or false to cancel/reject this activity. */ boolean activityResuming(String pkg); /** * An application process has crashed (in Java). Return true for the * normal error recovery (app crash dialog) to occur, false to kill * it immediately. */ boolean appCrashed(String processName, int pid, String shortMsg, String longMsg, in byte[] crashData); /** * An application process is not responding. Return 0 to show the app * not responding dialog, 1 to continue waiting, or -1 to kill it * immediately. */ int appNotResponding(String processName, int pid, String processStats); /** * Often you want to allow a service to call back to its clients. * This shows how to do so, by registering a callback interface with * the service. */ void registerActivityWatcher(IActivityWatcher watcher); /** * Remove a previously registered callback interface. */ void unregisterActivityWatcher(IActivityWatcher watcher); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: 答复: [android-developers] Re: How to launch Y ouTube with specified keywords?
It works for me, I checked with 3-4 queries. Thanks and Regards, Kumar Bibek On Mar 12, 1:34 pm, David android.and...@gmail.com wrote: Got you and this article is great! But If you searched with YouTube by some keyword, even you changed the keyword for the second time, YouTube won't renew the Result list, that means on this way, YouTube will always shows the result list by the keyword which inputted at the very first time. Thanks, Best Regards, David -邮件原件- 发件人: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] 代表 Kumar Bibek 发送时间: 2010年3月11日 20:12 收件人: Android Developers 主题: [android-developers] Re: How to launch YouTube with specified keywords? Check this link http://tech-droid.blogspot.com/2010/03/youtube-intent-for-search-in-a... Thanks and Regards, Kumar Bibek On Mar 11, 5:01 pm, Kumar Bibek coomar@gmail.com wrote: This works Intent intent = new Intent(Intent.ACTION_SEARCH); intent.setPackage(com.google.android.youtube); intent.putExtra(query, Android); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Thanks and Regards, Kumar Bibek. On Mar 11, 10:13 am, Kumar Bibek coomar@gmail.com wrote: Try this. Intent intent = new Intent(Intent.ACTION_SEARCH); intent.putExtra(query, Android); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Here, you will get a Chooser activity. Now when you select Youtube, you will get video results for Android. Thanks and Regards, Kumar Bibek On Mar 11, 6:28 am, David android.and...@gmail.com wrote: Dear All, I want launch the YouTube with specified video searching list at startup(e.g I want YouTube shows the video list all related with the key word Susan and U.S in the first page.) But The YouTube application is not open source in Éclair, would you please tell me which YuTube API can implement this feature? Thanks, Best Regards, David -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Attn: Devs running games or apps in compatibility modes
Spare Parts the one from Google? Stock in emulator? On Mar 12, 1:56 pm, Robert Green rbgrn@gmail.com wrote: I know several of you wrote your apps and games before 1.6 was out or before you had a trusty N1 or Droid to test on. This led to many apps that rely on compatibility mode, that is, a width (when portrait) that is always 320 to make things work out. For 3D games, this made our games continue to work because when the games are run full resolution, our 1.5-compliant textures get scaled up automatically and become non power-of-two, causing white or black wherever a texture should be drawn (and then users complain that our games are nothing but white!) Well I wasn't very worried about it and I still have a few games in compatibility mode but recently a user contacted me, telling me that one of my games (Light Racer 3D) and a few other 3D games were all white on his Droid. I asked him if he had ever run any kind of tweak utility and he said that when he first got his phone, he installed an app called Spare Parts and played with some settings on it. Apparently one of the settings disabled compatibility mode and runs everything full-res, breaking many of our apps and games. Of course users don't know that's what they are doing. They think they are somehow unlocking their phone's potential that their evil carriers didn't give them access to. If only they understood! First of all, if you're the author of Spare Parts, that's a bad idea. Please don't give users that option. Nothing good can come of it. Second, since there will probably always be some kind of tweak app out there that allows for disabling compatibility mode, it's in your best interest as a developer to update your old apps and make them work at every resolution. Counting on compatibility mode in the long term is a bad idea I think. That's all. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Rebuilding Launcher.apk
The apk file is just a zip file; you don't need eclipse to open / modify it. However, you will probably need to sign it after making changes (and if you don't have the original signing key, I'm not certain if you can then load it onto the phone unless you've also changes the package name). On Mar 11, 11:40 am, Coffee mycoffeeple...@gmail.com wrote: I would like to rebuild the launcher.apk in Eclipse so I can have access to edit the .xml files to customize the launcher. How would I go about doing this? I kind of have a idea, but I need some more though push. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Bluetooth UUID
Thanks for the reply. We got the serial over bluetooth connection working with our device. That UUID was correct. Is it true that every kind of profile has it's unique uuid? 2010/3/11 moneytoo m...@seznam.cz You may have some luck running sdptool browse on linux machine. On Mar 11, 10:41 am, Peter Fortuin peter.fort...@gmail.com wrote: Hello, I want to create a serial connection over Bluetooth to a device I have. But the problem is that I don't know the UUID of the service on that device. How can I found out what the UUID is before connecting? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Bind to system service
Chrissshen wrote: Anybody? Or is this again one of these cases where that's not how the information is supposed to be used... snip is it possible somehow to bind to private system services? I sure hope not, except through whatever is exposed by the SDK. What I want to do is listen to the activitymanagerservice and be notified when other activites are started. Malware could use this to, say, interpose themselves in front of a banking app with a lookalike screen, to intercept a login. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Drawing failure?
On Mar 10, 8:45 pm, dwilde1 dwil...@gmail.com wrote: The following routine in a subclass of view attempts to draw a bell curve on a canvas and display it. The answer was actually simple. I was setting up my canvas and its contents in onCreate() and onStart(), but the canvas is never rendered for the first time by onDraw() until the end of onStart(). . This unfortunately means also that you cannot measure the canvas until then, so you can't initialize line-drawing arrays unless you use the physical screen dimensions from DisplayMetrics, which is A Bad Idea. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bind to system service
You're right, I havn't thought of such a scenario. On 12 Mrz., 13:42, Mark Murphy mmur...@commonsware.com wrote: Chrissshen wrote: Anybody? Or is this again one of these cases where that's not how the information is supposed to be used... snip is it possible somehow to bind to private system services? I sure hope not, except through whatever is exposed by the SDK. What I want to do is listen to the activitymanagerservice and be notified when other activites are started. Malware could use this to, say, interpose themselves in front of a banking app with a lookalike screen, to intercept a login. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Attn: Devs running games or apps in compatibility modes
What the frack? Why would such an option even be in there...I see no reason for it to be accessible... On Mar 12, 5:32 am, Farproc farp...@gmail.com wrote: Spare Parts the one from Google? Stock in emulator? On Mar 12, 1:56 pm, Robert Green rbgrn@gmail.com wrote: I know several of you wrote your apps and games before 1.6 was out or before you had a trusty N1 or Droid to test on. This led to many apps that rely on compatibility mode, that is, a width (when portrait) that is always 320 to make things work out. For 3D games, this made our games continue to work because when the games are run full resolution, our 1.5-compliant textures get scaled up automatically and become non power-of-two, causing white or black wherever a texture should be drawn (and then users complain that our games are nothing but white!) Well I wasn't very worried about it and I still have a few games in compatibility mode but recently a user contacted me, telling me that one of my games (Light Racer 3D) and a few other 3D games were all white on his Droid. I asked him if he had ever run any kind of tweak utility and he said that when he first got his phone, he installed an app called Spare Parts and played with some settings on it. Apparently one of the settings disabled compatibility mode and runs everything full-res, breaking many of our apps and games. Of course users don't know that's what they are doing. They think they are somehow unlocking their phone's potential that their evil carriers didn't give them access to. If only they understood! First of all, if you're the author of Spare Parts, that's a bad idea. Please don't give users that option. Nothing good can come of it. Second, since there will probably always be some kind of tweak app out there that allows for disabling compatibility mode, it's in your best interest as a developer to update your old apps and make them work at every resolution. Counting on compatibility mode in the long term is a bad idea I think. That's all. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Attn: Devs running games or apps in compatibility modes
On Fri, Mar 12, 2010 at 5:32 AM, Farproc farp...@gmail.com wrote: Spare Parts the one from Google? Stock in emulator? Yup - some dude took the code and released it as an app. With ads no less. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] OnPause() - how to resume to an activity which has a Bundle passed to it when it is created
On Fri, Mar 12, 2010 at 12:28 AM, Prajakta Shitole prajakt...@gmail.comwrote: One of my idea was to store the picture and the text view in the service and on click of a menu button navigate to another activity which will connect to the service and draw the stored pictures, text views in its activity. I haven't done anything like this but this seems like what you would want to do. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bind to system service
You're right, I havn't thought of such a scenario. On 12 Mrz., 13:42, Mark Murphy mmur...@commonsware.com wrote: Chrissshen wrote: Anybody? Or is this again one of these cases where that's not how the information is supposed to be used... snip is it possible somehow to bind to private system services? I sure hope not, except through whatever is exposed by the SDK. What I want to do is listen to the activitymanagerservice and be notified when other activites are started. Malware could use this to, say, interpose themselves in front of a banking app with a lookalike screen, to intercept a login. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Soft Home, Menu, Back keys in status bar
For the benefit of anybody else who's trying to tackle this, here's the link to the interesting changes in the Android-x86 codebase: http://git.android-x86.org/?p=platform/frameworks/base.git;a=commit;h... Aaron On Mar 9, 10:03 am, asher as...@vanteon.com wrote: I have a device with no hard buttons, on which I need to get Android running. The basic port is done, but I need to provide access to Home, Menu, and Back. The Archos tablets put soft buttons in the status bar, and I'm told that the android-x86 folks have implemented this as well (though I haven't found it in their source yet). Can anybody offer any suggestions on how to go about this? Thanks, Aaron -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager on droids
I ran this project overnight on a DROID: http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices/Alarm/ Every alarm fired, as expected. The device sat idle, unplugged, for over 12 hours. I'll be checking it again every 12 hours or so for a while, to see if it fails. After all, it may be that I just was lucky and the problem will still crop up. The work that this project does is very limited -- appends a line to a log file on the SD card. Hence, the problem may occur if the background task takes longer, interacts with radios, or something along those lines. But, at least, right now, I have no evidence that it's a blanket problem affecting alarms on all DROIDs. Also, I should note that there are some apps out there that hack the DROID a bit (e.g., overclocking). If you only see this in the field, and not in the lab, and from only a small percentage of DROID users, it could be something like that is interfering with the operation of the device, and, hence, your app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Online Training: 26-30 April 2010: http://onlc.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] What is difference between intent and pending intent ?
On Fri, Mar 12, 2010 at 4:12 AM, Musafir musafir4frie...@gmail.com wrote: hey friends, can anyone say me the main difference between intent and pending intent? and their usage in application with example http://developer.android.com/intl/de/reference/android/content/Intent.html http://developer.android.com/intl/de/reference/android/content/Intent.html http://developer.android.com/intl/de/reference/android/app/PendingIntent.html - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] su access
Hello... I am a novice in android programming and wanted to work on the GPS related apps. I tried using DDMS in eclipse but it doesn't send the co- ordinates (or my app doesn't pick it up). I tried typing 'geo' with the co-ordinates but it gives a message as permission denied. Could some one please tell me how do I go about sending GPS co-ordinates and also use the emulator...become SU... Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Which API Level to target
hi how to create avd for api level 7 i.e, for android 2.1 with regards Nayana On Wed, Mar 10, 2010 at 8:52 PM, k. bhuvaneswari kumaresan alsharewit...@gmail.com wrote: hi better u can use 2.1 regards Student -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Java OpenGL ES 2.0 bindings project
Hi there, i started a small project over at google code that provides you with bindings for OpenGL ES 2.0 in Java. I started just a couple of hours ago so it's not finished yet. The project includes the original GLSurfaceView plus all the helper classes from the latest Eclair build as well as a modified version of GLJNIView from the NDK samples which is now a fully functional GLSurfaceView subclass called GLSurfaceView20. OpenGL ES 1.x and 2.0 are exclusive so you have to first check wheter GL ES 2.0 is supported. You can check this via the following method: private boolean checkGL20Support( Context context ) { EGL10 egl = (EGL10) EGLContext.getEGL(); EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); int[] version = new int[2]; egl.eglInitialize(display, version); int EGL_OPENGL_ES2_BIT = 4; int[] configAttribs = { EGL10.EGL_RED_SIZE, 4, EGL10.EGL_GREEN_SIZE, 4, EGL10.EGL_BLUE_SIZE, 4, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL10.EGL_NONE }; EGLConfig[] configs = new EGLConfig[10]; int[] num_config = new int[1]; egl.eglChooseConfig(display, configAttribs, configs, 10, num_config); egl.eglTerminate(display); return num_config[0] 0; } Based on the result you then instantiate either a GLSurfaceView or a GLSurfaceView20. In the later case you should refrain from using GL10/ GL11 instances, most of the methods won't work with OpenGL ES 2.0. Instead you simply instantiate a class called AndroidGL20 which offers you the complete OpenGL ES 2.0 API. The project is in its infancy meaning that a couple of the native binding methods are stubs at the moment. I'm trying to fill all of them up over the weekend so we have a working wrapper on monday. This is a lot of work, i was able to generate the stubs automatically but filling them in has to be done manually. If anyone can spend some time on this with me contact me via badlogicgames at gmail.com. You can find the complete source at http://code.google.com/p/gl2-android/. The current source tree is not all that clean, i simply imported the complete project to SVN. In order to build it you have to create an Application.mk in a folder in the app/ directory of your NDK installation. The Application.mk has to look like this APP_PROJECT_PATH := /cygdrive/c/Users/mzechner/private-workspace/gl2- android APP_MODULES := libandroidgl20 Simply substitute the APP_PROJECT_PATH with what you have and you are ready to build. Note that i haven't optimized the Android.mk in the jni/ directory of the project yet, later on everything will compile to arm instead of thumb and some optimization flags will also be set. I hope somebody is willing to help out a little. I'll report back any progress on this here as well as on my blog at http://www.badlogicgames.com. Ciao, Mario -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] su access
It could be something to do with your code, but did you have the permissions below in your Android Manuscript file ? uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_MOCK_LOCATION / Emre Date: Fri, 12 Mar 2010 06:43:05 -0800 Subject: [android-developers] su access From: abdulraqee...@gmail.com To: android-developers@googlegroups.com Hello... I am a novice in android programming and wanted to work on the GPS related apps. I tried using DDMS in eclipse but it doesn't send the co- ordinates (or my app doesn't pick it up). I tried typing 'geo' with the co-ordinates but it gives a message as permission denied. Could some one please tell me how do I go about sending GPS co-ordinates and also use the emulator...become SU... Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en _ Stay in touch. http://go.microsoft.com/?linkid=9712959 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] su access
Hi, what version of the SDK are you testing? I had this problem when I was testing with SDK 1.6, but when I moved to SDK 2.0 it started working. Regards, Rogerio 2010/3/12 raqz abdulraqee...@gmail.com Hello... I am a novice in android programming and wanted to work on the GPS related apps. I tried using DDMS in eclipse but it doesn't send the co- ordinates (or my app doesn't pick it up). I tried typing 'geo' with the co-ordinates but it gives a message as permission denied. Could some one please tell me how do I go about sending GPS co-ordinates and also use the emulator...become SU... Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)
I found an answer here: http://groups.google.com/group/android-beginners/browse_frm/thread/b068dfe35ebbb5fe/030538a5c2147a97?lnk=gstq=default+camera+pradeep#030538a5c2147a97 Put this in your manifest: receiver android:name=.MyReceiver intent-filter android:priority=1 action android:name=android.intent.action.CAMERA_BUTTON/ /intent-filter /receiver The main element that makes it work, according to Pradeep, is the 'priority' attribute. Also, putting abortBroadcast() helps, but i'm not sure about that. It seems that the CAMERA_BUTTON broadcast is un-ordered. On Mar 7, 7:45 am, Streets Of Boston flyingdutc...@gmail.com wrote: I am reviving this thread again...http://groups.google.com/group/android-developers/browse_frm/thread/6... I have tried Marco's suggestion, but it doesn't work. It seems the broadcast is not ordered and canceling/aborting it has no effect. This causes for both my and the default camera app to be started up *at the same time*. Is there a way to register another 3rd party camera activity as the default or at least as an option for becoming the system's camera app when the dedicated 'camera key' is pressed? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Which API Level to target
If you develop with Eclipse you´ll have to go on the menu. There, you´ll be able to click to ´Window` and then to ´Android SDK and AVD Manager´. After it, there´ll appear a new window. Now you only have to choose ´virtual devices ´ and to click to ´New`. Now you can select the platform and the name of the new Avd. On 12 Mrz., 15:50, nayana urs nayana...@gmail.com wrote: hi how to create avd for api level 7 i.e, for android 2.1 with regards Nayana On Wed, Mar 10, 2010 at 8:52 PM, k. bhuvaneswari kumaresan alsharewit...@gmail.com wrote: hi better u can use 2.1 regards Student -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating first game
thanks, i already read the complete page of robert green and it's really helping. also the other posts are helpfull. is it smart to buy the android mysql to simply look things up whenever needed. hoe dan ook (don;t now the english words :D) thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re:
What do you mean with ´dynamically via code´??? If you want to add a new row in TableLayout I´ll have to write a code like this: TableRow TextView android:layout_column=1 android:text=Open... android:padding=3dip / TextView android:text=Ctrl-O android:gravity=right android:padding=3dip / /TableRow Here´s a link which describes it : http://developer.android.com/intl/de/resources/tutorials/views/hello-tablelayout.html Or do you want to create a row in a TableLayout using your main java- file??? On 12 Mrz., 07:30, sadiah zafar sadiahzafa...@gmail.com wrote: kindly somebody tell how to create rows dynamically via code in TableLayout.I neeed it urgentley. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: DDMS('?' in process name field)
Which version of Android do you use, I mean 1.5, 1.6 or an other version? If you get a ? , one application is unnamed but this shouldn´t be there. In 2.0.1 or in 2.1 this shouldn´t happen again. On 12 Mrz., 07:53, Musafir musafir4frie...@gmail.com wrote: Hi All, When i am running DDMS tool to profile the application, In left pane of the DDMS tool we are able to see all the emulators that are attached to DDMS. When i expand one of the emulator some times i am getting ? in process names. Why this is happening ? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Activity lifecycle problem on Nexus One - onStop not called
So I have modified my thread to be a singleton and mimplemented it like this. Hope it helps someone else who might be facing the same issue. public class SingletonThread extends Thread{ private static SingletonThread _instance; public static boolean IS_RUNNING = false; private static Context mContext; private SingletonThread(){ } public synchronized static final SingletonThread getInstance(Context context){ mContext = context; if(instance == null){ instance = new SingletonThread(); } return instance; } public synchronized void run(){ IS_RUNNING = true; //Implement your requirements. IS_RUNNING = false; } } And whenever I call the getInstance, from any other UI thread, I will check for IS_RUNNING also and will start the thread only if IS_RUNNING is false/will wait till IS_RUNNING is false. There might be better ways to do this, so please post your feedbacks, Thank you. On Mar 11, 2:44 pm, Dianne Hackborn hack...@android.com wrote: On Thu, Mar 11, 2010 at 1:40 PM, Achanta krishna.acha...@gmail.com wrote: Yes I am trying to redesign it to use AsyncTask. One reason why I did not take this approach is that I just wanted a plain thread that sits and logs user events that are occurring throughout my app and it made more sense to just start that thread when the app starts and shut it down when the app closes. I had a handler which grabs the logs and puts them in db and the thread just sits there and logs them to server. For this model, manage the thread through a separate static singleton, have clients tell it when they are using it (in onCreate() or whatever) and when they are done (in onDestroy() or whatever), and have that class take care of stopping the thread when there are no more clients. Also please be careful about what this thread is doing. An application should be careful to be doing very little work any time it is not in the foreground, or it will be consuming battery... and has a good chance of showing up high up in the battery meter as it eats the user's battery. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: su access
I have set the permissions right...but still unable to use that... i am useing sdk 2.0 please help me with this simple example On Mar 12, 10:21 am, Rogério de Souza Moraes rogerio.so...@gmail.com wrote: Hi, what version of the SDK are you testing? I had this problem when I was testing with SDK 1.6, but when I moved to SDK 2.0 it started working. Regards, Rogerio 2010/3/12 raqz abdulraqee...@gmail.com Hello... I am a novice in android programming and wanted to work on the GPS related apps. I tried using DDMS in eclipse but it doesn't send the co- ordinates (or my app doesn't pick it up). I tried typing 'geo' with the co-ordinates but it gives a message as permission denied. Could some one please tell me how do I go about sending GPS co-ordinates and also use the emulator...become SU... Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to display all contacts?
Thank you for your replies but I´ve still a problem. I´ve pasted the last code from Dmitri Plotnikov into my project but Eclipse doesn´t know what mResolver is. Do you know how to fix this problem? By the way, I tried the code from Karan too, but there I have the same problem with mResolver and another problem with where ( in the first line ). On 11 Mrz., 19:50, Dmitri Plotnikov dplotni...@google.com wrote: Nice, but this might be even better: Cursor cursor = mResolver.query( Data.CONTENT_URI, new String[]{Event.DISPLAY_NAME, Event.DATA}, Data.MIMETYPE + = + Event.CONTENT_ITEM_TYPE + AND + Event.TYPE + = + Event.TYPE_BIRTHDAY, null, Data.DISPLAY_NAME ); if( cursor != null ) { try { while( cursor.moveToNext() ) { String displayName = cursor.getString(0); String date =cursor.getString(1); } } finally { cursor.close(); } } On Wed, Mar 10, 2010 at 11:12 PM, Karan karanpop...@gmail.com wrote: Use the following code to read the data. Cursor cursor = mResolver.query( Data.CONTENT_URI, null, where, null, Data.DISPLAY_NAME ); if( cursor != null ) { while( cursor.moveToNext() ) { String rawContactID = cursor.getString( cursor.getColumnIndex( Data.RAW_CONTACT_ID ) ); String mimetype = cursor.getString( cursor.getColumnIndex( ContactsContract.Data.MIMETYPE ) ); if( mimetype.equals( StructuredName.CONTENT_ITEM_TYPE ) ) { // Read name : Field = StructuredName.DISPLAY_NAME } else if( mimetype.equals( Relation.CONTENT_ITEM_TYPE ) ) { // Read birthdate : Field = Relation.DATA } // Note : The name and the birthday will be there in different entries // So make sure that you match them properly and maintain it accordingly } } On Mar 10, 11:38 pm, Mark Murphy mmur...@commonsware.com wrote: Nox wrote: Thank you for your replies, but unfortunately it doesn t work. If I open my app there ll appear the error message: The application has stopped unexpectedly. Please try again. Do you know what I have to do now? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to look at the Java stack trace that was generated when that dialog appeared. It should give you some clues for fixing your problem. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to save files?
Hello everybody, Do you know how to save files? Thanks in advance From Viktor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: try to load system JNIs
Well, what's strange here is that Android's Dalvik JVM is being less strange than Sun's, but not enough less strange to avoid confusing you. Sun doesn't have a representation of the bootstrap classloader. It's an implicit part of the JVM, and if you ask for the classloader of a class that was loaded by the JVM, you'll get null. The ClassLoader is loaded by the bootstrap classloader, which may explain why it's this way. Android does the same, except it gives you an object that represents and presumably interfaces to the bootstrap classloader. I've always thought Sun should have done this, too. I don't know just when the bootstrapped bootstrap classloader is loaded and installed, but it would seem to be later than the log messages you're looking at. On Mar 12, 2:14 am, allstars allstars@gmail.com wrote: hello if i try to load libwebcore or libmedia from my app it will fail because the system libs has been loaded by zygote and by JNI spec *The same JNI native library cannot be loaded into more than one class loader.* but from the log and the code (dalvik/system/VMStack) the bootstrap class loader ( the ClassLoader of Zygote) is null although the Class.getClassLoader() can get the instance of the bootstrap class loader Isn't it strange here? libwebcore.so is loaded by a classloader before which is a null object thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to save files?
On Fri, Mar 12, 2010 at 10:25 AM, Nox v.beh...@googlemail.com wrote: Do you know how to save files? Yes, I read the documentation: http://developer.android.com/intl/de/guide/topics/data/data-storage.html#files - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re:
The answer lies in the JavaDoc for the TableLayout class: http://developer.android.com/intl/de/reference/android/widget/TableLayout.html Although the typical child of a TableLayout is a TableRow, you can actually use any View subclass as a direct child of TableLayout. The View will be displayed as a single row that spans all the table columns. You probably want the first part of that -- i.e. add TableRow views as children. On Mar 11, 10:30 pm, sadiah zafar sadiahzafa...@gmail.com wrote: kindly somebody tell how to create rows dynamically via code in TableLayout.I neeed it urgentley. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Requesting to have a member of this group
This article: http://developer.android.com/intl/de/resources/community-groups.html explains how to subscribe to the group. On Mar 10, 11:31 pm, evergreen.sub...@gmail.com evergreen.sub...@gmail.com wrote: Hello i am subrat, i am working in android platform. i am interested to join your group. Regards, Subrat Kumar Panda. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Contacts 2.0: How to create a Contact without an Account? (Unsynched)
My application loads/saves contacts, but I am having some confusion regarding the difference between unsynched contacts and those associate with a Google account. In the emulator when I create a contact manually the account it uses is Phone-only (unsynched). When I read the contacts via ContactsContract.Contacts.CONTENT_URI, I can see the contact I made. However, when I try to write a contact, the only method I've seen involves ContactsContract.RawContacts.CONTENT_URI, but this requires an Account as such: ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI) .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, account_type) .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, account_name) .build() If I create a contact in this way, it works I can not see it in the native Android Contact application. How can I create a contact that is unsynched? If I do a similar operation, but using ContactsContract.Contacts.CONTENT_URI and no Account, I get Aggregate contacts are created automatically error. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Mapview scroll finished Listener
I want to add overlays when the map has scroll/zoon animation has stopped at a position. I am currently using onTouchEvent for ACTION_UP but this fires unnecessary many times e.g. when the user lifts his finger several times during scrolling. So I basically want to hook in to the event that fires the loading of map images. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Mapview scroll finished Listener
Ferm wrote: I want to add overlays when the map has scroll/zoon animation has stopped at a position. I am currently using onTouchEvent for ACTION_UP but this fires unnecessary many times e.g. when the user lifts his finger several times during scrolling. So I basically want to hook in to the event that fires the loading of map images. There is no event for that, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mapview scroll finished Listener
Ok thanks What's the recommended event for when map center and lat/long spans changes? On Mar 12, 6:26 pm, Mark Murphy mmur...@commonsware.com wrote: Ferm wrote: I want to add overlays when the map has scroll/zoon animation has stopped at a position. I am currently using onTouchEvent for ACTION_UP but this fires unnecessary many times e.g. when the user lifts his finger several times during scrolling. So I basically want to hook in to the event that fires the loading of map images. There is no event for that, AFAIK. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to overcome permission denied error when SystemProperties.set
On Thu, Mar 11, 2010 at 6:14 PM, Alvin Tsai kernel.dailym...@gmail.comwrote: However, I think my problem is also related to android permission rule that developer may encounter. because not only the property I create can not be set, but also the traditional system property like debug.egl.hw can not be set via SystemProperties.set(). SystemProperties is not a public API. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] EditText layout for all devices
Hi, In my layout i need to have to 2 EditText widgets which would occupy 50% of area individually. I'm planning to have the solution generic for all devices, let me know if this can be controlled through XML in any way or I'll have to create the layout through code. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: EditText layout for all devices
50% of the total area of the screen? or just 50% of the width? Can you include a picture of exactly what you want it to look like? -Mike dg On Mar 12, 12:52 pm, temp tempche...@gmail.com wrote: Hi, In my layout i need to have to 2 EditText widgets which would occupy 50% of area individually. I'm planning to have the solution generic for all devices, let me know if this can be controlled through XML in any way or I'll have to create the layout through code. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapview scroll finished Listener
Ferm wrote: What's the recommended event for when map center and lat/long spans changes? There is no recommended event for those, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: call one activity from Dialog Class
Yes you can do that. The same way you would launch an activity from any other method. -Mike dg On Mar 12, 1:19 am, TreKing treking...@gmail.com wrote: On Fri, Mar 12, 2010 at 12:05 AM, David Toledo dtole...@gmail.com wrote: How to can call one activity from Dialog. Pass a reference to the Activity you need to your Dialog in the constructor . ? --- -- TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Java OpenGL ES 2.0 bindings project
Well, i finished the complete wrapper already. Here's a sample program import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.nio.IntBuffer; import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; import javax.microedition.khronos.egl.EGLDisplay; import javax.microedition.khronos.opengles.GL10; import com.badlogic.gdx.backends.android.AndroidGL20; import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView; import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20; import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView.Renderer; import com.badlogic.gdx.graphics.GL20; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.util.Log; public class GL2Test extends Activity { GLSurfaceView view; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if( checkGL20Support( this ) ) view = new GLSurfaceView20( this ); else view = new GLSurfaceView( this ); view.setRenderer( new TestRenderer() ); setContentView(view); } protected void onPause( ) { super.onPause(); view.onPause(); } protected void onResume( ) { super.onResume(); view.onResume(); } private boolean checkGL20Support( Context context ) { EGL10 egl = (EGL10) EGLContext.getEGL(); EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); int[] version = new int[2]; egl.eglInitialize(display, version); int EGL_OPENGL_ES2_BIT = 4; int[] configAttribs = { EGL10.EGL_RED_SIZE, 4, EGL10.EGL_GREEN_SIZE, 4, EGL10.EGL_BLUE_SIZE, 4, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL10.EGL_NONE }; EGLConfig[] configs = new EGLConfig[10]; int[] num_config = new int[1]; egl.eglChooseConfig(display, configAttribs, configs, 10, num_config); egl.eglTerminate(display); return num_config[0] 0; } class TestRenderer implements Renderer { AndroidGL20 gl2 = new AndroidGL20(); FloatBuffer vertices; int program; int viewportWidth, viewportHeight; @Override public void onDrawFrame(GL10 gl) { gl2.glClearColor( 0.7f, 0.7f, 0.7f, 1 ); gl2.glClear( GL20.GL_COLOR_BUFFER_BIT ); gl2.glViewport ( 0, 0, viewportWidth, viewportHeight ); gl2.glUseProgram ( program ); gl2.glVertexAttribPointer ( 0, 3, GL20.GL_FLOAT, false, 0, vertices ); gl2.glEnableVertexAttribArray ( 0 ); gl2.glDrawArrays ( GL20.GL_TRIANGLES, 0, 3 ); } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { viewportWidth = width; viewportHeight = height; } @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { String vertexShaderSrc = attribute vec4 vPosition; \n + void main() \n + { \n + gl_Position = vPosition; \n + } \n; String fragmentShaderSrc = precision mediump float;\n + void main() \n + { \n + gl_FragColor = vec4 ( 1.0, 0.0, 0.0, 1.0 );\n + } \n; int vertexShader = loadShader( GL20.GL_VERTEX_SHADER, vertexShaderSrc ); int fragmentShader = loadShader( GL20.GL_FRAGMENT_SHADER, fragmentShaderSrc ); program = gl2.glCreateProgram(); if( program == 0 ) throw new RuntimeException( creating program didn't work ); gl2.glAttachShader( program, vertexShader );
[android-developers] Re: OnPause() - how to resume to an activity which has a Bundle passed to it when it is created
What I have done with success in some of my apps is making several parent views that hold each layout within a table layout, and use the menu buttons to change the visibility of the parent view containing the info you want them to see. Since the view is never really closed, it's state is kept. Just use setVisibility(View.GONE) or View.VISIBILE and it should keep everything good. Just make sure that each button press hides all the other parent views or else you will basically end up with two screens showing one after the other. On Mar 12, 7:21 am, TreKing treking...@gmail.com wrote: On Fri, Mar 12, 2010 at 12:28 AM, Prajakta Shitole prajakt...@gmail.comwrote: One of my idea was to store the picture and the text view in the service and on click of a menu button navigate to another activity which will connect to the service and draw the stored pictures, text views in its activity. I haven't done anything like this but this seems like what you would want to do. ----- TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: EditText layout for all devices
50% of available vertical height if total height = 100px then EditText1 height= 50px ( 0-50px) EditText2 height=50px ( 51-100px) Thanks On Mar 13, 2:03 am, Mike dg vinb...@gmail.com wrote: 50% of the total area of the screen? or just 50% of the width? Can you include a picture of exactly what you want it to look like? -Mike dg On Mar 12, 12:52 pm, temp tempche...@gmail.com wrote: Hi, In my layout i need to have to 2 EditText widgets which would occupy 50% of area individually. I'm planning to have the solution generic for all devices, let me know if this can be controlled through XML in any way or I'll have to create the layout through code. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to save files?
Try this FileWriter fw = new FileWriter(/sdcard/test.txt); fw.write(Test text); fw.flush(); fw.close(); Thanks and Regards, Kumar Bibek On Mar 12, 9:55 pm, TreKing treking...@gmail.com wrote: On Fri, Mar 12, 2010 at 10:25 AM, Nox v.beh...@googlemail.com wrote: Do you know how to save files? Yes, I read the documentation:http://developer.android.com/intl/de/guide/topics/data/data-storage.h... - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mapview scroll finished Listener
How do I know when zoom has changed? On Mar 12, 7:04 pm, Mark Murphy mmur...@commonsware.com wrote: Ferm wrote: What's the recommended event for when map center and lat/long spans changes? There is no recommended event for those, AFAIK. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapview scroll finished Listener
Ferm wrote: How do I know when zoom has changed? Again, there is no good way to do this. A lousy approach that should work indefinitely is to poll the MapView, calling getZoomLevel(), and watch for changes. However, polling is inefficient. A lousy approach that will probably break between Android versions is to use the deprecated getZoomControls() to obtain the ZoomControls that the MapView uses and add listeners to those. A great approach that will take a year or two is to file an issue asking for better zoom/pan events, then wait for such events to appear in Android. Off the top of my head, I cannot think of other alternatives. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mapview scroll finished Listener
hmm, this is very sad I have potentially more than 1000 markers positioned worldwide that are fetched via network. I can't load all these at once in onCreate.. Yeah, maybe I'll set up a timer.. thx On Mar 12, 7:42 pm, Mark Murphy mmur...@commonsware.com wrote: Ferm wrote: How do I know when zoom has changed? Again, there is no good way to do this. A lousy approach that should work indefinitely is to poll the MapView, calling getZoomLevel(), and watch for changes. However, polling is inefficient. A lousy approach that will probably break between Android versions is to use the deprecated getZoomControls() to obtain the ZoomControls that the MapView uses and add listeners to those. A great approach that will take a year or two is to file an issue asking for better zoom/pan events, then wait for such events to appear in Android. Off the top of my head, I cannot think of other alternatives. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Mapview scroll finished Listener
Ferm wrote: hmm, this is very sad I have potentially more than 1000 markers positioned worldwide that are fetched via network. I can't load all these at once in onCreate.. Do two network calls. One fetches a small number of markers in the vicinity of wherever you are having the map start. The second fetches the rest and adds them to the overlay. You do not need to worry about zooms or pans then. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in NYC: 1-2 May 2010: http://guruloft.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to save files?
On Fri, Mar 12, 2010 at 12:34 PM, Kumar Bibek coomar@gmail.com wrote: FileWriter fw = new FileWriter(/sdcard/test.txt); Do not hard code the SD card path. Use getExternalStorageDirectory(). - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Race condition using handler + thread.
Hi I have an application that starts a background thread to load data. It uses Handler to pass data back to the main thread. Now this works perfectly most of the time, but not when I switch orientation. What I found was this behavior: - onCreate : Start main view, with background load thread - Switch android direction - onStop : Kill background loading thread, does thread.interrupt + thread.join. - onCreate - Data queue'd in the handler is still being pushed through from the previous data load. This produces a bit of a race condition for me. I can shutdown the thread cleanly, but the data that's in the handler, between the thread and the main view isn't always cleared. This would be solvable with something like: thread.interrupt(); thread.join(); handler.clear(); Before returning to the onStop function, but there's no .clear to just empty a handler out. How can I clear a Handler of all messages? I use this for posting: handler.post(new Runnable() { @Override public void run() { handler.onData(sendData); } }); So doing a .removecallback (which requires me to store runnables) isn't real practical. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Motorola Droid (possible android) multi-touch bug and how to reproduce
Please read and vote for this bug: http://code.google.com/p/android/issues/detail?id=6297 And also see some commentary about it on my blog here: http://blogs.zdnet.com/Burnette/?p=1747 --Ed Editor, Planet Android -- http://www.planetandroid.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mulit-Touch Problems
Please read and vote for this bug: http://code.google.com/p/android/issues/detail?id=6297 And also see some commentary about it on my blog here: http://blogs.zdnet.com/Burnette/?p=1747 --Ed Editor, Planet Android -- http://www.planetandroid.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] EXTRA_OUTPUT problem with video camera - breaks 'retake' and 'delete' buttons
Hi all, I have a problem with supplying a URI in the EXTRA_OUTPUT to the video camera. If I supply a URI, the file shoots and saves OK to that URI, but the 'retake' and 'delete' buttons on the camera both fail to work - 'retake' does nothing, and 'delete' does a force close. If I don't supply a URI, then the video camera works fine. Here's my code: video = new File(Environment.getExternalStorageDirectory(), my_video.3gp); if (video.exists()) { Log.d(LOG_TAG, Video exists, deleting); video.delete(); } Intent videoCaptureIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); Log.d(LOG_TAG, passing URI to video camera: + Uri.fromFile(video).toString()); videoCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(video)); startActivityForResult(videoCaptureIntent,1); I would like to be able to supply the URI, if possible. Any ideas how I can do this without crashing the camera? Thanks Anna -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: EXTRA_OUTPUT problem with video camera - breaks 'retake' and 'delete' buttons
NB here's my traceback: 03-12 19:25:57.948: INFO/ActivityManager(936): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///sdcard/ election_video.3gp } 03-12 19:25:57.968: ERROR/videocamera(5482): Couldn't view video file:///sdcard/election_video.3gp 03-12 19:25:57.968: ERROR/videocamera(5482): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///sdcard/ election_video.3gp } 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java: 1408) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1378) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.Activity.startActivityForResult(Activity.java:2749) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.Activity.startActivity(Activity.java:2855) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.camera.VideoCamera.startPlayVideoActivity(VideoCamera.java: 362) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.camera.VideoCamera.onClick(VideoCamera.java:375) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.View.performClick(View.java:2364) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.View.onTouchEvent(View.java:4179) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.View.dispatchTouchEvent(View.java:3709) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.policy.impl.PhoneWindow $DecorView.superDispatchTouchEvent(PhoneWindow.java:1659) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java: 1107) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.policy.impl.PhoneWindow $DecorView.dispatchTouchEvent(PhoneWindow.java:1643) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.os.Handler.dispatchMessage(Handler.java:99) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.os.Looper.loop(Looper.java:123) 03-12 19:25:57.968: ERROR/videocamera(5482): at android.app.ActivityThread.main(ActivityThread.java:4363) 03-12 19:25:57.968: ERROR/videocamera(5482): at java.lang.reflect.Method.invokeNative(Native Method) 03-12 19:25:57.968: ERROR/videocamera(5482): at java.lang.reflect.Method.invoke(Method.java:521) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 03-12 19:25:57.968: ERROR/videocamera(5482): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-12 19:25:57.968: ERROR/videocamera(5482): at dalvik.system.NativeStart.main(Native Method) On Mar 12, 7:23 pm, Anna PS annapowellsm...@googlemail.com wrote: Hi all, I have a problem with supplying a URI in the EXTRA_OUTPUT to the video camera. If I supply a URI, the file shoots and saves OK to that URI, but the 'retake' and 'delete' buttons on the camera both fail to work - 'retake' does nothing, and 'delete' does a force close. If I don't supply a URI, then the video camera works fine. Here's my code: video = new File(Environment.getExternalStorageDirectory(), my_video.3gp); if (video.exists()) { Log.d(LOG_TAG, Video exists, deleting); video.delete(); } Intent videoCaptureIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); Log.d(LOG_TAG, passing URI to video camera: + Uri.fromFile(video).toString()); videoCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(video));
Re: [android-developers] Re: OnPause() - how to resume to an activity which has a Bundle passed to it when it is created
On Fri, Mar 12, 2010 at 12:19 PM, Jeffrey jeffisagen...@gmail.com wrote: What I have done with success in some of my apps is making several parent views that hold each layout within a table layout, and use the menu buttons to change the visibility of the parent view containing the info you want them to see. Yeah, but in the OP's case there is an on going Service that directly relates to the child activity. If you did one activity with hidden views and closed the app, you would still have to store the text / image information related to that service *somewhere* to get it back when you reopened the activity. Assuming the service has an on-going notification in the status bar (like the default music player), one would expect that clicking that would take you back to the activity with the relevant info. In this case, it would make sense to let the service save the relevant data to pass on to the activity when it needs to. In this case I think binding to the Service when your associate activity is created makes the most sense. Again, haven't done anything like this myself, so I could be way off here. HTH. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: currentTimeMillis() doesnt match on two concurrent emulators
I admit I have pretty much given up on all the android string formatting, as just being too painfully slow to use during the game itself. I'm actually not using many views any more either, though that's probably just an overreaction on my part. I basically have one view (once the game starts) and do all the rendering/interacting/ stroke analysis myself. So I have reinvented quite a few wheels, and I do feel bad about it, but saving 5ms here and there is nothing to sneeze at when you have a 50ms budget. I'm addicted to drawBitmap with matrix though. Robert, thanks for the motivation to switch to nano. I have added it to the list of things-to-actually-do. On Mar 10, 11:35 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: Have you checked all entried in logcat to see if you can see anything odd? I had e.g. a loop where each iteration did something like: Log.i(TAG, Forecast expires at + aJavaDateInstanceRepresentingExpirationDateTime); Each execution of that log statement took about 1-2 seconds since date.toString() caused a resource bundle to be loaded by Android OS. I can't understand why it is implemented like that, and isn't cached, but I wasted about 10 seconds there. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] google map api are missing
hi..i wanted to use the MapActivity but i dont find the google api add on...its not available for download as well... i checked the sdk/addon folder..but its empty...could some one please tell me how to download them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] google map api are missing
On Fri, Mar 12, 2010 at 3:38 PM, raqz abdulraqee...@gmail.com wrote: hi..i wanted to use the MapActivity but i dont find the google api add on... In Eclipse, Project - Properties - Android - Select on of the Google APIs matching the platform version you want to target (generally the latest one). - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: google map api are missing
sorry..but i dont find an google api listed there buddy...i dont find a link to download that as well...can you please help me On Mar 12, 4:56 pm, TreKing treking...@gmail.com wrote: On Fri, Mar 12, 2010 at 3:38 PM, raqz abdulraqee...@gmail.com wrote: hi..i wanted to use the MapActivity but i dont find the google api add on... In Eclipse, Project - Properties - Android - Select on of the Google APIs matching the platform version you want to target (generally the latest one). - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: google map api are missing
raqz wrote: sorry..but i dont find an google api listed there buddy...i dont find a link to download that as well...can you please help me http://developer.android.com/sdk/adding-components.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: google map api are missing
i checked the download manager but i dont find the google api package there as well... i downloaded the entire sdk again to check but its not present in the addon either...nor am i able to get it from the manager On Mar 12, 5:09 pm, Mark Murphy mmur...@commonsware.com wrote: raqz wrote: sorry..but i dont find an google api listed there buddy...i dont find a link to download that as well...can you please help me http://developer.android.com/sdk/adding-components.html -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: try to load system JNIs
On Mar 12, 8:52 am, Bob Kerns r...@acm.org wrote: Android does the same, except it gives you an object that represents and presumably interfaces to the bootstrap classloader. I've always thought Sun should have done this, too. I believe we inherited this from Harmony, which has code that expects non-null classloaders everywhere. Inside the VM, classloader == null means the bootstrap loader. Going back to the original post: explicitly loading the media or webkit shared libs seems like a bad idea. Are you trying to side-step the public APIs? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android app only taking up part of screen
Also see http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx It seems these resolution questions come every few days... BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 10, 2010 at 11:42 AM, Kumar Bibek coomar@gmail.com wrote: Aah, An example of apps running on different screen sizes and resolutions. Please have a look at this. http://developer.android.com/intl/de/guide/practices/screens_support.html Kumar Bibek On Mar 9, 1:07 am, Drew zit...@gmail.com wrote: I have an Android application that's seemingly only taking up 1/3 or so of the screen on a Texas Instruments Zoom Android device. You can see what I mean here: http://www.zitnay.com/stuff/IMG00910.jpg The upper-middle third or so of the screen contains the app, but the rest of the screen is black. I have thousands of other people using this app, but have never had a report of this before (and can't reproduce it using the emulator). I'm typically building the layout programmatically (typically with a ScrollView as the main view) then using setContentView() to display it. I was originally using setContentView(View), but I tried adding new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT) as the second parameter today, which didn't seem to fix the problem. I'd appreciate any advice anyone can give. Thanks. Drew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] where can I get the source code of button
Hi, I need to study how to make widget. Where could I get the source code of button? Thanks! Cindy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Rebuilding Launcher.apk
Hey thanks for the reply! So, once I edit it, and resign it, it probably won't load back into the file, huh? Crap. So I need to build it from source code it seems like, no? On Mar 12, 7:11 am, mah m...@heilpern.com wrote: The apk file is just a zip file; you don't need eclipse to open / modify it. However, you will probably need to sign it after making changes (and if you don't have the original signing key, I'm not certain if you can then load it onto the phone unless you've also changes the package name). On Mar 11, 11:40 am, Coffee mycoffeeple...@gmail.com wrote: I would like to rebuild the launcher.apk in Eclipse so I can have access to edit the .xml files to customize the launcher. How would I go about doing this? I kind of have a idea, but I need some more though push. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Override default icons of BaseExpandableListAdapter
Hello, I'm trying to override the default icons of an BaseExpandableListAdapter in a class which inherits from BaseExpandableListAdapter. What would be a decent way of doing this? Such a basic thing doesn't seem to be straightforward. Thank you in advance, -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: EditText layout for all devices
LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:weightSum=2 android:layout_width=fill_parent EditText android:text=@+id/EditText01 android:id=@+id/EditText01 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1/EditText EditText android:text=@+id/EditText02 android:id=@+id/EditText02 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1/EditText /LinearLayout The key is using the Weight attribute. And make sure to check out this article http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Fri, Mar 12, 2010 at 7:20 PM, temp tempche...@gmail.com wrote: 50% of available vertical height if total height = 100px then EditText1 height= 50px ( 0-50px) EditText2 height=50px ( 51-100px) Thanks On Mar 13, 2:03 am, Mike dg vinb...@gmail.com wrote: 50% of the total area of the screen? or just 50% of the width? Can you include a picture of exactly what you want it to look like? -Mike dg On Mar 12, 12:52 pm, temp tempche...@gmail.com wrote: Hi, In my layout i need to have to 2 EditText widgets which would occupy 50% of area individually. I'm planning to have the solution generic for all devices, let me know if this can be controlled through XML in any way or I'll have to create the layout through code. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OnPreferenceClickListener does not fire when using setWidgetLayoutResource
This was simply related to button type controls having FOCUS. If embededing a button style widget in a preference layout you must set the widget to focusable:false; this will allow default preference click behavior On Feb 24, 8:36 pm, cnich cnichol...@gmail.com wrote: Using onBindView I can catch the onClick behavior but it does not behave as regular preference click protected void onBindView(View view) view.setOnClickListener(this); On Feb 24, 5:27 pm, cnich cnichol...@gmail.com wrote: Preferences in PreferenceActivities are clickable and can be set to receive OnPreferenceClickListener messages. If you set Preference.setWidgetLayoutResource then the Preference becomes unclickable. The setWidgetLayoutResource reference must contain a button type to become unclickable. I've tried setClickable, setFocusable etc but to avail. Is there anyway to add a button style widget resource and still allow original click behavior of the preference? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Sending huge files with HttpsUrlConnection???
I have some Android code that can send files to my webserver using an HttpsUrlConnection, but when it tries to send larger files I get an OutOfMemory exception when opening the OutputStream. Can anyone offer some assistance? It looks something like this: httpConn = (HttpsURLConnection) new URL(uri).openConnection(); httpConn.setDoInput(true); httpConn.setDoOutput(true); httpConn.setUseCaches(false); httpConn.setRequestMethod(POST); This is where I try different things. The closes solution has been: httpConn.setChunkedStreamingMode(1024); In this case, I don't get the OutOfMemory immediately when opening the OutputStream, but I see the heap growing as I os.write() and it eventually runs out. httpConn.connect(); OutputStream os = httpConn.getOutputStream(); byte[] buffer = new byte[4096]; int len; while ((len = is.read(buffer)) != -1){ os.write(buffer, 0, len); } os.flush(); Each time I open the .getOutputStream() the contents of the file I am trying to send is loaded into memory, per the discussion here (http:// bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212479) -- so I go out of memory. My server supports HTTP 1.1. I've tried the following code. 1. httpConn.setRequestProperty(Transfer-Encoding,chunked); 2. httpConn.setChunkedStreamingMode(1024); 3. httpConn.setRequestProperty(Content-Length, length); 4. httpConn.setFixedLengthStreamingMode(1024) 5. Combo of 1+2. 6. Combo of 3+4 Can anyone offer any assistance?! It seems like no matter what, the data going to the OutputStream is being buffered. ChunkedStreamMode seems to just buffer it in pieces, whereas it would otherwise buffer it all at once. Both go out of memory. Thanks in advance. PS I have similar code for J2ME and memory has not been a problem. Also, if I try to send two medium sized files in a row, the first one makes it, but then the heap doesn't seem to compact and the second one fails. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Programmatically check whether Market shows paid apps
I'm on Optus in Australia. Optus is holding out waiting for a bigger cut from Google because they're greedy bastards. If you send a market intent everything seems to work but the user gets a program can't be found message. On Mar 2, 3:25 am, Bob Kerns r...@acm.org wrote: Thanks for raising this -- I hadn't considered the problem. My understanding is that in some places, it's the country that is the source of the restrictions (i.e. legal barriers to Google Checkout or something like that), while in other places, that barrier doesn't exist, but carriers impose their own barriers, or haven't come to terms with Google, or something like that. It's not a free world. The way I read the TC's is that they apply to selling outside the market things from apps you've sold through the market. In a non- Market location, you won't have sold your app through the market. If you've sold the app via a different channel, you're not bound by those TC's for that instance of that app. You could firewall that, and generate a separate version of the app for sale outside the Marketplace, to avoid any chance of a bug or environmental change leading to sending users outside the Marketplace for purchases. I don't think Google can object to your sending them to your website, and also selling your apps elsewhere on your website, if there's no attempt to bypass the market. Since they actually encourage you to supply a website link. But you'd like to be more direct about that in the non-Market case. What happens on a non-Market platform when you try to send them to the market? I suspect the intent won't launch, and you could catch that, and redirect them to your site or one of the appstores without these restricctions. The downside is that you run a risk of accidentally violating the TC. IANL, but I suspect that having checked for the Martket first would satisfy the requirements. The upside is that you don't have to maintain a list of MCC/MNC code combinations, and miss sales if they change. On Mar 1, 5:24 am, westmeadboy westmead...@yahoo.co.uk wrote: I checked that link and I don't understand why everyone is talking about the MCC/MNC when I thought that the sim country was the important thing? So, in the TelephonyManager, using getSimCountryIso() instead of getNetworkCountryIso(). The link talks about the Bob operator in Austria. Could it be that the Bob sim card country code is incorrectly set? I notice in my analytics that I have more users using an austria network compared to using an austria sim card. Admittedly, other factors (roaming) could explain this. Either way, users in paid-appcountriesbeing unable to see paid apps, seems to be the exception. For me, its crucial that users in non-paid-appcountrieshave an alternative legal way to get hold of a paid app. I thought the Market TCs forbid selling apps through apps in the Market? On Mar 1, 1:58 pm, Peli peli0...@googlemail.com wrote: It is more complicated than that. In somecountries, you can access paid or only non-paid apps depending on the provider you are currently using:http://code.google.com/p/android/issues/detail?id=3852 In OI Notepad and OI Shopping List, we provide both links for extensions and themes (menu settings get add-ons): The first one to Market, and the second one to our developer homepage. We hope people figure that they should try the second link if the first one does not show sensible results. Peliwww.openintents.org On Mar 1, 10:27 am, westmeadboy westmead...@yahoo.co.uk wrote: I am about to release a Pro version of my app and so would like to provide Get the Pro links. However, it makes no sense to do this if the user is taken to the Market and then can't see the Pro app (i.e. they are in a non-paid app country). Maybe, such users would be sent to a 3rd party Market app instead? So, whats the best way to programmatically check whether the user will see paid apps in the Market? I think its based on the sim card country right? I assume its good enough to hard code the country codes into the app since they don't change that often??? If they do I can just update the lite app... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Layout on emulator and phone
Oddly, I can no longer get an emulator to display a full-resolution 480-800 screen. This is something that changed on me overnight. Even if I specify the resolution explicitly when creating an emulator device, it still comes up 320x480. Has anyone else had this problem and do you have any suggestions how to fix it? On Mar 2, 8:38 am, Mark Murphy mmur...@commonsware.com wrote: nikhil wrote: I designed the user interface of my app on the emulator and then I installed it on the Nexus one. For some reason the textboxes, labels buttons etc. have shrinked in size. It looks as if the view has been zoomed out on the phone. If I arrange it correctly on the phone the objects don't fit on the emulator.. Has anyone faced this? Is there some setting to have consistency between the look of the emulator and Nexus One. I have 2.1 OS on both FWIW, in all the samples I have tested, the Nexus One looks identical to aWVGA800Android 2.1 emulator image. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Online Training: 26-30 April 2010:http://onlc.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OnPause() - how to resume to an activity which has a Bundle passed to it when it is created
Hi Jeffrey, Thanks for the suggestion but I have activities and not views. I have separate activities which are being called so I am not sure how I will be able to achieve the same thing that you have implemented. Thanks, Prajakta On Fri, Mar 12, 2010 at 10:19 AM, Jeffrey jeffisagen...@gmail.com wrote: What I have done with success in some of my apps is making several parent views that hold each layout within a table layout, and use the menu buttons to change the visibility of the parent view containing the info you want them to see. Since the view is never really closed, it's state is kept. Just use setVisibility(View.GONE) or View.VISIBILE and it should keep everything good. Just make sure that each button press hides all the other parent views or else you will basically end up with two screens showing one after the other. On Mar 12, 7:21 am, TreKing treking...@gmail.com wrote: On Fri, Mar 12, 2010 at 12:28 AM, Prajakta Shitole prajakt...@gmail.com wrote: One of my idea was to store the picture and the text view in the service and on click of a menu button navigate to another activity which will connect to the service and draw the stored pictures, text views in its activity. I haven't done anything like this but this seems like what you would want to do. ----- TreKing - Chicago transit tracking app for Android-powered deviceshttp:// sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Failed to create a UDP Server on Android phone
I have tried many tests on how to create a UDP server on android phone. - Devices I was testing: PC (has static public IP over Internet. has a UDP server running) GPhone (it is real phone, not emulator. runs in Tmobile 3G network) - Send a UDP packet from GPhone to PC: [On GPhone:] // create a sender socket DatagramSocket udpClientSocket= new DatagramSocket(); // send data udpClientSocket.send(packet); [On PC:] // create a listener socket DatagramSocket udpServerSocket = new DatagramSocket(SERVER_PORT); // receive data udpServerSocket.receive(packet); - Send a UDP packet from PC to GPhone After a whole day testing on this problem, I can only find this solution: [On PC:] // get the client's address and port address = packet.getAddress(); port = packet.getPort(); // create packet to send to client packet = new DatagramPacket(address, port); // use the server socket to send a packet udpServerSocket.send(packet); [On GPhone:] // use the sender socket to receive data udpClientSocket.receive(packet); With these codes, the client can actually receive packet from server. However, there are 2 problems: 1. YOU HAVE TO USE THE SERVER SOCKET TO SEND If we change the PC code to: .(same stuff) // create a new socket to send data DatagramSocket anotherSocket = new DatagramSocket(); anotherSocket.send(packet); The phone will never receive the packet. 2. YOU CANNOT ESTABLISH A UDP SERVER ON GPHONE If we want to have a UDP server on GPhone just like we have a server on PC. So that GPhone can talk to a server on PC and PC can talk to another server on GPhone, using DatagramSocket udpGPhoneServerSocket = new DatagramSocket(GPHONE_SERVER_PORT) DOES NOT WORK. I have tried to send a UDP packet from PC to the phone. I tried all kinds of ports, addresses, etc. No, it doesn't work. * * * * * * * * * * * * * * * * * * * * * * * * OK. Now in my android app, I have over 100 clients (GPhone) communicating to the server (PC) at same time. For performance concern, I want to create one UDP server socket on PC *ONLY* for receiving. Then I create one UDP sending socket per connection on the server to send packets back to the phone. Based on my test, since establishing a UDP server socket on GPhone is not working. The only option left for me is to use the only UDP server socket for both receiving and sending. My questions are: 1. Am I wrong? (Does any1 have a successful design so that you can send a packet from PC to GPhone without reusing the server socket?) 2. If I am correct, is it T-mobile blocking all UDPs? 3. If I use the *ONLY* server socket for both sending and receiving to handle 100+ connections with real-time data exchanging at same time, does it have a poor performance? Any better solutions? Any comments are appreciated! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Sending custom headers in WebView
I've found some information about this topic, but I was curious as to whether anyone has had any success loading webpages in a WebView with custom headers. There doesn't seem to be any simple way of doing this. I've seen an implementation that involved downloading the webpage and separately loading the data into the WebView. While this is not difficult, the WebView then demonstrated problems with relative URLs and downloading images. Has anyone come up with a clean way to get this done? Thanks in advance. -kelvin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SD Card File I/O
Hi: I have the following code in my application. When loaded into the phone, I get File Open Exception. Any idea what I may be doing wrong? I suspect some issue with permissions or something but I'm not sure. = code snippet FileOutputStream fos; try { fos = this.openFileOutput(/sdcard/demo.txt, MODE_WORLD_WRITEABLE); try { fos.write(Appended.getBytes()); fos.close(); } catch (IOException e) { // TODO Auto-generated catch block Toast.makeText(getBaseContext(), File Write or Close Exception!!, Toast.LENGTH_SHORT).show(); e.printStackTrace(); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block Toast.makeText(getBaseContext(), File Open Exception!!, Toast.LENGTH_SHORT).show(); e.printStackTrace(); } === Regards...Pradeep. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to add scrollbar in a custom view.
Hi, i have a custom view, when i want to add a scrollbar to it , i have a problem, i have learn the code of GridViewSpecial(which belong to Gallery) , when i copy this line: initializeScrollbars(context.obtainStyledAttributes(android.R.styleable.View)); to my code, i found that my app can't resolve android.R.styleable, i search this question in groups, i know it was removed from SDK. so i write a styleable same as SDK in my app's attr.xml, but it wasn't work, i get a nullpointer when my view draw scrollbar. So someone can help me ? how can I add a scrollbar in my custom view ? (I don't want use ScrollView in my APP _!) sorry for my poor English. --- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help
Hi Subrat, You might want to try NOT using localhost. From what I understand, using localhost on the emulator/device points to the localhost of the emulator/device NOT the intended localhost of your machine. Try figuring out what the IP address is of your machine (ipconfig/ifconfig for windows/linux) and use that instead. HTH Christian On Mar 11, 2:04 am, subrat kumar panda evergreen.sub...@gmail.com wrote: hello all, subrat here.im struggling with android soap which not getting any respone from axis server.currently i want 2 authenticate the username password. im sending my client code. help me, plz. android-client.txt 4KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Map API Key in MAC
i using mac to develop android NOw i need use google map i want to know how to get the java keytool MD5 in the mac -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TextView before ListView
Without posting the XML snippet of the layout, we can't help much. I would suggest posting the code to let us see what exactly you're trying. Otherwise, play around with the layout_width and layout_height options. They could be causing your layout not to render as you expect. On Mar 11, 5:35 am, Pipen erik.ing...@gmail.com wrote: Dear All, I've tried to add a TextView before a ListView in a LinearLayout. The result is that the ListView wont show at all. The same thing happens if I put the TextView after the ListView, but then I will only see the ListView. Is there a way to get a text view above the ListView without to much of a hassle? Kind regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help
Hi Subrat, You might want to try NOT using localhost. From what I understand, using localhost on the emulator/device points to the localhost of the emulator/device NOT the intended localhost of your machine. Try figuring out what the IP address is of your machine (ipconfig/ifconfig for windows/linux) and use that instead. HTH Christian On Mar 11, 2:04 am, subrat kumar panda evergreen.sub...@gmail.com wrote: hello all, subrat here.im struggling with android soap which not getting any respone from axis server.currently i want 2 authenticate the username password. im sending my client code. help me, plz. android-client.txt 4KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SQLite onUpgrade
For some reason, my onUpgrade method is not getting called when it should. I have incremented both the application version and the database version. When I re-install the application on the emulator using: adb install -r app.apk It installs the newer version, but when I load the application, onUpgrade is not called. Any ideas? Do I need to upgrade the app a different way instead of using adb install -r? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] scroll a layout in all direction (and zooming)
hello, I want to make an app where i can scroll the layout/view in all directions (both horizontally and vertically at the same time, like in the browser app). Maybe with GestureListener? I already managed to read and test tutorials about scrolling large images but i want to scroll the whole layout made of many widgets like buttons and textviews etc. Is there any way to accomplish that with the build in classes? If not, is there any open source classes which can do that? I dont want to write a new ScrollView class... What i already tried was to capsule a ScrollView in a HorizontalView, but that does only one scroll direction at one time. So if I am scrolling down(up), I cant scroll in other directions. greets JayhC -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Use spinner to store/retrieve shared preferences
Hi, Is there any example code to use spinner to store/retrieve the shared preferences. I'd like to create a similar setting menu as it is in Google's my tracks application. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Previewing video prior to download
Is there an elegant way to preview video content through an app before downloading it to the handset? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Status of SVOX Pico opensource-ness
Hi, SVOX Pico is a great product which enhance the TTS support based on free software. Thanks for this! As a Debian developer (I want to package this software), I see several limitations to the files provided in git, regarding the license: Lingware files in /pico/lang (master branch) are binaries and the source code is not included. According to the donut branch, it seems that they are generated from pico_resources/tools/LingwareBuilding/ PicoLingware_source_files with tools in pico_resources/tools/ LingwareBuilding/PicoLingware_tools_windows/tools. Some problems here : - those files (tools and src) are not in the master branch - those files are outdated (2009-10-16 whereas master is 2010-01-12) - the source code of tools is not provided (but it is said MODULE_LICENSE_APACHE2) Docs are not on the master branch (see pico_resources/docs on branch donut) Can this be sorted out? Regards Mathieu Parent PS: I have already reported this, but the ML seems a better media for this kind of stuff. See http://code.google.com/p/android/issues/ detail?id=4415. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Get item selected from spinner
Hi all, I am a newbie coder and new to the SDK. I was just playing around with an app that i made. I wanted to know as to how to retrieve the item id of the selected item from the spinner when the spinner is re- populated. For example, I created 2 spinners, if you selected item 0 from spinner1 then spinner2 will have a bunch of items and if you selected item 1 from spinner1 then spinner2 will have a different set of items. Now, my question is that when i select item 1 from spinner 1 then the items in spinner2 dont have different ids. So how do i differentiate from the two sets of data? To illustrate, User selected item 0 in spinner1 - spinner2 gets data from array1 - item 0 in spinner2 has id '0' and item text is apple User selected item 1 in spinner1 - spinner2 gets data from array2 - item 0 in spinner2 has id '0' and item text is oranges I know this sounds confusing but i hope the right people understood it.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] geo fix loses longitude/latitude precision
When using geo fix from the console, some information is truncated due to poor casting in the code of external/qemu/android/console.c. I came across that problem when plugging in coordinates for my house and realizing whatever location was being sent to the emulator was off by a few blocks. The stralloc_add_format statements were changed in order to print the floating point values most accurately. Plus, the stralloc_add_format for altitude was changed to %.1lf (long float/double) instead of %.1g. g may use scientific notation and I don't think that's what they want when there's only one digit after the decimal point. The original code was (~ line 2000): - /* then the latitude */ hemi = 'N'; val = params[1]; if (val 0) { hemi = 'S'; val = -val; } deg = (int) val; min = 60*(val - deg); val = val - min/60.; stralloc_add_format( s, ,%02d%02d.%04d,%c, deg, min, (int) (val * 1), hemi ); /* the longitude */ hemi = 'E'; val = params[0]; if (val 0) { hemi = 'W'; val = -val; } deg = (int) val; min = 60*(val - deg); val = val - min/60.; stralloc_add_format( s, ,%02d%02d.%04d,%c, deg, min, (int) (val * 1), hemi ); /* bogus fix quality, empty satellite count and dilutions */ stralloc_add_str( s, ,1 ); /* optional altitude */ if (n_params = 3) { stralloc_add_format( s, %.1g, params[2] ); last_altitude = params[2]; } else { stralloc_add_str( s, , ); } - Please fix the code to the following. - /* first, the time */ stralloc_add_format( s, $GPGGA,%06d, last_time ); last_time ++; /* then the latitude */ hemi = 'N'; val = params[1]; if (val 0) { hemi = 'S'; val = -val; } deg = (int) val; min = 60.0 * (val - deg); stralloc_add_format( s, ,%02d%07.4lf,%c, deg, min, hemi ); /* the longitude */ hemi = 'E'; val = params[0]; if (val 0) { hemi = 'W'; val = -val; } deg = (int) val; min = 60.0 * (val - deg); stralloc_add_format( s, ,%02d%07.4lf,%c, deg, min, hemi ); /* bogus fix quality, empty satellite count and dilutions */ stralloc_add_str( s, ,1 ); /* optional altitude */ if (n_params = 3) { stralloc_add_format( s, %.1lf, params[2] ); last_altitude = params[2]; } else { stralloc_add_str( s, , ); } - This code fixes the issue. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Application signature mismatch
Sometimes I use my laptop to code and sometimes my desktop. Every time I reinstall the android app using a different system it complains about different application signatures and I have to uninstall the app. Is there a way to make them match on multiple systems? -- Joshua Frank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Cannot sendBroadcast Intent to receiver which has permission.
Hi All, How can i call one activity to other activity without using intents and services is there any solution for this please help me cheers, k.satish -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to add scrollbar in a custom view.
Hi, i have a custom view, when i want to add a scrollbar to it , i have a problem, i have learn the code of GridViewSpecial(which belong to Gallery) , when i copy this line: initializeScrollbars(context.obtainStyledAttributes(android.R.styleable.View)); to my code, i found that my app can't resolve android.R.styleable, i search this question in groups, i know it was removed from SDK. so i write a styleable same as SDK in my app's attr.xml, but it wasn't work, i get a nullpointer when my view draw scrollbar. So someone can help me ? how can I add a scrollbar in my custom view ? (I don't want use ScrollView in my APP _!) sorry for my poor English. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can i call one activity to other activity without using intents and services
On Fri, Mar 12, 2010 at 1:30 PM, satish k satish@gmail.com wrote: Hi All, How can i call one activity to other activity without using intents and services is there any solution for this please help me cheers, k.satish -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HTML5 Geolocation Features
I'm trying to use the HTML5 Geolocation features found in Android 2.0. However, it does not work in the browser or a WebView. I've tested in the emulator and on multiple devices. The code I have works in multiple other browsers that support the spec. Has anyone gotten this to work? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en