[android-developers] Re: Alternatives to Multitouch
2009/7/20 Desu Vinod Kumar vinny.s...@gmail.com HI That means look like Scale frame in Photo Stream example. I also want to do the same multi touch zoom functionality in my app. By this conversation Multi touch functionality is not yet implemented now ,it is not possible to add in my app . The hack someone came up with to put multitouch works fine with both MT enabled and non-MT enabled phones, except you need a root'd phone to load the custom firmware on. In any case even though I can use MT, it is rather convulted to use and I hated it, I'd much prefer some pop up slider that shows, regardless if it's circular or vertical along one edge. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] why can't list files under /data ?
hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? 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] How to make Visible Invisible Buttons?
Hi How to create A Visible for 10 sec When we click an Item after that it invisible upto when i click the item again. can any body guide me regarding this? thanks a a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: why can't list files under /data ?
hi, i change the mode for /data, chmod 777 /data it's work! but is there have threat for changoing directory mode?? thanks! On 7月20日, 下午2時04分, tstanly tsai.sta...@gmail.com wrote: hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? 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 create HTTP request, and how to create a connection object.
Any clue??? Guys i dont have any idea from where to start. Any help will be highly apperciated. THANX On Jul 17, 6:52 pm, Chris narendrasingh.bi...@gmail.com wrote: How to create anHTTPrequestobject of POST type in android? Which class need to be extend or what method need to implement? How to establish connection to a server? Actually i want to connect to a microsoft exchange server, and then i have to send arequestto it usingHTTP. I dont have any idea about this, any help will be highly apperciated. THANKS A LOT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 create HTTP request, and how to create a connection object.
It didnt help me.. Thanks On Jul 17, 6:59 pm, Peli peli0...@googlemail.com wrote: Why don't you simply try a Google search?http://www.google.com/search?q=http+post+java Peliwww.openintents.org On Jul 17, 3:52 pm, Chris narendrasingh.bi...@gmail.com wrote: How to create anHTTPrequestobject of POST type in android? Which class need to be extend or what method need to implement? How to establish connection to a server? Actually i want to connect to a microsoft exchange server, and then i have to send arequestto it usingHTTP. I dont have any idea about this, any help will be highly apperciated. THANKS A LOT- 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: why can't list files under /data ?
That would (potentially) allow any application to read and write the data of other applications. So yes, there's a threat. On Sun, Jul 19, 2009 at 11:23 PM, tstanlytsai.sta...@gmail.com wrote: hi, i change the mode for /data, chmod 777 /data it's work! but is there have threat for changoing directory mode?? thanks! On 7月20日, 下午2時04分, tstanly tsai.sta...@gmail.com wrote: hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? thanks! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] App doesn't run after update
I've been developing an app which uses the camera. It worked fine until I installed the laterst system update. I was running the app on my G1 when I saw an alert notifying of some system updates. I chose to install it, and then after that, my app doesn't run anymore. What is up? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 run the focus item on the view without using onclick
Hi All: If I want to execute the focused item on the view, I need to select focused item and press enter. Now I want to find another way to execute it without using click action. Does everyone know the other way? Thank you very much. Sincerely yours, Morris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 place a button in image view?
HI How can i place a Image Buttons on the Image View If i click the grid view i vl get a image in full screen i want tplace the imagebuttons on the images how can i place that give me some suggestions thanks a lot in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to run the focus item on the view without using onclick
AFAIK, u need some or the other event to trigger the execution on the UI. now, wat u cud do is in a function, u cud have the requestFocus function so that the component u want to execute comes to focus. before this, u shud have the setOnFocusListener() defined for the component. so wen the requestFocus is called, the procedures defined in setOnFocusListener(), is executed... hope this helps, cheers! On Mon, Jul 20, 2009 at 12:28 PM, Morris morrischen.c...@gmail.com wrote: Hi All: If I want to execute the focused item on the view, I need to select focused item and press enter. Now I want to find another way to execute it without using click action. Does everyone know the other way? Thank you very much. Sincerely yours, Morris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] surfaceChanged callback takes a long time to arrive (SurfaceFlinger issue?)
I've implemented a SurfaceView that receives callbacks from the SurfaceHolder. The first time that I rotate the screen the surfaceChanged callback takes a long time (~5-10 seconds) to arrive. This only happens the first time that the screen is rotated. Subsequent rotations are near instantaneous. Coinciding with the prolonged callback is the following message: 07-20 17:40:09.153: WARN/SurfaceFlinger(568): timeout expired mFreezeDisplay=0, mFreezeCount=1 I dug out the android code and found that the SurfaceFlinger class has a member called mFreezeCount that is set through the following code in the SurfaceFlinger class. status_t err = BnSurfaceComposer::onTransact(code, data, reply, flags); if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) { // HARDWARE_TEST stuff... ... // skip case 1007: // set mFreezeCount mFreezeCount = data.readInt32(); return NO_ERROR; My question is whether anyone can explain what is setting the mFreezeCount and whether there is anything that can be done in the SurfaceView to avoid this from happening? I am doing all rendering in the SurfaceView on the UI thread. The onDraw is invoked by making calls to both invalidate() and postInvalidate(). Many thanks for any help you can provide. Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: App doesn't run after update
From the 1.5 r3 release notes: When an application requests access to device camera (through android.hardware.camera), the CAMERA permission check is now properly enforced. On Jul 20, 7:31 am, doubleslash doublesl...@gmail.com wrote: I've been developing an app which uses the camera. It worked fine until I installed the laterst system update. I was running the app on my G1 when I saw an alert notifying of some system updates. I chose to install it, and then after that, my app doesn't run anymore. What is up? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 create HTTP request, and how to create a connection object.
Which code did you try? The link contains several Java code examples with HTTP and POST. The more specific your question is, the better people can help you here. Please post a piece of code here that you tried but did not work, and we may be able to tell you what you need to change. Also, this does not sound like a very Android-specific question, so you may have more luck in a general Java-forum for beginners. Peli www.openintents.org On Jul 20, 8:25 am, Chris narendrasingh.bi...@gmail.com wrote: It didnt help me.. Thanks On Jul 17, 6:59 pm, Peli peli0...@googlemail.com wrote: Why don't you simply try a Google search?http://www.google.com/search?q=http+post+java Peliwww.openintents.org On Jul 17, 3:52 pm, Chris narendrasingh.bi...@gmail.com wrote: How to create anHTTPrequestobject of POST type in android? Which class need to be extend or what method need to implement? How to establish connection to a server? Actually i want to connect to a microsoft exchange server, and then i have to send arequestto it usingHTTP. I dont have any idea about this, any help will be highly apperciated. THANKS A LOT- 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: How to create HTTP request, and how to create a connection object.
Maybe you should ask in android beginners? Or google android java httpclient post? On Jul 20, 10:01 am, Peli peli0...@googlemail.com wrote: Which code did you try? The link contains several Java code examples with HTTP and POST. The more specific your question is, the better people can help you here. Please post a piece of code here that you tried but did not work, and we may be able to tell you what you need to change. Also, this does not sound like a very Android-specific question, so you may have more luck in a general Java-forum for beginners. Peliwww.openintents.org On Jul 20, 8:25 am, Chris narendrasingh.bi...@gmail.com wrote: It didnt help me.. Thanks On Jul 17, 6:59 pm, Peli peli0...@googlemail.com wrote: Why don't you simply try a Google search?http://www.google.com/search?q=http+post+java Peliwww.openintents.org On Jul 17, 3:52 pm, Chris narendrasingh.bi...@gmail.com wrote: How to create anHTTPrequestobject of POST type in android? Which class need to be extend or what method need to implement? How to establish connection to a server? Actually i want to connect to a microsoft exchange server, and then i have to send arequestto it usingHTTP. I dont have any idea about this, any help will be highly apperciated. THANKS A LOT- 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] List view scrolling while setPadding
Hi All, I have an list view in my project. If the list view items are more than that page (screen size) means i am able to see the scroll bar in the right side. If i am restricting in to a default size using setPadding (reducing the height of the view). This time i am not getting the scroll bar. That means if the items are more that the device screen size scroll bar is showing. Other wise scroll bar is not showing. Is there any specific reason in this? How do i handle for this? Thanks in advance, Muthu Kumar K. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 keep service alive?
My code snippet was not full. I use ServiceConnection and do save the state of the service (binded/unbinded) to avoid unnecessary binding. Anyhow, thanks for the details. I believe I know now how to rewrite me code. Yossi On Jul 19, 11:49 pm, Dianne Hackborn hack...@android.com wrote: The onPause() method in this example is broken, because if shouldStopService() returns false then it won't unbind, and the next time the activity gets resume it will then go and re-build, causing a growing number of bindings. On Sun, Jul 19, 2009 at 7:58 AM, Guillaume Perrot guillaume.p...@gmail.comwrote: Using both startService and bindService is handy to wait for the onServiceConnected callback before requesting a singleton reference that is set in the service's onCreate. If you do this just after the startService, the reference will be null. The startService is needed for the service to continue running when the activities have been destroyed (and call unbind). A use case is a service managing a background XMPP connection in a chat/social application (only the sign out user action would call stopService). So, Mark I don't understand your point when you say not to use both startService and bindService. On 19 juil, 13:47, Mark Murphy mmur...@commonsware.com wrote: Yossi wrote: Hi Mark, My code is relatively simple public void onResume() { Intent intent = new Intent(this, TrackingService.class); startService(intent); bindService(intent, _connection, Context.BIND_AUTO_CREATE); } Do either startService() or bindService(), not both. public void onPause() { if(shouldStopService()) { unbindService(_connection); stopService(new Intent(this, TrackingService.class)); } } Do either unbindService() or stopService(), matching up with what you chose to do in onResume(). Unless your service is in some other process (which the use of TrackingService.class suggests it is not), you probably do not want to use bindService()/unbindService(). Use startService() to start it, then use stopService() only when you want to stop the service. Since it is in your process, use other means (e.g., static singleton reference to the service) to communicate with it from the activity. Right now, your service stop shortly after your activity goes off-screen, because you are telling the service to stop in onPause(). http://developer.android.com/reference/android/app/Service.html#Servi... -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy Android 1.5 Programming Books:http://commonsware.com/books.html -- 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] problem in updating ADT
Hi Dear, i am trying to update ADT 0.9 from 0.8 and following the link http://developer.android.com/sdk/1.5_r3/upgrading.html#UpdateAdt. as for the first step i need to uninstall android editor but uninstall button doesn't enable when i click on android editor or android developer tool. only upgrade is enable which shows problem when i do upgrade. i am using eclipse 3.4.1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 send request to Nusoap webservices?
Hi How to send the Request from Nusoap Php webservices and get the response from the server? Plz help me regarding this ? Thanks a lot in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can we make paid apps - additional packs also chargeable?
Hi All, We are developing an android paidgame, which would also come with additional paid packs/levels. Does android market has any support that once the paid app is downloaded, it's additional pack's/level can also be charged through the market, if the user intends to download the additional packs. Any clue on how we can implement this? Thanks, Shibbs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] thrown some error response in ddms plz help regarding this
[2009-07-20 15:21:04 - ddmlib]An established connection was aborted by the software in your host machine java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(Unknown Source) at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.write(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at com.android.ddmlib.JdwpPacket.writeAndConsume(Unknown Source) at com.android.ddmlib.Client.sendAndConsume(Unknown Source) at com.android.ddmlib.HandleHeap.sendREAQ(Unknown Source) at com.android.ddmlib.Client.requestAllocationStatus(Unknown Source) at com.android.ddmlib.DeviceMonitor.createClient(Unknown Source) at com.android.ddmlib.DeviceMonitor.openClient(Unknown Source) at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(Unknown Source) at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(Unknown Source) at com.android.ddmlib.DeviceMonitor.access$1(Unknown Source) at com.android.ddmlib.DeviceMonitor$2.run(Unknown Source) What are these y these are throwing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can i place a button in image view?
Hi, You can not keep built-in widget over anthor ..u hav to create Custom control which extend from Image View. Or tell me clear what u want to do.. On Mon, Jul 20, 2009 at 12:35 PM, android.vinny vinny.s...@gmail.comwrote: HI How can i place a Image Buttons on the Image View If i click the grid view i vl get a image in full screen i want tplace the imagebuttons on the images how can i place that give me some suggestions thanks a lot in advance -- Thank Regards Peeyush Varshney --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can i place a button in image view?
HI my activity will show the image in full screen in that full screen image botom i want to place two buttons when i click the photo the buttions shouls visible for 10 sec and should g to invisible mode after .. On Mon, Jul 20, 2009 at 3:34 PM, peeyush varshney varshney.peey...@gmail.com wrote: Hi, You can not keep built-in widget over anthor ..u hav to create Custom control which extend from Image View. Or tell me clear what u want to do.. On Mon, Jul 20, 2009 at 12:35 PM, android.vinny vinny.s...@gmail.comwrote: HI How can i place a Image Buttons on the Image View If i click the grid view i vl get a image in full screen i want tplace the imagebuttons on the images how can i place that give me some suggestions thanks a lot in advance -- Thank Regards Peeyush Varshney -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Alternatives to Multitouch
Can the ringer/speaker volume + / - keys be utilized for a general zoom in / out. I guess there will be UI complications if you are handling a call at the same time. On Jul 18, 6:18 pm, Jason Van Anden jason.van.an...@gmail.com wrote: I need to zoom-in/zoom-out for my app. Multitouch would be the most obvious way to go about this *sigh*. I would prefer not to use the zoom-in/out widget. I have been trying a number of other techniques but am not satisfied with the feel. Looking for suggestions from the community on alternative approaches. A one fingered zoom? Thanks, Jason Van Anden --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Alternatives to Multitouch
HI Yes i have also listned some that we can control the zoomin and out from volume control option how it posible if any body knows plz explain On Mon, Jul 20, 2009 at 4:04 PM, jdesbonnet jdesbon...@gmail.com wrote: Can the ringer/speaker volume + / - keys be utilized for a general zoom in / out. I guess there will be UI complications if you are handling a call at the same time. On Jul 18, 6:18 pm, Jason Van Anden jason.van.an...@gmail.com wrote: I need to zoom-in/zoom-out for my app. Multitouch would be the most obvious way to go about this *sigh*. I would prefer not to use the zoom-in/out widget. I have been trying a number of other techniques but am not satisfied with the feel. Looking for suggestions from the community on alternative approaches. A one fingered zoom? Thanks, Jason Van Anden -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can i place a button in image view?
Hi,You can not keep built-in widget over anthor built-in ..you need to create Custom Image which is having two button..thats aLL.. On Mon, Jul 20, 2009 at 3:37 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI my activity will show the image in full screen in that full screen image botom i want to place two buttons when i click the photo the buttions shouls visible for 10 sec and should g to invisible mode after .. On Mon, Jul 20, 2009 at 3:34 PM, peeyush varshney varshney.peey...@gmail.com wrote: Hi, You can not keep built-in widget over anthor ..u hav to create Custom control which extend from Image View. Or tell me clear what u want to do.. On Mon, Jul 20, 2009 at 12:35 PM, android.vinny vinny.s...@gmail.comwrote: HI How can i place a Image Buttons on the Image View If i click the grid view i vl get a image in full screen i want tplace the imagebuttons on the images how can i place that give me some suggestions thanks a lot in advance -- Thank Regards Peeyush Varshney -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Thank Regards Peeyush Varshney --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can i place a button in image view?
HI my activity shows 20 images one of after the other for all images that buttons should visible i onitemclick press the image On Mon, Jul 20, 2009 at 4:09 PM, peeyush varshney varshney.peey...@gmail.com wrote: Hi,You can not keep built-in widget over anthor built-in ..you need to create Custom Image which is having two button..thats aLL.. On Mon, Jul 20, 2009 at 3:37 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI my activity will show the image in full screen in that full screen image botom i want to place two buttons when i click the photo the buttions shouls visible for 10 sec and should g to invisible mode after .. On Mon, Jul 20, 2009 at 3:34 PM, peeyush varshney varshney.peey...@gmail.com wrote: Hi, You can not keep built-in widget over anthor ..u hav to create Custom control which extend from Image View. Or tell me clear what u want to do.. On Mon, Jul 20, 2009 at 12:35 PM, android.vinny vinny.s...@gmail.comwrote: HI How can i place a Image Buttons on the Image View If i click the grid view i vl get a image in full screen i want tplace the imagebuttons on the images how can i place that give me some suggestions thanks a lot in advance -- Thank Regards Peeyush Varshney -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Thank Regards Peeyush Varshney -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Semi trasparent buttons over a wallpaper
Hi all, I am not sure of the technical terms for this, so I could not find answers. I want my app to have a screen (layout) with several buttons. I want the buttons to appear above a wallpaper (the system selected wallpaper - the one the user selects to show in the HOME application). And - I want to buttons to be semi-transparent: I want to use an image for the buttons, but that the wallpaper will be seen behind the image. Like you see in this screen: http://www.shsh.com/pics/semi_sample.png So my questions: - How can I do such a button ? - And (OT) - how do I read and use the system wallpaper ? TIA ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Strange bug in GPS fix - please help!
Thank you Mark! That solved the problem - thanks for the swift and helpful response, as ever. Do you think it is a bug that getLastKnownLocation tends to choke and fail if called from a background thread - is it something that I should reproduce and report to Google? Or is it something that I shouldn't have been trying to do in the first place? :) best wishes, Anna On Jul 16, 10:51 pm, Mark Murphy mmur...@commonsware.com wrote: Anna PS wrote: Sorry, I guess I'm being dim. Should I add some code inside the onLocationChanged method itself to check the accuracy? And then just check this number when the user clicks on the button? public void onLocationChanged(Location location) { accuracy = location.getAccuracy(); } Possibly. I was more thinking that if the user presses the button, and an immediate getLastKnownLocation() returns null or an insufficiently-accurate value, you then start paying attention to the location you get with onLocationChanged(). If getLastKnownLocation() was null, the firstfixyou get should be treated as if it came from your getLastKnownLocation(), and checked for accuracy. If you are waiting for more accurate values, using onLocationChanged() will be the fastest way to get them, and it gets rid of your background thread. So, set yourself a flag indicating your current state, check that flag in onLocationChanged(), and take appropriate action -- probably the same action you were doing in the background thread, just pulled into onLocationChanged(). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 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: Strange bug in GPS fix - please help!
Anna PS wrote: Do you think it is a bug that getLastKnownLocation tends to choke and fail if called from a background thread - is it something that I should reproduce and report to Google? I'm not sure. I *think* I've used getLastKnownLocation() in background threads, but I don't have a ready example to prove it. If you can reproduce the problem in a clean separable project, upload it to http://b.android.com with a description of the problem. If you think of it, post the link to the resulting issue here on this thread. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: translated application dealing with English only server
Hi, and thanks for your help. I've managed to make my own ListAdapter now, but how do I load the resources of another language? I tried doing a hack by changing the Locale halfway with Locale.setDefault(Locale.ENGLISH); but when I requested the resource it still gives me the local language. This is on the 1.5 emulator set to French. I also tried using the ResourceBundle class but that doesn't seem to work with Android resource files (I think!) On Jul 14, 4:53 am, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: If I understand you correctly, you have anEnglish-speakingserver, and a multilingual Android UI. You also have a requirement to translate at runtime. In that case, I would recommend theserverprovide the translation map, comme ca: string name=dogogday/string When you build the list view or list activity, you put both ogday and dog into the list item (display the former, but also store the latter), so that when the user selects it, you pull out theEnglish word and send it back to theserver. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 12, 12:35 am, kizza kieran.flem...@gmail.com wrote: Hi, I am having 2 issues with Android trying to make mytranslatedapp. I have a strings file like this: string name=dogDog/string string name=catCat/string string name=birdBird/string string-array name=animal_types item@string/Dog/item item@string/Cat/item item@string/bird/item /string-array and these are used to populate a ListActivity. The name attribute is the value that theserverexpects. 1: When the user clicks an entry in the list, is there a way to return the string's name in the translation file, rather than thetranslated string? 2: If theserverreturns, for example, 'bird', is there a way that I can translate that string at runtime? If it turns out that there is no way to do this with the translation system, what would you suggest? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: translated application dealing with English only server
kizza wrote: Hi, and thanks for your help. I've managed to make my own ListAdapter now, but how do I load the resources of another language? That is for the user to control. The user can change their locale via the Settings application if and when they feel it is appropriate. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use adb tool on SAMSUNG GALAXY?
Solved!!! Flori7500 from the German andoid community had fixed the linux adb issue. See his changeset: https://review.source.android.com/#change,10728 Looks like he didn't notice the actual changes in the current head concerning the Samsung vendor id constant, but I guess he will merge his changes to adb/usb_linux.c into the head. If you can't wait and/or build your own SDK he posted a linux binary on a german Samsung Galaxy forum: http://www.android-hilfe.de/o2-samsung-galaxy-i7500-forum/4021-adb-jetzt-auch-auf-dem-galaxy.html#post38582 Kudos to Flori as he saved my day. Cheers, Olaf On 19 Jul., 14:08, legerb drim...@gmail.com wrote: Something like that ;-) On Jul 14, 7:11 pm, David Turner di...@android.com wrote: You need a different version of ADB to access this phone at the moment. A future release of the SDK will provide an ADB binary that should be able to do that, but this is not available yet as far as I know. You're quite on the bleeding edge, aren't you ;-) On Tue, Jul 14, 2009 at 6:05 PM, legerb drim...@gmail.com wrote: Hey, I just got this device too. Trying to figure out how to debug on device too. According this http://groups.google.com/group/android-beginners/browse_thread/thread... Samsung have their own adb. Please update the thread if you've got any progress :) thanks ahead! On Jul 11, 10:54 pm, da yang daboil...@googlemail.com wrote: Hi i got this new mobilephone this week in Germany, wanted to debug my program on the device. but it doesn't work, c:\adbdevices lists no device attached, though i have tried to change the android_usb.inf in order to install the usb driver from SDK. i added some entries as follows: under [Google.NTx86] ; HTC DREAM ... ; SAMSUNGGALAXY %USB\VID_04E8PID_6640. DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 %USB\VID_04E8PID_6640MI_01.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640MI_01 %USB\VID_04E8PID_6640.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 and [Strings]: USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXY USB\VID_04E8PID_6640MI_01.DeviceDescRelease=SAMSUNGGALAXY CompositeADBInterface USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXYBootloader i got only one VID and one PID through USBVIEW, though for HTC DREAM there are different PIDs used. Theadbinterface got installed, butadbjust didn't work. later i also tried to use the device under linux, set up the device as in Dev guide: If you're developing on Ubuntu Linux, you need to add a rules file: 1. Login as root and create this file: /etc/udev/rules.d/51- android.rules. For Gusty/Hardy, edit the file to read: SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 For Dapper, edit the file to read: SUBSYSTEM==usb_device, SYSFS{idVendor}==0bb4, MODE=0666 2. Now execute: chmod a+rx /etc/udev/rules.d/51-android.rules adbdevices listed nothing as well. : ( open a terminal on the device, with ps, i guess theadbdaemon adbd is running. but theadbtool just doesn't work. Can someone help me? thanks da --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?
I've double checked my code and found I'm doing this slightly differently, although the method above should also work. Strike Register broadcast receiver in the manifest - this seems to be meerly a declaration of the receiver. No intent filters; I check the specific event types _ON/_OFF in the receiver's onReceive() method. The key: I register the BroadcastReceiver manually, using Context.registerReceiver(BroadcastReceiver receiver, IntentFilter filter) On Jul 19, 8:22 pm, jiaoni jiaoni5...@gmail.com wrote: Thanks, JP. I have added following lines in AndroidManifest.xml, but still cannot receive any message in my BroadcastReceiver's onReceive() method. Is there anything I did wrong, or may I need some permission to receive SCREEN_ON/SCREEN_OFF message? Please help. receiver android:name=.MessageReceiver android:process=:remote intent-filter action android:name=android.intent.action.SCREEN_ON/action action android:name=android.intent.action.SCREEN_OFF/action /intent-filter /receiver On Jul 18, 7:02 am, JP joachim.pfeif...@gmail.com wrote: 1. You need to create a subclass of BroadcastReceiver, override onReceive(Context context, Intent intent). In onReceive(), extract action from intent and catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF 2. Next you need to register the BroadcastReceiver in AndroidManifest.xml On Jul 17, 12:02 am, jiaoni jiaoni5...@gmail.com wrote: How can I catchSCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: translated application dealing with English only server
Kizza, If you need to be able to tranlate 'on the fly', then you need to do all translations yourself. Don't use the strings.xml file. On Jul 20, 9:52 am, Mark Murphy mmur...@commonsware.com wrote: kizza wrote: Hi, and thanks for your help. I've managed to make my own ListAdapter now, but how do I load the resources of another language? That is for the user to control. The user can change their locale via the Settings application if and when they feel it is appropriate. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?
JP wrote: Strike Register broadcast receiver in the manifest - this seems to be meerly a declaration of the receiver. No, this means the receiver runs outside the context of any given component (e.g., activity or service). For example, you need this with the ACTION_BOOT_COMPLETED Intent, since none of your activities or services will be running by the time that Intent gets invoked. No intent filters; I check the specific event types _ON/_OFF in the receiver's onReceive() method. Lots and lots of intents get broadcast -- do you really need to see them all? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Secure data storage (rooted phones)
Hello everyone, Let's say there are hard security requirements that must include the possibility of rooting a phone. So when a phone gets lost, the sensitive data on it should still be as secure as possible even if the phone is rooted. Any hints and ideas on this? The first thought was that one could generate a key based on some device/user ID, but this information is available to all applications. So given some reverse engineering and effort, this can be cracked too. I am not exactly a security expert, but maybe there are some around here in this group. Thanks for all comments! Regards, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: why can't list files under /data ?
/data only contains - on this running dream, with mostly standard firmware - a few directories, none of which are directly application related and all of which appear to be standard: drwxrwx--x shellshell 2009-05-28 19:49 local drwxrwx--x system system2009-05-28 19:49 data drwx-- root root 2009-05-28 19:49 property drwxrwx--x system system2009-05-28 19:49 app-private drwxrwxr-x system system2009-05-28 19:49 system drwxr-xr-x system system2009-05-30 20:41 tombstones drwxrwx--x system system2009-05-28 19:49 dalvik-cache drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--x system system2009-05-28 19:49 app drwxrwxrwx system system2009-05-28 19:49 anr drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--t system misc 2009-05-28 19:49 misc drwxrwx--- root root 2009-05-28 19:49 lost+found Most of those are world-readable anyway.. (and joy, that lost+found bug still lives. Fun.) Even if we assume /data/data, then if that were true guessing the application name would have the same vulnerability. Reading /data/data is an information leak (what apps are installed, and/or might have data saved) but it is not an application-data leak. As an aside, there are some definite leaks in that list - anr/traces.txt for example. And why are all the application data directories world-readable? That sounds like a much bigger potential problem than being able to see that /data has a standard layout. On Mon, Jul 20, 2009 at 2:25 AM, Romain Guyromain...@google.com wrote: That would (potentially) allow any application to read and write the data of other applications. So yes, there's a threat. On Sun, Jul 19, 2009 at 11:23 PM, tstanlytsai.sta...@gmail.com wrote: hi, i change the mode for /data, chmod 777 /data it's work! but is there have threat for changoing directory mode?? thanks! On 7月20日, 下午2時04分, tstanly tsai.sta...@gmail.com wrote: hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? thanks! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Secure data storage (rooted phones)
2009/7/21 Markus Junginger mar...@junginger.biz Any hints and ideas on this? If you have to ask such a question you probably aren't qualified to implement a solution. I'm not trying to insult you, but it takes a special type of mindset to go down this path properly, and then years give or take of aquiring a suitable skill set. One option would be to pre-root it yourself have have an encrypted filesystem, so even if they reboot they need a password or some other authentication means to access the information. The question is how far do you want, how much time, effort and other resources are you willing to throw at such a problem to thawte an attacker? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: why can't list files under /data ?
On Mon, Jul 20, 2009 at 4:14 PM, Disconnect dc.disconn...@gmail.com wrote: /data only contains - on this running dream, with mostly standard firmware - a few directories, none of which are directly application related and all of which appear to be standard: What is a mostly standard firmware exactly? Are you referring to one of the JF builds? drwxrwx--x shellshell 2009-05-28 19:49 local drwxrwx--x system system2009-05-28 19:49 data drwx-- root root 2009-05-28 19:49 property drwxrwx--x system system2009-05-28 19:49 app-private drwxrwxr-x system system2009-05-28 19:49 system drwxr-xr-x system system2009-05-30 20:41 tombstones drwxrwx--x system system2009-05-28 19:49 dalvik-cache drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--x system system2009-05-28 19:49 app drwxrwxrwx system system2009-05-28 19:49 anr drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--t system misc 2009-05-28 19:49 misc drwxrwx--- root root 2009-05-28 19:49 lost+found Most of those are world-readable anyway.. (and joy, that lost+found bug still lives. Fun.) Even if we assume /data/data, then if that were true guessing the application name would have the same vulnerability. Reading /data/data is an information leak (what apps are installed, and/or might have data saved) but it is not an application-data leak. As an aside, there are some definite leaks in that list - anr/traces.txt for example. And why are all the application data directories world-readable? That sounds like a much bigger potential problem than being able to see that /data has a standard layout. On Mon, Jul 20, 2009 at 2:25 AM, Romain Guyromain...@google.com wrote: That would (potentially) allow any application to read and write the data of other applications. So yes, there's a threat. On Sun, Jul 19, 2009 at 11:23 PM, tstanlytsai.sta...@gmail.com wrote: hi, i change the mode for /data, chmod 777 /data it's work! but is there have threat for changoing directory mode?? thanks! On 7月20日, 下午2時04分, tstanly tsai.sta...@gmail.com wrote: hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? thanks! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problems drawing a SurfaceView
This just makes the screen black, why? I don't understand how to force the draw of the SurfaceView. package com.android.WWS; import android.app.Activity; import android.content.Context; import android.graphics.*; import android.os.Bundle; import android.view.SurfaceView; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; public class WWS extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new GameView(this)); } private static class GameView extends SurfaceView implements OnKeyListener { private Paint mPaint = new Paint(); private int x; private int y; public GameView(Context context) { super(context); x = 135; y = 303; setFocusable(true); requestFocus(); } @Override public void onDraw(Canvas canvas) { Paint paint = mPaint; canvas.translate(10, 10); canvas.drawColor(Color.rgb(184,134,11)); paint.setColor(Color.rgb(107,142,35)); paint.setStrokeWidth(1); canvas.drawRect(x, y, x+30, y+7, paint); canvas.drawRect(x+10, y+7, x+20, y+27, paint); canvas.drawRect(x+5, y+27, x+25, y+32, paint); } public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { y -= 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { x -= 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { y += 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { x += 3; } return true; } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: why can't list files under /data ?
No, I'm running a modified Ion build actually. Are you saying that it would be different on some other device/image? I can flash and find out easily enough (yay nandroid). On Mon, Jul 20, 2009 at 10:19 AM, David Turner di...@android.com wrote: On Mon, Jul 20, 2009 at 4:14 PM, Disconnect dc.disconn...@gmail.comwrote: /data only contains - on this running dream, with mostly standard firmware - a few directories, none of which are directly application related and all of which appear to be standard: What is a mostly standard firmware exactly? Are you referring to one of the JF builds? drwxrwx--x shellshell 2009-05-28 19:49 local drwxrwx--x system system2009-05-28 19:49 data drwx-- root root 2009-05-28 19:49 property drwxrwx--x system system2009-05-28 19:49 app-private drwxrwxr-x system system2009-05-28 19:49 system drwxr-xr-x system system2009-05-30 20:41 tombstones drwxrwx--x system system2009-05-28 19:49 dalvik-cache drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--x system system2009-05-28 19:49 app drwxrwxrwx system system2009-05-28 19:49 anr drwxrwx--- root root 2009-05-28 19:49 lost+found drwxrwx--t system misc 2009-05-28 19:49 misc drwxrwx--- root root 2009-05-28 19:49 lost+found Most of those are world-readable anyway.. (and joy, that lost+found bug still lives. Fun.) Even if we assume /data/data, then if that were true guessing the application name would have the same vulnerability. Reading /data/data is an information leak (what apps are installed, and/or might have data saved) but it is not an application-data leak. As an aside, there are some definite leaks in that list - anr/traces.txt for example. And why are all the application data directories world-readable? That sounds like a much bigger potential problem than being able to see that /data has a standard layout. On Mon, Jul 20, 2009 at 2:25 AM, Romain Guyromain...@google.com wrote: That would (potentially) allow any application to read and write the data of other applications. So yes, there's a threat. On Sun, Jul 19, 2009 at 11:23 PM, tstanlytsai.sta...@gmail.com wrote: hi, i change the mode for /data, chmod 777 /data it's work! but is there have threat for changoing directory mode?? thanks! On 7月20日, 下午2時04分, tstanly tsai.sta...@gmail.com wrote: hi all, use file class, file(/data).listfiles(); there is notiong can show, but use file(/).listfiles(); it works! so is there some limit for directory under /data ?? thanks! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Secure data storage (rooted phones)
Time and resources are limited, of course. :) To further clarify the objective: a single file should be encrypted. The other important point is, that there should be no user interaction like password entry. Given this, I guess a secure solution is impossible on rooted phones in a strict sense (again, I am no security expert) because you can reverse engineer code and access all data. The question is if there are means to increase security to a level that makes significantly harder for attackers while spending only a reasonable effort. For example, I have heard of Keychain, which Developers can use on MacOS X and iPhone to store data securely, but I do not know how it works and how secure it actually is. Any feedback and ideas are welcome! Thanks, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Error in Android documentation
Hey all, A small notice here to say I found an error in the documentation, when building a radio button context menu in XML. On this page, in the Menus section, under 'Elements and Attributes' for the group tag. http://developer.android.com/guide/topics/resources/available-resources.html checkableBehavior - Whether the items are checkable. Valid values: none, all (exclusive / radio buttons), single (non-exclusive / checkboxes) This should actually be the other way round: * all (non-exclusive / checkboxes) * single (exclusive / radio buttons) mafro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Bitmap in GLSurfaceView
hi all.. I want to load a bitmap on a GLSurfaceView.. I do it like this: // In the SurfaceCreated function in the class that implements GLSurfaceView.Renderer int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureID = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); gl.glShadeModel(GL10.GL_SMOOTH); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE); InputStream is = mContext.getResources() .openRawResource(R.drawable.map); Bitmap bitmap = null; try { bitmap = BitmapFactory.decodeStream(is); } finally { try { is.close(); } catch (IOException e) { // Ignore. } } GLUtils.texImage2D(GL10.GL_TEXTURE_2D,0,bitmap,0); But the bitmap repeats itself on the surface and is also inverted.. why is this.. How do i make it appear only once...kindly help!! Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Secure data storage (rooted phones)
2009/7/21 Markus Junginger mar...@junginger.biz Given this, I guess a secure solution is impossible on rooted phones in a strict sense (again, I am no security expert) because you can reverse engineer code and access all data. The question is if there are means to increase security to a level that makes significantly harder for attackers while spending only a reasonable effort. Nothing is 100% secure, the goal is to slow people down, not to think that anything is or will be 100% secure 100% of the time. For example, I have heard of Keychain, which Developers can use on MacOS X and iPhone to store data securely, but I do not know how it works and how secure it actually is. Actually for the description you gave that would be a bad idea, since the key to unlock the file would be on the handset. If it's just a single file that makes things considerably easier, however I'm not really qualified to answer this either, but I am aware enough to know I'm not qualified enough to make such statements :) A simple approach would not to store the file on the phone in the first place and only access it as needed over the net. Alternatively you could encrypt the file using AES encryption, and use a RSA key pair to authenticate with the server and access the password to decrypt the file is downloaded as needed, if the handset is compromised you simply remove the public key from the server and it can no longer decrypt that file. The solution really depends on the actual requirements and how much resources you are willing to throw at the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?
The answer is already in this forum: http://groups.google.com/group/android-developers/browse_frm/thread/81d84efa68578924/e470ffd0dab85086?lnk=gstq=screen_on#e470ffd0dab85086 (I simply searched for SCREEN_ON) It seems the situation has not changed in SDK 1.5: For some reason, registering through Manifest does not work - only registering programmatically. In that thread, Dianne also points out another problem that you repeat above: Why do you need to set android:process=:remote? It takes 2MB of additional valuable phone memory, without much additional value. Peli www.openintents.org On Jul 20, 3:58 pm, JP joachim.pfeif...@gmail.com wrote: I've double checked my code and found I'm doing this slightly differently, although the method above should also work. Strike Register broadcast receiver in the manifest - this seems to be meerly a declaration of the receiver. No intent filters; I check the specific event types _ON/_OFF in the receiver's onReceive() method. The key: I register the BroadcastReceiver manually, using Context.registerReceiver(BroadcastReceiver receiver, IntentFilter filter) On Jul 19, 8:22 pm, jiaoni jiaoni5...@gmail.com wrote: Thanks, JP. I have added following lines in AndroidManifest.xml, but still cannot receive any message in my BroadcastReceiver's onReceive() method. Is there anything I did wrong, or may I need some permission to receive SCREEN_ON/SCREEN_OFF message? Please help. receiver android:name=.MessageReceiver android:process=:remote intent-filter action android:name=android.intent.action.SCREEN_ON/action action android:name=android.intent.action.SCREEN_OFF/action /intent-filter /receiver On Jul 18, 7:02 am, JP joachim.pfeif...@gmail.com wrote: 1. You need to create a subclass of BroadcastReceiver, override onReceive(Context context, Intent intent). In onReceive(), extract action from intent and catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF 2. Next you need to register the BroadcastReceiver in AndroidManifest.xml On Jul 17, 12:02 am, jiaoni jiaoni5...@gmail.com wrote: How can I catchSCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Bitmap in GLSurfaceView
For no repeat: http://www.khronos.org/opengles/documentation/opengles1_0/html/glTexParameter.html and look at GL_CLAMP. Texture y-coordinates go from the bottom to the top when y increases. Bitmaps/images usually go from the top to the bottom when y increases. Just flip your bitmap along the y-axis. On Jul 20, 11:04 am, kalyan simhan kalyansim...@gmail.com wrote: hi all.. I want to load a bitmap on a GLSurfaceView.. I do it like this: // In the SurfaceCreated function in the class that implements GLSurfaceView.Renderer int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureID = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); gl.glShadeModel(GL10.GL_SMOOTH); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_REPLACE); InputStream is = mContext.getResources() .openRawResource(R.drawable.map); Bitmap bitmap = null; try { bitmap = BitmapFactory.decodeStream(is); } finally { try { is.close(); } catch (IOException e) { // Ignore. } } GLUtils.texImage2D(GL10.GL_TEXTURE_2D,0,bitmap,0); But the bitmap repeats itself on the surface and is also inverted.. why is this.. How do i make it appear only once...kindly help!! Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?
I tried this in my activity, but still cannot receive event: MessageReceiver receiver = new MessageReceiver(); IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON); registerReceiver(receiver, filter); I feel frustrated and don't know why... On Jul 20, 9:58 pm, JP joachim.pfeif...@gmail.com wrote: I've double checked my code and found I'm doing this slightly differently, although the method above should also work. Strike Register broadcast receiver in the manifest - this seems to be meerly a declaration of the receiver. No intent filters; I check the specific event types _ON/_OFF in the receiver's onReceive() method. The key: I register the BroadcastReceiver manually, using Context.registerReceiver(BroadcastReceiver receiver, IntentFilter filter) On Jul 19, 8:22 pm, jiaoni jiaoni5...@gmail.com wrote: Thanks, JP. I have added following lines in AndroidManifest.xml, but still cannot receive any message in my BroadcastReceiver's onReceive() method. Is there anything I did wrong, or may I need some permission to receiveSCREEN_ON/SCREEN_OFF message? Please help. receiver android:name=.MessageReceiver android:process=:remote intent-filter action android:name=android.intent.action.SCREEN_ON/action action android:name=android.intent.action.SCREEN_OFF/action /intent-filter /receiver On Jul 18, 7:02 am, JP joachim.pfeif...@gmail.com wrote: 1. You need to create a subclass of BroadcastReceiver, override onReceive(Context context, Intent intent). In onReceive(), extract action from intent and catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF 2. Next you need to register the BroadcastReceiver in AndroidManifest.xml On Jul 17, 12:02 am, jiaoni jiaoni5...@gmail.com wrote: How can I catchSCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] create drawable from image stored on sd card
I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj] = context.getResources().getDrawable(dwID); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Error in Android documentation
mafro wrote: Hey all, A small notice here to say I found an error in the documentation, when building a radio button context menu in XML. On this page, in the Menus section, under 'Elements and Attributes' for the group tag. http://developer.android.com/guide/topics/resources/available-resources.html checkableBehavior - Whether the items are checkable. Valid values: none, all (exclusive / radio buttons), single (non-exclusive / checkboxes) This should actually be the other way round: * all (non-exclusive / checkboxes) * single (exclusive / radio buttons) If this is not already on http://b.android.com, you might want to post it there. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to extract RAW HTML using WebView
Hi, Is there a way to get the RAW HTML using the WebView? Thanks, -Amit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 extract RAW HTML using WebView
m8 wrote: Is there a way to get the RAW HTML using the WebView? Not that I am aware of. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: create drawable from image stored on sd card
intbt wrote: I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj] = context.getResources().getDrawable(dwID); Files on the SD card are not resources. Use ordinary java.io.* classes to interact with them. In particular, BitmapFactory.decodeFile() has a version that takes a File. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: create drawable from image stored on sd card
Sorry, got posted too soon I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj.createFromPath(newGame.sdShapes [xOFy.returnOrder(jj)]); In both instances newGame.sdShapes [xOFy.returnOrder(jj)] provides path to file (/sdcard/filename) On Jul 20, 8:35 am, intbt in...@tacberry.com wrote: I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj] = context.getResources().getDrawable(dwID); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Is Zoom in And Zoom out is Possible for Image View In android............
I'm doing a quick and dirty zoom using the following: if (mIsZoomed) { canvas.translate(-mCenter.x * (mZoomScale - 1), 20); canvas.scale(mZoomScale, mZoomScale); } It shifts my image with the translate and zooms in with the scale. I set mIsZoomed by: @Override public boolean onTouchEvent(MotionEvent event) { mIsZoomed = !mIsZoomed; return super.onTouchEvent(event); } which responds to the screen being touched. Rud http://mysticlakesoftware.blogspot.com/ On Jul 14, 12:20 am, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] EditText causes background to resize
Hi, I'm experimenting a problem while editing text through an EditText view. Here is my layout: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/background EditText android:layout_with=fill_parent android:layout_height=wrap_content / /LinearLayout The background is 320x455px, the application runs in portrait mode. When clicking on the EditText view, the virtual keyboard gets visible, thus causing the background to be resized... I don't want the background to be resized. I can't even understand this behaviour: keyboard should simply comes over the application without modifying it? Any guess? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 causes background to resize
Vince wrote: Hi, I'm experimenting a problem while editing text through an EditText view. Here is my layout: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/background EditText android:layout_with=fill_parent android:layout_height=wrap_content / /LinearLayout The background is 320x455px, the application runs in portrait mode. When clicking on the EditText view, the virtual keyboard gets visible, thus causing the background to be resized... I don't want the background to be resized. I can't even understand this behaviour: keyboard should simply comes over the application without modifying it? Any guess? Do you happen to specify adjustResize for this activity? http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html The pan-and-scan default, AFAIK, should not resize your background, but adjustResize might. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010: http://bignerdranch.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: Problems drawing a SurfaceView
Add the following line to your GameView constructor: setWillNotDraw(false); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 20, 7:28 am, klirr haskell...@gmail.com wrote: This just makes the screen black, why? I don't understand how to force the draw of the SurfaceView. package com.android.WWS; import android.app.Activity; import android.content.Context; import android.graphics.*; import android.os.Bundle; import android.view.SurfaceView; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; public class WWS extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new GameView(this)); } private static class GameView extends SurfaceView implements OnKeyListener { private Paint mPaint = new Paint(); private int x; private int y; public GameView(Context context) { super(context); x = 135; y = 303; setFocusable(true); requestFocus(); } @Override public void onDraw(Canvas canvas) { Paint paint = mPaint; canvas.translate(10, 10); canvas.drawColor(Color.rgb(184,134,11)); paint.setColor(Color.rgb(107,142,35)); paint.setStrokeWidth(1); canvas.drawRect(x, y, x+30, y+7, paint); canvas.drawRect(x+10, y+7, x+20, y+27, paint); canvas.drawRect(x+5, y+27, x+25, y+32, paint); } public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { y -= 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { x -= 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { y += 3; } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { x += 3; } return true; } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?
In your main activity, you have to write something like BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Log.v(TAG, onReceive()); } }; @Override protected void onResume() { super.onResume(); IntentFilter filter = new IntentFilter (Intent.ACTION_SCREEN_ON); registerReceiver(mReceiver, filter); } @Override protected void onPause() { super.onPause(); unregisterReceiver(mReceiver); } Peli www.openintents.org On Jul 20, 5:33 pm, jiaoni jiaoni5...@gmail.com wrote: I tried this in my activity, but still cannot receive event: MessageReceiver receiver = new MessageReceiver(); IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON); registerReceiver(receiver, filter); I feel frustrated and don't know why... On Jul 20, 9:58 pm, JP joachim.pfeif...@gmail.com wrote: I've double checked my code and found I'm doing this slightly differently, although the method above should also work. Strike Register broadcast receiver in the manifest - this seems to be meerly a declaration of the receiver. No intent filters; I check the specific event types _ON/_OFF in the receiver's onReceive() method. The key: I register the BroadcastReceiver manually, using Context.registerReceiver(BroadcastReceiver receiver, IntentFilter filter) On Jul 19, 8:22 pm, jiaoni jiaoni5...@gmail.com wrote: Thanks, JP. I have added following lines in AndroidManifest.xml, but still cannot receive any message in my BroadcastReceiver's onReceive() method. Is there anything I did wrong, or may I need some permission to receiveSCREEN_ON/SCREEN_OFF message? Please help. receiver android:name=.MessageReceiver android:process=:remote intent-filter action android:name=android.intent.action.SCREEN_ON/action action android:name=android.intent.action.SCREEN_OFF/action /intent-filter /receiver On Jul 18, 7:02 am, JP joachim.pfeif...@gmail.com wrote: 1. You need to create a subclass of BroadcastReceiver, override onReceive(Context context, Intent intent). In onReceive(), extract action from intent and catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF 2. Next you need to register the BroadcastReceiver in AndroidManifest.xml On Jul 17, 12:02 am, jiaoni jiaoni5...@gmail.com wrote: How can I catchSCREEN_ON/SCREEN_OFF broadcasts? I have tried for hours, but failed. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 causes background to resize
Hi Mark, Thank you for your quick reply (and by the way, I bought your book, it has been a very good help). I haven't deal with IME yet. Thus, I believe I didn't happen to specify adjustResize (did I?) as I ignored this property :-). I should therefore get the pan-and-scan default... which is not the case. Anyway, I should have a closer look at IME. Another clue might be the use of my LinearLayout as a ViewStub loaded from a FrameLayout which in turn is used through the merge tag? I'm probably making mistakes. If you have any piece of sample code to provide, you'll be welcome :-) Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 causes background to resize
Vince wrote: Thank you for your quick reply (and by the way, I bought your book, it has been a very good help). Glad you like it! I haven't deal with IME yet. Thus, I believe I didn't happen to specify adjustResize (did I?) as I ignored this property :-). I should therefore get the pan-and-scan default... which is not the case. Anyway, I should have a closer look at IME. It's possible the default changed, or something, so you might try specifically tinkering with those activity-level IME settings. Another clue might be the use of my LinearLayout as a ViewStub loaded from a FrameLayout which in turn is used through the merge tag? It's conceivable you're tripping over a bug due to that combination of things. The only way to prove that, though, would be to create a separate project that replicated the UI, minus the stub/merge stuff, and see what happens. On the plus side, if you can demonstrate in a separate project that the stub and/or merge is causing your difficulty, it'll be a great sample to upload to http://b.android.com. Another thing to do is to fire up hierarchyviewer when you have the IME open and check the sizes of things, notably that LinearLayout with the now-shrunken background, to see if that gives you any clues. If you specifically state that you want pan-and-scan, but the LinearLayout is definitely getting resized, that would be more evidence (IMHO) of an Android bug. I'm probably making mistakes. If you have any piece of sample code to provide, you'll be welcome :-) There's an IME sample or two in the source code for Version 2.1 of my original Android book: http://commonsware.com/Android/ (click Sample Code, look for an InputMethod directory in the ZIP file). At least one of them demonstrates resize versus pan-and-scan. For me, pan-and-scan was the default. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010: http://bignerdranch.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: Closing virtual keyboard from code
http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard On 13 Jun., 03:29, Dianne Hackborn hack...@android.com wrote: Look at InputMethodService. On Fri, Jun 12, 2009 at 6:00 AM, avgee strub...@googlemail.com wrote: Unfortunately stuff like android keyboard close didn't bring up any solutions for closing the virtual keyboard by code. Can someone perhaps help me? -- 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: Closing virtual keyboard from code
http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard On 12 Jun., 15:00, avgee strub...@googlemail.com wrote: Unfortunately stuff like android keyboard close didn't bring up any solutions for closing the virtual keyboard by code. Can someone perhaps help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Closing virtual keyboard from code
http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard On 12 Jun., 15:00, avgee strub...@googlemail.com wrote: Unfortunately stuff like android keyboard close didn't bring up any solutions for closing the virtual keyboard by code. Can someone perhaps help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Closing virtual keyboard from code
http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard On 12 Jun., 15:00, avgee strub...@googlemail.com wrote: Unfortunately stuff like android keyboard close didn't bring up any solutions for closing the virtual keyboard by code. Can someone perhaps help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to close the Soft Keyboard?
http://stackoverflow.com/questions/1109022/how-to-close-hide-the-android-soft-keyboard On 2 Jul., 17:58, DonB donberry...@gmail.com wrote: Did anyone get this resolved? I have the same issue. Don On Jun 6, 9:29 am, Bram bdekrui...@gmail.com wrote: Sorry, no anwser. I have the same question. Did you get this sorted out? In my use-case I clear the focus from an EditText and thus want the keyboard gone too.. myPageEditText.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { if(myPageEditText.getText().length() == 3){ myPageEditText.clearFocus(); // How to close thesoftkeyboard? } } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void onTextChanged(CharSequence s, int start, int before, int count) { } }); regards, Bram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] about mediacontroller question
hi all, i have a mediacontroller, i have some questions: 1. the mediacontroller can't update the progressive bar 2. when i enter in the program,it will play my music but the mediacontroller can't into play mode simultaneously 3. if i want to implement prev/next function,how can i write for this function,i just know must to setup the mediacontroller.setPrevNextListeners (View.OnClickListener next, View.OnClickListener prev),but don't know how to use it. can somebody give me some advise? thanks! my code of mediacontroller is bellow: === /* MediaPlayerControl */ private MediaController.MediaPlayerControl player_interface=new MediaController.MediaPlayerControl() { public int getBufferPercentage() { return buffer_percent; } public int getCurrentPosition() { return mMediaPlayer1.getCurrentPosition(); } public int getDuration() { return mMediaPlayer1.getDuration(); } public boolean isPlaying() { return PlayState; } public void pause() { if(mMediaPlayer1!=null) { mMediaPlayer1.pause(); } PlayState=false; } public void seekTo(int pos) { if(mMediaPlayer1!=null) { mMediaPlayer1.seekTo(pos); } } public void start() { if(mMediaPlayer1!=null) { mMediaPlayer1.start(); } PlayState=true; } }; /* end of MediaPlayerControl */ == --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 redirect users to Amazon MP3 Store?
I searched around but found no info on how Shazam works with Amazon MP3 Store. I would like to allow user to click on my mp3 titles and redirect this users to Amazon MP3 Store and make a revenue of clicks or purchases... Does someone have a link with information about this? Is it even possible? Thanks! Moto! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 causes background to resize
Mark, While you were writting this huge (but very interesting post!), I simply add android:windowSoftInputMode=adjustPan in my Manifest and it does the trick. Seems a little weird as it is supposed to be the default one, but it is also highly recommended that you always specify one or the other, which I did :-) And, from now, I should always do that before adding any EditText. As an exercice, I removed the merge/stub stuck without adding the key line in the Manifest but the behaviour remained, obviously, the same. Thanks again for your time. Always good to read 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: Saving Dialog state - onStop not getting called?
I still can't seem to get this to work - I may have to replace Dialog with Activity and set the style to dialog, at least an Activity onPause () seems to get called ok on rotation - am I missing something with Dialog::onStop() though? Thanks On Jul 14, 3:56 pm, Mark mar...@gmail.com wrote: I just double-checked this - if I call dismiss() on the Dialog, then onStop() is called. If I just change the orientation of the device, the dialog is still destroyed, but onStop() is not called. On Jul 14, 3:52 pm, Mark Wyszomierski mar...@gmail.com wrote: Hi, I'm saving the state of my activities for orientation change support, it works well. Sometimes I have a dialog open though and need to save its state as well. My dialog's onStop() method doesn't seem to get called when I change orientation. Where would get notified inside the Dialog that we're being destroyed, so I can save its state? 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] how to extract RAW HTML using WebView
m8 wrote: Is there a way to get the RAW HTML using the WebView? Not that I am aware of. you could ask WebView for its current URL and then submit a request for that resource yourself. but this isn't guaranteed to work reliably. -- jason.software.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: SDK 1.5_r3 is available
test test On Jul 18, 11:13 am, f_heft delphik...@gmail.com wrote: Okay, so now I installed the usb_driver from the SDK R3 (which worked well after some messing around with Windows 7). But neither 'adb devices' nor DDMS recognize the Galaxy. Did I miss sth? On 18 Jul., 00:55, dan raaka danra...@gmail.com wrote: nothing magical .. added vendor ids .. // Samsung's USB Vendor ID #define VENDOR_ID_SAMSUNG 0x04e8http://android.git.kernel.org/?p=platform/system/core.git;a=blob_plai... can see a moto ID tooo :O that is good fodder for engadet folks :D -Dan On Fri, Jul 17, 2009 at 3:21 PM, f_heft delphik...@gmail.com wrote: After it seems like you figured it out: is there anything special to consider? I'm downloading it at the moment (thanks for your hint in the other thread) and will try it tomorrow ... On 17 Jul., 23:30, dan raaka danra...@gmail.com wrote: So what are the steps to use this SDK and adb into Samsung Galaxy -Dan On Fri, Jul 17, 2009 at 10:35 AM, Dan Morrill morri...@google.com wrote: Hi, all! I wanted to let you know that a new SDK has been released: 1.5_r3 is now available. This is a minor release, and includes a Japanese IME and fixes for a few bugs, including a permissions issue. You can read more about the permissions issue here: http://www.ocert.org/advisories/ocert-2009-011.htmlYoucan download the SDK here:http://developer.android.com/sdk/1.5_r3/index.htmlandfind the release notes here: http://developer.android.com/sdk/RELEASENOTES.html#1.5_r3 Happy coding! - Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: ant and eclipse builds don't play nice
I know I'm resurrecting an old thread, but I'm having the same problem. I don't know anyone that uses the same type of build for development, testing and release. I usually develop in Eclipse and have Ant targets that build a project for release without test cases, resources and libraries. If I don't build from Ant, how can I be sure that my release APK doesn't include my test instrumentation and extra garbage? Thank you, Connor On May 26, 11:36 pm, Raphael r...@android.com wrote: On Tue, May 26, 2009 at 6:26 PM, Craig supkic...@gmail.com wrote: On May 26, 9:49 pm, Zero zeroo...@googlemail.com wrote: from my experience, eclipse never used the build.xml for it's internal builds - how did you do that ? The eclipse build doesn't use build.xml at all, but due to the fact that build.xml is in the eclipse project (because it is in the same directory as AndroidManifest.xml) eclipse tries to build it or at least parse it and check for errors. build.xml can't be parsed by eclipse (even though it is a valid file according to ant) and thus the android builder refuses to launch the project at all. This seems wrong to me. No it doesn't do that. Would you have the Ant view open by any chance? Don't build from the ant view if you build using Eclipse. R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Cannot reply to this group
This is off topic and not relevant to Android. I don't know why but i can't reply any topic here in this android-developer group . Does anyone have the same problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Determine Google Street View Availability
Hi, I have an application that is loading the street view application at a given latitude and longitude. I was wondering if anyone knows a way of determining if a streetview is available at a specific location, so that instead of loading the streetview and trying to download a view somewhere where it is unavailable, ultimately throwing an error, I can display a message instead. The maps application can do it but I can't seem to find a way using the android api, maps api or any of the intent uri's. Anyone have any thoughts? Thanks in advance, Dan (Apologies if this posts twice, the message I sent yesterday has not shown up yet) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Start as a Game developer
Hey, I've been making game for about 3-4 years on windows(started when I was 10) using C/C++, but I just got a G1 and I wanted to start developing apps for it, but I have no clue where to start. I read the documentation and I already setup everything and I've run the hello world application on the emulator and everything. Now my only problem is that I dont know how to use it :( I really want to start developing applications on android, but I'm completely clueless, so can anyone give me a link or something to a tutorial to get started? Not a tutorial on getting started on game development on android, but a tutorial on getting started with game PROGRAMMING on android. btw I just learned the basics of java in order to do this. If its possible to make apps with C/C++ on android I would preffer it since I have more experience in it and well, its significantly faster than java. but if its too complicated, I'll just stick to learning more java :\ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 modify the power manager code
Dear All: Would you please give me some tips to disable the Android enter into sleep state? If so, it will be very available for me to debug it If any tips will be great 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] Re: how to use adb tool on SAMSUNG GALAXY?
In the release notes of SDK r3 there is: The android tool provides a new command that scans SDK add-ons for their USB Vendor IDs and makes them available to adb (OS X and Linux versions of the SDK only). The command is android update adb . So under Linux, do i have to wait for Samsung to release this add-on or i can write this add-on by myself? On Jul 17, 11:58 pm, dan raaka danra...@gmail.com wrote: adb in SDK r3 plays nice with Samsung Galaxy. -Dan On Thu, Jul 16, 2009 at 9:13 AM, dan raaka danra...@gmail.com wrote: in the short run, samsung may host the compatible adb on their site -Dan On Wed, Jul 15, 2009 at 7:38 AM, Kitagua m.wuerth...@googlemail.comwrote: That are quite good news. I always have the Samsung Galaxy phone and planned to do some development using it. I really hope it will not take too long to get this SDK update. On 14 Jul., 18:11, David Turner di...@android.com wrote: You need a different version of ADB to access this phone at the moment. A future release of the SDK will provide an ADB binary that should be able to do that, but this is not available yet as far as I know. You're quite on the bleeding edge, aren't you ;-) On Tue, Jul 14, 2009 at 6:05 PM, legerb drim...@gmail.com wrote: Hey, I just got this device too. Trying to figure out how to debug on device too. According this http://groups.google.com/group/android-beginners/browse_thread/thread. .. Samsung have their own adb. Please update the thread if you've got any progress :) thanks ahead! On Jul 11, 10:54 pm, da yang daboil...@googlemail.com wrote: Hi i got this new mobilephone this week in Germany, wanted to debug my program on the device. but it doesn't work, c:\adbdevices lists no device attached, though i have tried to change the android_usb.inf in order to install the usb driver from SDK. i added some entries as follows: under [Google.NTx86] ; HTC DREAM ... ; SAMSUNGGALAXY %USB\VID_04E8PID_6640. DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 %USB\VID_04E8PID_6640MI_01.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640MI_01 %USB\VID_04E8PID_6640.DeviceDescRelease%=androidusb.Dev, USB \VID_04E8PID_6640 and [Strings]: USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXY USB\VID_04E8PID_6640MI_01.DeviceDescRelease=SAMSUNGGALAXY CompositeADBInterface USB\VID_04E8PID_6640.DeviceDescRelease=SAMSUNGGALAXYBootloader i got only one VID and one PID through USBVIEW, though for HTC DREAM there are different PIDs used. Theadbinterface got installed, butadbjust didn't work. later i also tried to use the device under linux, set up the device as in Dev guide: If you're developing on Ubuntu Linux, you need to add a rules file: 1. Login as root and create this file: /etc/udev/rules.d/51- android.rules. For Gusty/Hardy, edit the file to read: SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 For Dapper, edit the file to read: SUBSYSTEM==usb_device, SYSFS{idVendor}==0bb4, MODE=0666 2. Now execute: chmod a+rx /etc/udev/rules.d/51-android.rules adbdevices listed nothing as well. : ( open a terminal on the device, with ps, i guess theadbdaemon adbd is running. but theadbtool just doesn't work. Can someone help me? thanks da --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] AsyncTask error handling
Hi! AsyncTask turned to be a good solution for dealing with GUI and I tried to use it instead of own implementation. The problem I met is that it isn't designed for an error handling. Imagine network activity - there easily can be a connection or timeout error and previously I tried to report user not only result but consequence also. I looked on the Shelves application - it isn't supposed to say anything except importing finished with error or something like this and this statement is based on the null in the return statement. I see couple of ways to implement this - the easiest is to use kind of holder for storing business result or an error. Another - may be to extend AsyncTask to handle exceptions and to add method like onFailure (Object o, Throwable t). Could you please comment these approaches. Is it right solution from your point of view? Best regards, Dmitriy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] loading images to page been loaded with loadData
I use httpclient to get html pages then loading to web view. I need to intercept the images and loaded to the page the same wy using httpclient. how I do that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: IMAGE_CAPTURE Intent never returns to onActivityResult(int, int, Intent);
The method that takes care of the capture only returns correctly (using the finnish() method, I think) if the picture can be saved correctly in the file specified by that URI. If there's an exception (such as an IO exception) it will be captured and nothing will be done, so you'll never know. I believe that 'myTestFile' is a file that can only be read/written within your own application and that's why image_capture can't write to it. On Jun 26, 11:21 pm, hap 497 hap...@gmail.com wrote: Hi, I start an IMAGE_CAPTURE Intent like this, and my activity's onActivityResult() get called: Intent i = new Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null); i.putExtra(return-data, true); startActivityForResult(i, PICK_ICON_FROM_CAMERA_ID); But, if I start my Intent like this, the Capture Image Intent did get called, but my activity's onActivityResult() never get called: Intent i = new Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE, null); i.putExtra(MediaStore.EXTRA_OUTPUT, Uri.parse(file:/ + MyTestFile)); i.putExtra(outputFormat, Bitmap.CompressFormat.PNG.name()); startActivityForResult(i, PICK_ICON_FROM_CAMERA_ID); Can you please tell me how to get the 2nd case to work? 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] Building for dev, test and release
Normally, when I develop an application, I develop in Eclipse. I test in both Eclipse and Ant. Then, I use Ant to package the application for release, excluding test classes, test libraries and test resources. I created a build.xml in my Android Eclipse project, though, and got a project error because of the strange android_rules.xml setup. After much searching, I found this explanation. That's kind of an unexpected workflow. The idea is that either you go the full way in Eclipse or you use Ant/DDMS. Trying to combine both is a recipe for confusion :-) I'm not sure to what confusion the author was referring. I've always used both Eclipse and Ant together. Eclipse even has an Ant view specifically designed to run Ant tasks in a build.xml. It would be great to use only Eclipse, but how can I fine tune my release build to be sure that my APK doesn't include my test cases, libraries, resources and, maybe most importantly, instrumentation? Thanks in advance, Connor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 new javascript function to webit in android
I'd like to add new javascript function to webkit in android, What do you think I should do? Is there a kind of interface like xpcom in gecko? If we use gecko based browser (like firefox), we can write some xpcom component to extent browser's javascript function. I've found some example in cupcake source, about netscape plugin inteface. But, it doesn't look like what I'm looking for. Please let me know If someone know about 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] Forcing an activity to reload completely?
Hi I have an application, where I need to change the language through a settings menu. Now this part works perfectly, but it doesn't change the language for activities that have gone through onCreate. I got a TabHost, and 2 tabs in it, from the tabs you can get to settings. Refreshing the TabHost isn't an issue, as it's fairly small, however both the 2 tabs are quite large views, and having a function to manually update all the strings seem unnecessarily difficult. Is there any way to force the activity to recreate itself and trigger a new onCreate? I tried having a static function in the tabhost that clears all tabs and recreates them, this refreshes the tab titles, but not the content in the tabs. Anders Aagaard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 **** has stopped unexpectedly, please try again!!!
I write a application follow the code from http:// developer.android.com/guide/tutorials/views/hello-linearlayout.html. when I run the code, the message the application has stopped unexpectedly display on the emulator. debug the application, find the error and warning message below: WARNING: 07-18 08:11:40.937: ERROR/vold(550): Error opening switch name path '/ sys/class/switch/test2' (No such file or directory) 07-18 08:11:40.937: ERROR/vold(550): Error bootstrapping switch '/sys/ class/switch/test2' (m) 07-18 08:11:40.937: ERROR/vold(550): Error opening switch name path '/ sys/class/switch/test' (No such file or directory) 07-18 08:11:40.937: ERROR/vold(550): Error bootstrapping switch '/sys/ class/switch/test' (m) 07-18 08:11:40.968: ERROR/flash_image(556): can't find recovery partition 07-18 08:11:54.228: ERROR/MemoryHeapBase(583): error opening /dev/ pmem: No such file or directory 07-18 08:11:54.228: ERROR/SurfaceFlinger(583): Couldn't open /sys/ power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 07-18 08:11:54.268: ERROR/GLLogger(583): couldn't load libhgl.so library (Cannot find library) 07-18 08:11:54.307: WARN/HAL(583): load: module=/system/lib/hw/ copybit.goldfish.so error=Cannot find library 07-18 08:11:54.307: WARN/HAL(583): load: module=/system/lib/hw/ copybit.default.so error=Cannot find library 07-18 08:11:54.307: WARN/SurfaceFlinger(583): ro.sf.lcd_density not defined, using 160 dpi by default. 07-18 08:11:54.328: WARN/HAL(583): load: module=/system/lib/hw/ copybit.goldfish.so error=Cannot find library 07-18 08:11:54.337: WARN/HAL(583): load: module=/system/lib/hw/ copybit.default.so error=Cannot find library 07-18 08:11:54.337: WARN/HAL(583): load: module=/system/lib/hw/ overlay.goldfish.so error=Cannot find library 07-18 08:11:54.337: WARN/HAL(583): load: module=/system/lib/hw/ overlay.default.so error=Cannot find library 07-18 08:11:54.417: ERROR/GLLogger(583): couldn't load libhgl.so library (Cannot find library) 07-18 08:11:56.897: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.providers.contacts 07-18 08:11:56.897: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.cp in package com.android.providers.contacts 07-18 08:11:56.907: WARN/PackageManager(583): Unknown permission com.google.android.providers.gmail.permission.WRITE_GMAIL in package com.android.settings 07-18 08:11:56.907: WARN/PackageManager(583): Unknown permission com.google.android.providers.gmail.permission.READ_GMAIL in package com.android.settings 07-18 08:11:56.916: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.settings 07-18 08:11:56.916: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.development 07-18 08:11:56.929: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES in package com.android.development 07-18 08:11:56.929: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser in package com.android.development 07-18 08:11:56.929: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD in package com.android.development 07-18 08:11:56.938: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.browser 07-18 08:11:56.948: WARN/PackageManager(583): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.mail in package com.android.contacts 07-18 08:11:57.327: WARN/ActivityManager(583): Unable to start service Intent { action=android.accounts.IAccountsService comp= {com.google.android.googleapps/ com.google.android.googleapps.GoogleLoginService} }: not found 07-18 08:11:57.338: WARN/AccountMonitor(583): Couldn't connect to Intent { action=android.accounts.IAccountsService comp= {com.google.android.googleapps/ com.google.android.googleapps.GoogleLoginService} } (Missing service?) 07-18 08:11:57.397: ERROR/BatteryService(583): Could not open '/sys/ class/power_supply/usb/online' 07-18 08:11:57.407: ERROR/BatteryService(583): Could not open '/sys/ class/power_supply/battery/batt_vol' 07-18 08:11:57.407: ERROR/BatteryService(583): Could not open '/sys/ class/power_supply/battery/batt_temp' 07-18 08:11:57.817: ERROR/EventHub(583): could not get driver version for /dev/input/mouse0, Not a typewriter 07-18 08:11:57.847: ERROR/EventHub(583): could not get driver version for /dev/input/mice, Not a typewriter 07-18 08:11:57.937: ERROR/System(583): Failure starting core service 07-18 08:11:57.937: ERROR/System(583): java.lang.SecurityException 07-18 08:11:57.937: ERROR/System(583): at android.os.BinderProxy.transact(Native Method) 07-18 08:11:57.937: ERROR/System(583): at
[android-developers] Determine Google Street View Availability
Hi, I have an application that is loading the street view application at a given latitude and longitude. I was wondering if anyone knows a way of determining if a streetview is available at a specific location, so that instead of loading the streetview and trying to download a view somewhere where it is unavailable, ultimately throwing an error, I can display a message instead. The maps application can do it but I can't seem to find a way using the android api, maps api or any of the intent uri's. Anyone have any thoughts? Thanks in advance, Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Fast, efficient usage of an object pool
It is buried in the View class... I used the grep tool on the git site to find it... http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/View.java#l7883 On Jul 18, 4:38 am, Fred Grott(shareme) fred.gr...@gmail.com wrote: Romain, was it renamed cannot find it by your link.. On Jul 15, 3:55 pm, Romain Guy romain...@google.com wrote: We have an efficient implementation for you: use thePools.java file fromhttp://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;... (and the associated classes.) These are not public APIs so just copy the code in your application. Here's an example of a Poolable object with this API: static class InvalidateInfo implements PoolableInvalidateInfo { private static final int POOL_LIMIT = 10; private static final PoolInvalidateInfo sPool =Pools.synchronizedPool( Pools.finitePool(new PoolableManagerInvalidateInfo() { public InvalidateInfo newInstance() { return new InvalidateInfo(); } public void onAcquired(InvalidateInfo element) { } public void onReleased(InvalidateInfo element) { } }, POOL_LIMIT) ); private InvalidateInfo mNext; public void setNextPoolable(InvalidateInfo element) { mNext = element; } public InvalidateInfo getNextPoolable() { return mNext; } static InvalidateInfo acquire() { return sPool.acquire(); } void release() { sPool.release(this); } } On Wed, Jul 15, 2009 at 1:48 PM, Brad Larsonbklar...@gmail.com wrote: At Google I/O and in the forums, it has been clear that if you need optimal performance, you must avoid memory allocation inside tight loops. I'm curious about the best way to handle this in my use-case, which I think must be fairly common. I need to access at most n objects of type MyObject, I need to iterate over them during every screen refresh, and I need to remove them and put them back in the object pool randomly. The object pool seems pretty straight-forward, just use a VectorMyObject(n), add n copies of MyObject at bootup, and add/ remove from the end to avoid any memcpy or allocation. The iterating is a little more difficult. I can use for(MyObject m : myObjects), but this will allocate memory to create the iterator. I could create a static final Iterator at bootup, but there is no good way to get back to the start of the List. For now, I'm using another Vector for active MyObjects, and a for loop with an int to get() the objects and avoid allocating an iterator. get() runs in constant time for a Vector, so this works well. However, when an object is done, I need to remove it and send it back to the pool. If I use Vector.remove(i), it has to memcpy everything after i. I could use an Iterator on a LinkedList, which can remove() in constant time, but I don't think there is a good way to get the Iterator back to the start of the list without allocating memory. I could use an int to loop through a LinkedList, but LinkedList.get(n) runs in O(n) time. Any tips on the optimal way to solve this? Worst-case, I assume the memcpy called during Vector.remove() is a better bet over allocating an Iterator inside my app loop, correct? Thanks! Brad -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android - playing list of mp3s from browser
Hi Team, I recently started development on Android. I can play simple mp3 files from any server using the browser. I wanted to know how i can play a list of mp3 files one after the other from the browser. I tried creating a url like http://www.mysite.com/play.m3u that contains mp3 links but the Android Media Player did not play any of those songs. I would really appreciate if you can please tell me if there is a way to play a list of mp3 files from my server by invoking the media player from the browser. Looking forward to hearing soon. Thanks, Snehal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: SDK 1.5_r3 is available
i still can not figure out how to use the source file. Can you give me more details? On Jul 18, 4:07 am, dan raaka danra...@gmail.com wrote: as in dogfood ? -Dan On Fri, Jul 17, 2009 at 4:27 PM, MrChaz mrchazmob...@googlemail.com wrote: fyi, this just got pushed to my phone On Jul 17, 6:35 pm, Dan Morrill morri...@google.com wrote: Hi, all! I wanted to let you know that a new SDK has been released: 1.5_r3 is now available. This is a minor release, and includes a Japanese IME and fixes for a few bugs, including a permissions issue. You can read more about the permissions issue here: http://www.ocert.org/advisories/ocert-2009-011.htmlYoucan download the SDK here:http://developer.android.com/sdk/1.5_r3/index.htmlandfind the release notes here:http://developer.android.com/sdk/RELEASENOTES.html#1.5_r3 Happy coding! - Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: SDK 1.5_r3 is available
did you build sdk again from source or you can use it out of the box? On Jul 18, 12:55 am, dan raaka danra...@gmail.com wrote: nothing magical .. added vendor ids .. // Samsung's USB Vendor ID #define VENDOR_ID_SAMSUNG 0x04e8http://android.git.kernel.org/?p=platform/system/core.git;a=blob_plai... can see a moto ID tooo :O that is good fodder for engadet folks :D -Dan On Fri, Jul 17, 2009 at 3:21 PM, f_heft delphik...@gmail.com wrote: After it seems like you figured it out: is there anything special to consider? I'm downloading it at the moment (thanks for your hint in the other thread) and will try it tomorrow ... On 17 Jul., 23:30, dan raaka danra...@gmail.com wrote: So what are the steps to use this SDK and adb into Samsung Galaxy -Dan On Fri, Jul 17, 2009 at 10:35 AM, Dan Morrill morri...@google.com wrote: Hi, all! I wanted to let you know that a new SDK has been released: 1.5_r3 is now available. This is a minor release, and includes a Japanese IME and fixes for a few bugs, including a permissions issue. You can read more about the permissions issue here: http://www.ocert.org/advisories/ocert-2009-011.htmlYou can download the SDK here:http://developer.android.com/sdk/1.5_r3/index.htmlandfind the release notes here: http://developer.android.com/sdk/RELEASENOTES.html#1.5_r3 Happy coding! - Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 power off the screen?
Hi, I'm looking for a way to power off the device screen from my program. I see that PowerManager is only for system apps, and I can't find other ways. Can you help me? thanks, Yuri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 use adb tool on SAMSUNG GALAXY?
Hi, on my device the build number is 76XXCSDCBALUM6375. It won't be found by adb, neither on Windows nor on Linux. Regards, Felix On Jul 18, 8:50 pm, dan raaka danra...@gmail.com wrote: can you post what you see in the settings-about .. about the build info you have .. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Getting the frequency of gps signals
Hey, i already know the frequency for the carrier signal and all the technology around gps. The question i have: Is it somehow possible to get the received frequency of the signal? I am asking, because i want to derive some functions from doppler navigation for which i need the received frequency of the gps signal, in order to compare it with the carrier frequency. I know, that this is very hardware related, are there any possibilities to grab the information i want to? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Power off the screen
Hi, I'm looking for a way to power off the device screen. I found the PowerManager class, but I see it can be used only by system apps. Is there some other way to achieve this? thanks, Yuri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Can you use SensorListener in SDK 1.5_r3 ?
I have used SensorListener for 1.5sdk demo Sensors.java, but there was no error when I compile it. Does it work on real machine? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Strange bug found when subtracting a float from another float, or a double from another double
Try this: Double mChange = Double.parseDouble(7.1) - Double.parseDouble (7.15); Float mChange = Float.parseFloat(7.1) - Float.parseFloat(7.15); mChange should be -0,05 in both cases, right? So why is mChangeD = -0.0519 ??? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Camera not work!
my code import java.io.IOException; import android.app.Activity; import android.content.Intent; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.net.Uri; import android.os.Handler; import android.os.Message; import android.os.Bundle; import android.provider.MediaStore.Images; import android.provider.MediaStore.Video; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.KeyEvent; import android.hardware.Camera; import android.util.Log; public class gtest extends Activity implements SurfaceHolder.Callback { private static final String TAG = CameraApiTest; Camera mCamera; boolean mPreviewRunning = false; public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TAG, onCreate); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); mSurfaceView = (SurfaceView)findViewById(R.id.surface); mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); mSurfaceHolder.setType (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, goto gallery); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Uri target = Uri.parse(content://media/external/ images/media); Intent intent = new Intent(Intent.ACTION_VIEW,target); startActivity(intent); return true; } }); return true; } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] data, Camera c) { Log.e(TAG, PICTURE CALLBACK: data.length = +data.length); mCamera.startPreview(); } }; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return super.onKeyDown(keyCode, event); } if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(null,null, mPictureCallback); return true; } return false; } protected void onResume() { Log.e(TAG, onResume); super.onResume(); } protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); } protected void onStop() { Log.e(TAG, onStop); super.onStop(); } public void surfaceCreated(SurfaceHolder holder) { Log.e(TAG, surfaceCreated); mCamera = Camera.open(); //mCamera.startPreview(); } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Log.e(TAG, surfaceChanged); // XXX stopPreview() will crash if preview is not running if (mPreviewRunning) { mCamera.stopPreview(); } Camera.Parameters p = mCamera.getParameters(); p.setPreviewSize(w, h); mCamera.setParameters(p); try { mCamera.setPreviewDisplay(holder); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } mCamera.startPreview(); mPreviewRunning = true; } public void surfaceDestroyed(SurfaceHolder holder) { Log.e(TAG, surfaceDestroyed); mCamera.stopPreview(); mPreviewRunning = false; mCamera.release(); } private SurfaceView mSurfaceView; private SurfaceHolder mSurfaceHolder; } Help please 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] HanDict -Google Dict Wiki
HanDict is a free online English Dictionary that gives you English definitions from Google Dictionary and Wikipedia for Android (Gphone). You can start to search from anywhere, there is no need to close your current reading window and back to home to launch other app, just quick launch Handict for the notification bar. while you are typing, Handict will give you spelling suggestion, you can select one of them without typing the entire word. HanDict include Google dictionary, Wikipedia. both of them are powerful free online dictionary. you can download it from android market, just search Handict or scan the following QR-Code more detail, please check this link: http://sites.google.com/a/mgeek.mobi/handict/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Add Contact not working
I am having the same issue. Hope it gets fix soon... On Jun 11, 2:45 pm, John Seghers jsegh...@cequint.com wrote: I followed the documentation to start the Show or Create Contact activity. Since my app asks the user if they want to add a contact, I don't want the activity asking this as well. Thus I used theEXTRA_FORCE_CREATEflag. If I do not use this flag, the code below works fine. It asks the user if they want to add the contact, brings up a selection list where they can choose an existing contact or create a new one, and then shows the add contacts UI. Intent intent = new Intent(); intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setData(Uri.fromParts(tel, 2065551234, null)); intent.putExtra(Contacts.Intents.EXTRA_FORCE_CREATE, true); // this is the problem line intent.putExtra(Contacts.Intents.Insert.NAME, Cequint); intent.putExtra(Contacts.Intents.Insert.NOTES, test); intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE, Contacts.PhonesColumns.TYPE_WORK); startActivity(intent); Using theEXTRA_FORCE_CREATEflag, the activity does not start and the logcat output shows that the intent forwarded by the ShowOrCreateActivity fails: 06-11 19:00:33.198: INFO/ActivityManager(583): Starting activity: Intent { action=com.android.contacts.action.SHOW_OR_CREATE_CONTACT categories={android.intent.category.DEFAULT} data=tel:2065551234 comp= {com.android.contacts/com.android.contacts.ShowOrCreateActivity} (has extras) } 06-11 19:00:33.369: INFO/ActivityManager(583): Starting activity: Intent { action=android.intent.action.INSERT type=vnd.android.cursor.dir/person comp={com.android.contacts/ com.android.contacts.EditContactActivity} (has extras) } 06-11 19:00:33.459: DEBUG/UserLaunch:(992): onRestart() 06-11 19:00:33.479: DEBUG/UserLaunch:(992): onStart() 06-11 19:00:33.709: ERROR/EditContactActivity(862): Cannot resolve intent: Intent { action=android.intent.action.INSERT type=vnd.android.cursor.dir/person comp={com.android.contacts/ com.android.contacts.EditContactActivity} (has extras) } Looking at the Contacts Manifest, I found that sending this Intent would take me directly to the add contacts UI, but will always create a new contact even if there is already one for that number: Intent intent = new Intent(Intent.ACTION_INSERT, People.CONTENT_URI); intent.putExtra(Contacts.Intents.Insert.PHONE, 2065551234); intent.putExtra(Contacts.Intents.Insert.NAME, Cequint); intent.putExtra(Contacts.Intents.Insert.NOTES, test); intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE, Contacts.PhonesColumns.TYPE_WORK); startActivity(intent); Am I doing something wrong with the first example? Or is there a bug in the Contacts app? This is with SDK 1.5 r2. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 -~--~~~~--~~--~--~---