[android-developers] Focus problem with Option menu
Hi, I've a problem with Option menu and focus. I've a simple View in which I've some data come from remote service. I've to display an icon of the option menu only sometimes when remote object has some characteristics. So I do this: @Override public boolean onCreateOptionsMenu(Menu menu) { return true; } @Overridepublic boolean onPrepareOptionsMenu(Menu menu) { if (corsa != null corsa.getDataPartenzaEffettiva() == null) { menu.clear(); getMenuInflater().inflate(R.menu.dettaglio_corsa, menu); } return true; } The first time I create an empty menu and then when I receive remote data (asyncCall) I call invalidateOptionsMenu(); so I display the option menu icon. All works fine but in this view I open programatically the keyboard: InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMethodManager != null) { inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); } the problem is that every time I press a key on the keyboard the icon of Option menu focus, and when I press enter the option menu is clickked. I don't want this, why the option menu is focused every time I press a key? 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Need to show a dialog on top of all other Apps for a custom hardware.
Hi, I need to show a dialog (more like a horizontal bar) on press of a custom Key (on my custom device powered by Android). This dialog should appear on top of any other application(say A) that might be running when the Key is pressed. The app A should keep on running and its UI should be visibile (i.e the app A: should not go to onPause()). It should work something similar to SystemUI's volume change dialog when Volume Hard Keys are pressed. I want to make minimum changes in framework. My understanding is that I need to make changes in PhoneWindowManager.java to handle the press of custom Key, which will then call my app residing in application layer, which will just inflate the dialog. Would this work? If so, is there a better way to implement it? If not, how can I implement this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: how to set a shortcut key to launch an activity ?
Hello shapnil, how are you? I am facing a problem to lunch an activity when the shortcut key is pressed like open a number pad press *123 will fire my application. any idea? thanks in Advance. On Wednesday, October 21, 2009 11:13:14 AM UTC+6, swapnil wrote: Hello, how to set a shortcut key to launch an activity ? Lets say I have an app TestApp. I want to set a shortcut key (e.g alt + T ) to launch activity of TestApp. Is there any way to set such shortcuts to android apps ? Thanks in advance. -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] 3D model importer / engine for Android / Android NDK for use with Vuforia - what do you use?
Hi, I'm scouting for a 3D model importer library. I'd like it to have support for COLLADA and FBX format. Our iOS team is using NinevehGL engine: http://nineveh.gl/ which is just perfect... but for iOS only. Do you know of something similar for Android? I want to add a quote from *Diney Bomfim*, the author of NinevehGL: If you choose a 3D engine, like PowerVR, SIO2, Oolong, UDK, Ogre and many others, you’ll be stuck inside their APIs and their implementation of OpenGL. If you choose a third party API just to load a 3D file, you will need to integrate the third party class to your own implementation of OpenGL. Another choice is to search a plugin to your 3D software to export your objects as a .h file. The .h is just a header file containing your 3D objects in the OpenGL array format. Unfortunately, until today I just saw 2 plugins to do this: One to Blender made with Phyton and another made with Pearl and both was horribles. I never seen plugins to Maya, 3DS Max, Cinema 4D, LightWave, XSI, ZBrush or Modo. *took from http://db-in.com/blog/2011/02/all-about-opengl-es-2-x-part-23/ * Which I think is true for Android too. iOS developers has the option to solve those issues by using NinevehGL. Do we have some option like that for Android? *My specific need* is a library that interact well with Vuforia - http://www.qualcomm.com/solutions/augmented-reality which is a library for Augmented reality using NDK and a C++ library. Vuforia examples show, via OpenGL, the camera and overlay upon it a very simple 3D model defined in .h files. I need something to keep all that and just change the model / underling database of features detections. My scouting results until now: - JOGL - https://jogamp.org/jogl/www/ - this is a Java library that just act as a bind to OpenGL®, OpenCL™, OpenAL and OpenMAX APIs inside Java - to my needs it's not that much of an help, I only need OpenGL to show a 3D model and this library doesn't provide a way to import one - nor has anything more then what I can already use with NDK - Min3D - http://code.google.com/p/min3d/ - this is a Java library to import OBJ, 3DS and D2D models, many guide talks about it but it seems pretty dead project, no commit since 2011 and it use a Scene object which somewhat collide with the way Vuforia use OpenGL - JPCT-AE http://www.jpct.net/jpct-ae/index.html - this is another java library which expose a very simple 3d engine and import for 3DS, OBJ, MD2, ASC which is horribly written (IMHO) for Android - Assimp (Open Asset Import Library) - http://assimp.sourceforge.net/ - this is a C/C++ library for importing almost any 3D model around (including COLLADA and FBX), it just provide methods to import the models and should work very well - but that's no version for Android even if some folks actually managed to use it with Android ( http://jazzyjester.wordpress.com/2013/02/02/test/) - Unity3D - http://unity3d.com/ - Very complete 3D crossplatform framework, in my company we already use it, too bad you can't integrate it very nicely with a native application that just use 3D with Vuforia in a fragment. My current effort is aimed at trying to integrate Assimp into a Vuforia Sample and I'll then write plain OpenGL commands to render it. I had to study NDK, C++, OpenGL all together and this is taking a while.[1] I hope you have other suggestions and that this discussion may prove helpful to others. Regards, Daniele Segato [1] Furthermore I'm encountering issues with the pre-compiled libassimp.so library provided at the link above by jazzyjester which apparently doesn't have the symbol for a aiScene de-constructor - and when I compile it own my own for some reason it say the target missmatch. But that's little off-topic right now -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] What is the use of services in Android?
I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashish.a...@gmail.com wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Augmented Reality frameworks - what your choice?
My recommendation is Justin Wetherell's augmented reality framework. You can get the source and demo apps for free from http://code.google.com/p/android-augment-reality-framework . I tried a bunch of different AR frameworks and samples with little success before Justin's. His is straight forward and well documented. - Dave On Wednesday, August 7, 2013 6:07:18 PM UTC-4, Nathan wrote: From your experience, what is the best option for an Augmented reality framework? If you have developed one or developed with one, please comment. There isn't a lack of options - just looking for feedback on which ones actually work. The largest list I could find on this topic is this: http://socialcompare.com/en/comparison/augmented-reality-sdks I probably need: - GPS and sensors use - Placement of markers, icons, and some vectors (lines or shapes) in the 3D world. - Should work without internet or data. Shouldn't be a problem since I am not counting on an online feed. - Non GPL. I may need ( in the dream future): - more complex 3d rendering with meshes and dynamically loaded textures. Nothing too major, just maybe like overlaying a Google Earth like image with the camera. ;) I probably don't need: - Data for the Points of Interest, I'll provide my own and they'll be small in number. - Computer Vision based reality. That eliminates quite a few. - Object manipulation - I don't need to design cities or anything like that. I'm looking for more of the viewfinder sort of thing. I prefer buy over build, I think because I don't want to start from scratch on working around the bugs on every single device. Of course, I don't want to buy and still have to fix all the bugs myself. So here are some I'm considering. - ARLab.com. As described on their website at least, it sounds like the ArBrowser - Wikitude. A bit more expensive, but possibly more established and mature. Since their sample app has a million downloads. - http://www.chupamobile.com/products/details/296/Augmented+Reality+Toolkit/. Probably made by a guy in his basement, but if it does work, it is only $20. Probably worth buying just to prototype something before going full scale. Can anyone comment? Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: What is the use of services in Android?
Google made a mistake by saying: A Servicehttp://developer.android.com/reference/android/app/Service.html is an application component that can perform long-running operations in the background, since it makes you assume that it actually does something in the background, which it doesn't. They should have written: A Servicehttp://developer.android.com/reference/android/app/Service.html is an application component that helps manage long-running operations. It's just a way to make your code neat and ordered (especially if IPC is needed) with the added benefit of managing some life cycle events for you and restarting failed tasks. On Thursday, August 8, 2013 2:40:02 PM UTC+3, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
On 08/08/2013 01:40 PM, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method |stopService(new Intent(getApplicationContext(), MyService.class));| does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? You've been already told by others that Services should be used to MANAGE separate thread(s). The important part is that while an application is used to interact with the user a Service has no UI and can run in background. And with background I don't necessary mean off-the-main-thread. I mean that they can run even if the application (activities) is not used at the time. Services have a simpler life cycle in respect to activities and they are not influenced or killed by the framework by changes in configurations. Furthermore the framework will kill activities before starting to kill services. And if the framework decide to kill your service you can specify what you want to do with the request you received (drop it, ask the framework to re-do it, etc...) Services are a main component of the system and it is good practice to, for example, use them to update underling data (better if using a SyncAdapter) and manage remote calls. regards, Daniele Segato -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: What is the use of services in Android?
For option 2, use an IntentSerrvice. Then you don't have to worry about calling 'stopService'. It does it for you when necessary. On Thursday, August 8, 2013 7:40:02 AM UTC-4, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Augmented Reality frameworks - what your choice?
On 08/08/2013 12:07 AM, Nathan wrote: From your experience, what is the best option for an Augmented reality framework? If you have developed one or developed with one, please comment. There isn't a lack of options - just looking for feedback on which ones actually work. The largest list I could find on this topic is this: http://socialcompare.com/en/comparison/augmented-reality-sdks I probably need: * GPS and sensors use * Placement of markers, icons, and some vectors (lines or shapes) in the 3D world. * Should work without internet or data. Shouldn't be a problem since I am not counting on an online feed. * Non GPL. I may need ( in the dream future): * more complex 3d rendering with meshes and dynamically loaded textures. Nothing too major, just maybe like overlaying a Google Earth like image with the camera. ;) I probably don't need: * Data for the Points of Interest, I'll provide my own and they'll be small in number. * Computer Vision based reality. That eliminates quite a few. * Object manipulation - I don't need to design cities or anything like that. I'm looking for more of the viewfinder sort of thing. I prefer buy over build, I think because I don't want to start from scratch on working around the bugs on every single device. Of course, I don't want to buy and still have to fix all the bugs myself. So here are some I'm considering. * ARLab.com. As described on their website at least, it sounds like the ArBrowser don't know anything about this, can't comment on it * Wikitude. A bit more expensive, but possibly more established and mature. Since their sample app has a million downloads. this one sucks in my opinion. It use a webview for an HTML5 app. HTML5 app sucks for many reasons. Performance is one of them. I would stay away from it. * http://www.chupamobile.com/products/details/296/Augmented+Reality+Toolkit/. Probably made by a guy in his basement, but if it does work, it is only $20. Probably worth buying just to prototype something before going full scale. As for ARLab, don't know, can't comment Reading seems like Metaio http://www.metaio.com/ is the most complete (cross platform) Augmented Reality framework. But you can't develop for it on Linux which makes no sense at all in my opinion. In my company we use Vuforia http://www.qualcomm.com/solutions/augmented-reality for natural features and markers tracking. It's unbelievably fast and reliable. We haven't much experience with it on Android yet (we are starting now on the platform) - but I personally tried the examples and it works pretty well, fail to run only on very old devices or low end devices, I also tried with a RAZR with x86 processor and it works... MIPS devices will not work. it doesn't provide a 3D engine tough (see my other post in this ml) so you'll have to find one on your own. Regards, Daniele Segato -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: buggy legacy options menu on Samsung S4
First of all, thanks for taking the time to build the demo app. It's frustrating that I'm no closer to figuring out why this is happening, but at least it doesn't seem to be an issue on *all* S4 devices. I wonder if the trait that triggers the behavior isn't hardware, but some configurable option that just happens to have one value on your phone and a different value on mine. I can't think of what it might be, though. When the options menu is in the bad state it's as if the taps aren't even registered by the device. I enabled Show Pointer Location from developer options, though, and I see visual feedback to indicate that taps are occurring inside the bounds of the menu items I'm attempting to select. On Thursday, August 8, 2013 5:19:54 AM UTC-5, gjs wrote: Hi, I downloaded, unzipped built you app in Eclipse from the source, without any alterations. It did run OK on my Samsung Galaxy S4 (Android V4.2.2). It did *not* exhibit the issues you originally mentioned, all menu items working ok with the text for each item showing up ok immediately for the various key combinations include selecting 'more' and pressing that hardware back button then pressing the original menu options, all was ok. I have attached a screenshot showing the device details used for this test. It's a 4G LTE 'international' version and is an 'unlocked' device, not rooted not from a carrier, it came out of Hong Kong, I am using it in Australia. Perhaps the issue is specific to some subset of these devices? Regards , On Wednesday, August 7, 2013 11:48:28 PM UTC+10, Jay Howard wrote: How frustrating. Though, I'm glad to know it works for someone else; it gives me some hope that a workaround can be found. Couple questions about the app that's working correctly: 1. What's the value of targetSdkVersion in your manifest? (Mine is 9). 2. What's the value of target in your project.properties file? (Mine is Google Inc.:Google APIs:14). 3. Do you use a default theme for your app? If so, which? (Mine is Theme.NoTitleBar). Is there any chance I could impose on you to build and run my demo app (OptionsMenu.zip shared on Google Drive) on your S4? The zip file contains a complete Eclipse project minus the bin and gen dirs, which are auto-generated. The app is trivial and does nothing but demonstrate the bad behavior. If possible, I'd like to determine whether this is an issue on all S4s or if the device I'm using is special in some way. On Wednesday, August 7, 2013 3:51:02 AM UTC-5, gjs wrote: Hi, I have a Samsung Galaxy S4 with Android 4.2.2 plus an app activities that have legacy option menus with more than six items, including more that uses onCreateOptionsMenu() as well as onPrepareOptionsMenu() and onOptionsItemSelected(). When I try to reproduce your steps I do *not* get the same issues you mention, all menu options work OK when using the key combinations you mention. The main difference I can see when looking at your code sample on SO, is that I do *not* use an inflator to inflate the menu items from a static xml file in onCreateOptionsMenu(). Instead I am creating the menu ( sub menu) items in java code dynamically at runtime, within onCreateOptionsMenu() also onPrepareOptionsMenu(), adding removing menu items to from the menu object 'by hand', the reason I'm doing this is that the menu items need to vary according to the current context of the activity, perhaps you could try the same see if that works ok on an S4. Another suggestion, instead of creating menu items dynamically at runtime in java code - which is probably not a recommended practice, is to try your inflator code within onPrepareOptionsMenu(), remembering to call menu.clear() before the inflator and see if that works any better. See for details http://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu) Good luck. On Wednesday, August 7, 2013 2:01:17 AM UTC+10, Jay Howard wrote: I'm seeing the following behavior (on a Samsung S4, but potentially also on other Samsung devices) in an app that uses a legacy options menu: 1. User taps hardware menu button to bring up options menu. There are more than six items in the menu. 2. User taps the bottom-right more button to access the overflow menu items. 3. User taps the hardware back button to return to the initial options menu. 4. User taps any combination of menu items, potentially multiple times each. Nothing happens. onOptionsItemSelected() is never called. 5. User taps the hardware back button to close the options menu. 6. User taps the hardware menu button to display the options menu again. At this point, onOptionsItemSelected() is called in quick succession for each menu item the user tapped when the menu was previously displayed. Can anyone advise? I've created a simple demo app to demonstrates the behavior along with a
[android-developers] Re: What is the use of services in Android?
Also, unlike a regular service, an IntentService does in fact run the task in the background. (one task at a time) On Thursday, August 8, 2013 4:05:07 PM UTC+3, Streets Of Boston wrote: For option 2, use an IntentSerrvice. Then you don't have to worry about calling 'stopService'. It does it for you when necessary. On Thursday, August 8, 2013 7:40:02 AM UTC-4, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: buggy legacy options menu on Samsung S4
Jay, I also downloaded your test and tried it... Had to make one change -- from Google APIs (14) to just Android 14, or it wouldn't install... The bug is there. Samsung Galaxy S4, 9505 International LTE version, comes from Germany, firmware 4.2.2 I9505XXUAMDE (different from what gjs's device has). -- K On Thursday, August 8, 2013 6:35:36 PM UTC+4, Jay Howard wrote: First of all, thanks for taking the time to build the demo app. It's frustrating that I'm no closer to figuring out why this is happening, but at least it doesn't seem to be an issue on *all* S4 devices. I wonder if the trait that triggers the behavior isn't hardware, but some configurable option that just happens to have one value on your phone and a different value on mine. I can't think of what it might be, though. When the options menu is in the bad state it's as if the taps aren't even registered by the device. I enabled Show Pointer Location from developer options, though, and I see visual feedback to indicate that taps are occurring inside the bounds of the menu items I'm attempting to select. On Thursday, August 8, 2013 5:19:54 AM UTC-5, gjs wrote: Hi, I downloaded, unzipped built you app in Eclipse from the source, without any alterations. It did run OK on my Samsung Galaxy S4 (Android V4.2.2). It did *not* exhibit the issues you originally mentioned, all menu items working ok with the text for each item showing up ok immediately for the various key combinations include selecting 'more' and pressing that hardware back button then pressing the original menu options, all was ok. I have attached a screenshot showing the device details used for this test. It's a 4G LTE 'international' version and is an 'unlocked' device, not rooted not from a carrier, it came out of Hong Kong, I am using it in Australia. Perhaps the issue is specific to some subset of these devices? Regards , On Wednesday, August 7, 2013 11:48:28 PM UTC+10, Jay Howard wrote: How frustrating. Though, I'm glad to know it works for someone else; it gives me some hope that a workaround can be found. Couple questions about the app that's working correctly: 1. What's the value of targetSdkVersion in your manifest? (Mine is 9). 2. What's the value of target in your project.properties file? (Mine is Google Inc.:Google APIs:14). 3. Do you use a default theme for your app? If so, which? (Mine is Theme.NoTitleBar). Is there any chance I could impose on you to build and run my demo app (OptionsMenu.zip shared on Google Drive) on your S4? The zip file contains a complete Eclipse project minus the bin and gen dirs, which are auto-generated. The app is trivial and does nothing but demonstrate the bad behavior. If possible, I'd like to determine whether this is an issue on all S4s or if the device I'm using is special in some way. On Wednesday, August 7, 2013 3:51:02 AM UTC-5, gjs wrote: Hi, I have a Samsung Galaxy S4 with Android 4.2.2 plus an app activities that have legacy option menus with more than six items, including more that uses onCreateOptionsMenu() as well as onPrepareOptionsMenu() and onOptionsItemSelected(). When I try to reproduce your steps I do *not* get the same issues you mention, all menu options work OK when using the key combinations you mention. The main difference I can see when looking at your code sample on SO, is that I do *not* use an inflator to inflate the menu items from a static xml file in onCreateOptionsMenu(). Instead I am creating the menu ( sub menu) items in java code dynamically at runtime, within onCreateOptionsMenu() also onPrepareOptionsMenu(), adding removing menu items to from the menu object 'by hand', the reason I'm doing this is that the menu items need to vary according to the current context of the activity, perhaps you could try the same see if that works ok on an S4. Another suggestion, instead of creating menu items dynamically at runtime in java code - which is probably not a recommended practice, is to try your inflator code within onPrepareOptionsMenu(), remembering to call menu.clear() before the inflator and see if that works any better. See for details http://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu) Good luck. On Wednesday, August 7, 2013 2:01:17 AM UTC+10, Jay Howard wrote: I'm seeing the following behavior (on a Samsung S4, but potentially also on other Samsung devices) in an app that uses a legacy options menu: 1. User taps hardware menu button to bring up options menu. There are more than six items in the menu. 2. User taps the bottom-right more button to access the overflow menu items. 3. User taps the hardware back button to return to the initial options menu. 4. User taps any combination of menu items, potentially multiple times each. Nothing happens. onOptionsItemSelected() is never
Re: [android-developers] What is the use of services in Android?
Hi, suppose an activity start a background service in the oncreate method and now user switch to other activity and when my app is working in the background then system kill my activity life-cycle but when i return to my activity then system call the oncreate method of my application and then android system again start a new service again even the last one working in the background.. On Thursday, August 8, 2013 4:53:27 AM UTC-8, Daniele Segato wrote: On 08/08/2013 01:40 PM, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method |stopService(new Intent(getApplicationContext(), MyService.class));| does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? You've been already told by others that Services should be used to MANAGE separate thread(s). The important part is that while an application is used to interact with the user a Service has no UI and can run in background. And with background I don't necessary mean off-the-main-thread. I mean that they can run even if the application (activities) is not used at the time. Services have a simpler life cycle in respect to activities and they are not influenced or killed by the framework by changes in configurations. Furthermore the framework will kill activities before starting to kill services. And if the framework decide to kill your service you can specify what you want to do with the request you received (drop it, ask the framework to re-do it, etc...) Services are a main component of the system and it is good practice to, for example, use them to update underling data (better if using a SyncAdapter) and manage remote calls. regards, Daniele Segato -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
Hi, if a service starts a new thread then how i can stop the service from the other class. On Thursday, August 8, 2013 3:51:19 AM UTC-8, Kristopher Micinski wrote: Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashis...@gmail.com javascript:wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
That's not how it works, you're misunderstanding services. That's what happens if you use a thread, so in fact you're exactly switching the meaning of a service. First of all, the service won't have it's `onStart` executed until your oncreate returns anyway, since it just pushes messages onto the looper. Then the service will be started, but if it's already doing work, just recognize that by keeping some sort of state inside your service. Kris On Thu, Aug 8, 2013 at 2:02 PM, ashish ashish.a...@gmail.com wrote: Hi, suppose an activity start a background service in the oncreate method and now user switch to other activity and when my app is working in the background then system kill my activity life-cycle but when i return to my activity then system call the oncreate method of my application and then android system again start a new service again even the last one working in the background.. On Thursday, August 8, 2013 4:53:27 AM UTC-8, Daniele Segato wrote: On 08/08/2013 01:40 PM, ashish wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method |stopService(new Intent(getApplicationContext()**, MyService.class));| does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? You've been already told by others that Services should be used to MANAGE separate thread(s). The important part is that while an application is used to interact with the user a Service has no UI and can run in background. And with background I don't necessary mean off-the-main-thread. I mean that they can run even if the application (activities) is not used at the time. Services have a simpler life cycle in respect to activities and they are not influenced or killed by the framework by changes in configurations. Furthermore the framework will kill activities before starting to kill services. And if the framework decide to kill your service you can specify what you want to do with the request you received (drop it, ask the framework to re-do it, etc...) Services are a main component of the system and it is good practice to, for example, use them to update underling data (better if using a SyncAdapter) and manage remote calls. regards, Daniele Segato -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
Send another Intent (different action) to the IntentService. Override the onStartCommand to catch this Intent and this could allow you to stop/interrupt the ongoing process in the IntentService's background thread. On Thursday, August 8, 2013 2:04:33 PM UTC-4, ashish wrote: Hi, if a service starts a new thread then how i can stop the service from the other class. On Thursday, August 8, 2013 3:51:19 AM UTC-8, Kristopher Micinski wrote: Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashis...@gmail.com wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
You send a message to the service to stop the thread. Then the service stops the thread, by setting some flag or condition variable. Kris On Thu, Aug 8, 2013 at 2:04 PM, ashish ashish.a...@gmail.com wrote: Hi, if a service starts a new thread then how i can stop the service from the other class. On Thursday, August 8, 2013 3:51:19 AM UTC-8, Kristopher Micinski wrote: Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashis...@gmail.com wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext()**, MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Gradle build is screwing up in weird ways on 5% of devices when used with Proguard -- same config and source works fine in Eclipse build
Interesting, I wasn't aware of the strictfp modifier. It seems that changing one of the floats to a double may have fixed it... I sent out several more specific tests and waiting for the remote debugger to confirm. :) On Wed, Aug 7, 2013 at 5:12 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: If it is floating point related you could try adding the strictfp modifier to your methods or classes that rely on platform-independent floating point arithmetics. On Wednesday, August 7, 2013 12:02:04 PM UTC-5, Digipom wrote: I figured it out -- I seem to have run into some sort of an obscure floating-point optimization bug that occurs on certain devices. I opened https://code.google.**com/p/android/issues/detail?**id=58698https://code.google.com/p/android/issues/detail?id=58698to track the issue. I haven't found a workaround yet aside from exporting from Eclipse for now, but I'm trying different things like replacing floats with doubles to see if that makes a difference. It's slow-going since I can't reproduce the issue locally and rely on remote debugging. ;) On Sunday, August 4, 2013 3:42:52 PM UTC-4, Digipom wrote: Hello, I recently moved to Gradle from Eclipse so that I could have an easy time of building from the command line, and at first I was very happy with the Gradle build, until about 5% of the customers started emailing me and complaining that the app was behaving strangely and not working correctly. No crashes, just... behaving oddly, and only on 5% of the devices. The code Proguard config is identical, so it seems something bad is happening with the way that the code is being generated. I haven't figured it out yet, but I'm digging into things with apktool and I'm seeing a lot of differences with the generated classes from the same class files, which I find strange because the Proguard config that I'm feeding in is the same. Unfortunately, I have to go back to manual builds with Eclipse for now due to this issue. Does anyone else have any similar experiences or insight into this? Are the Eclipse / Gradle builds using different build tools behind the scenes which could lead to differences in the generated code and cause some files to be mis-generated? 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 --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/h48v0STCW5o/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Digipom http://www.digipom.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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
Hi, if one service is working in the background and we again start the service then onstart method for second time does not work until first one finish execution On Thursday, August 8, 2013 10:08:54 AM UTC-8, Streets Of Boston wrote: Send another Intent (different action) to the IntentService. Override the onStartCommand to catch this Intent and this could allow you to stop/interrupt the ongoing process in the IntentService's background thread. On Thursday, August 8, 2013 2:04:33 PM UTC-4, ashish wrote: Hi, if a service starts a new thread then how i can stop the service from the other class. On Thursday, August 8, 2013 3:51:19 AM UTC-8, Kristopher Micinski wrote: Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashis...@gmail.com wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext(), MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Setting text onto an action bar search box.
I would like to set text onto an actionbar search box programmatically, but haven't been successful in doing this (probably simple task!). I would be very appreciative of your support. 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: How do I flip images?
Hey, thanks for that, I just needed to know if there was something in the documentation I was missing/if there was an easy way to achieve the effect. Will have to settle for a horizontal scroll, with a bit of drop shadow, doesnt look too bad actually, especially when its moved with the finger swipe. On Wednesday, August 7, 2013 10:01:37 PM UTC+1, Nobu Games wrote: Unfortunately not, it's simply too specific. In that case you may have to roll your own implementation, I'm afraid. Or better: just simplify your requirements and use a ViewPager for flipping your pages. It's just a horizontal scroll animation but it's ok. On Wednesday, August 7, 2013 3:31:21 PM UTC-5, SonyPhoneGuy wrote: I cant seem to find a good one... The only one thats slightly pleasing is: https://code.google.com/p/android-page-curl/ I downloaded their reader off the app market which implements it. Its awful. I thought there would be some easy way of doing what the Play Book does, thought there would be some native method of doing this... On Wed, Aug 7, 2013 at 9:16 PM, Nobu Games dev.nob...@gmail.com wrote: I was in the same shoes a while ago. There is no easy way to get a convincing animation. And you cannot get it at all using Android animation objects. There are a few page curl, page flip tutorials out there. It will boil down to creating your own view that renders it. And that's not really trivial to do especially when you want to make that interactive by dragging around the page and changing the curl dynamically based on the finger position. Maybe you'll find a ready made component for Android by searching for Android page curl. On Wednesday, August 7, 2013 2:59:47 PM UTC-5, SonyPhoneGuy wrote: I am trying to do some flip animation. I have been able to successfully use the ObjectAnimator to do a few flips, but I am trying to re-create a more believable page flip - rather like a book flip - similar to what is used in Play Books. Is there any easy way to do this? any documentations around? 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-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/6Nupi1tOLP4/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] What is the use of services in Android?
When you start the same service again, it just has its onstart called: nothing changes. There's no such thing as a second service created, there's only one of them in memory. Additionally: I think everyone has mentioned that services run on the main thread: how would one be running in the background and have another pop up. There's only one service, and as long as you send it messages it gets them. If you instead mean that you're having `onStart` delayed until the other one finishes, that's because it runs on the main thread. By the way, you shouldn't be doing anything in `onStart`, the same as how you shouldn't do anything blocking in activities. Again, you just *coordinate* threads using your service. Kris On Thu, Aug 8, 2013 at 2:32 PM, ashish ashish.a...@gmail.com wrote: Hi, if one service is working in the background and we again start the service then onstart method for second time does not work until first one finish execution On Thursday, August 8, 2013 10:08:54 AM UTC-8, Streets Of Boston wrote: Send another Intent (different action) to the IntentService. Override the onStartCommand to catch this Intent and this could allow you to stop/interrupt the ongoing process in the IntentService's background thread. On Thursday, August 8, 2013 2:04:33 PM UTC-4, ashish wrote: Hi, if a service starts a new thread then how i can stop the service from the other class. On Thursday, August 8, 2013 3:51:19 AM UTC-8, Kristopher Micinski wrote: Usually you use a service to coordinate a thread. FYI most of the time you don't want to outright kill a thread (e.g., if it's about to return from a download operation), you want to periodically check a flag. You probably don't want to use threads in their raw fashion (from activities) for a few reasons, one of which being that with configuration changes they're trickier to get right. Instead if you need background work that fits the model, an AsyncTask is an appropriate design. Kris On Thu, Aug 8, 2013 at 7:40 AM, ashish ashis...@gmail.com wrote: I read about services in Android very carefully, but I didn't find any valid reasons to use it. E.g. 1. By default services run in the main thread, which most of the applications don't want. 2. A service can run on a seperate thread if it spawns it own thread. But if a service runs on a seprate thread, then the method stopService(new Intent(getApplicationContext()**, MyService.class)); does not stop the running service. Again this is a problem. If we want to do some background operations, then I think threads are better than services. Am I right? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Need to show a dialog on top of all other Apps for a custom hardware.
On Thu, Aug 8, 2013 at 5:22 AM, Tushar tushar.maha...@gmail.com wrote: I need to show a dialog (more like a horizontal bar) on press of a custom Key (on my custom device powered by Android). Your question is better suited to the groups related to modifying the framework. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Feature Graphic not used anymore?
This is the note about the feature graphic: Feature Graphic (Optional): - Use: The featured section in Google Play and also on the web version of Google Play. - This graphic is *required* in order to be featured on Google Play, and is highly recommended. Without this graphic, your app cannot be featured on Google Play. However, in the latest web version of Google Play, these feature graphics are not shown. Also, the featured sections like Editor's pick seem to be using the 512x512 icon, not the 1024x500 feature graphic. Can someone offer some guidance as to whether this is still important? At least before I spend a lot of time experimenting with graphics for upcoming apps that may never be shown. If not important anymore, I can also cut out some slides from one of my presentations. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Augmented Reality frameworks - what your choice?
On Thursday, August 8, 2013 5:08:41 AM UTC-7, hoyski wrote: My recommendation is Justin Wetherell's augmented reality framework. You can get the source and demo apps for free from http://code.google.com/p/android-augment-reality-framework . I tried a bunch of different AR frameworks and samples with little success before Justin's. His is straight forward and well documented. - Dave Thanks. It looks about right, not too much or too little. The only bottleneck, and it might be a problem any way I go, is that I don't expect Justin Wehterell to have all the devices any more than I do. AppThwack has a few hundred in the data center, but they are not very helpful for testing something that uses sensors and camera. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Augmented Reality frameworks - what your choice?
On Thursday, August 8, 2013 6:10:51 AM UTC-7, Daniele Segato wrote: On 08/08/2013 12:07 AM, Nathan wrote: * Wikitude. A bit more expensive, but possibly more established and mature. Since their sample app has a million downloads. this one sucks in my opinion. It use a webview for an HTML5 app. HTML5 app sucks for many reasons. Performance is one of them. I would stay away from it. That is something I didn't notice at first glance. HTML5 isn't my first choice, and offline capability is a must. Reading seems like Metaio http://www.metaio.com/ is the most complete (cross platform) Augmented Reality framework. But you can't develop for it on Linux which makes no sense at all in my opinion. It does seem very well featured, and may do more than I need. It's also pricey at $5490 per app. The ideas I had in mind may not bring a big ROI at that cost. But I'll look at it some more. Thanks. In my company we use Vuforia http://www.qualcomm.com/solutions/augmented-reality for natural features and markers tracking. Thanks. I might try it if I were going the computer vision route. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Feature Graphic not used anymore?
On Thu, Aug 8, 2013 at 5:45 PM, Nathan nathan.d.mel...@gmail.com wrote: However, in the latest web version of Google Play, these feature graphics are not shown. Also, the featured sections like Editor's pick seem to be using the 512x512 icon, not the 1024x500 feature graphic. My Version of Google Play on my phone shows them for Editor's Choice, although that's about the only place I see it used from my quick browsing. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Augmented Reality frameworks - what your choice?
I think AR has enough required frameworks, which I've used without major issue. On Thursday, August 8, 2013 3:37:18 AM UTC+5:30, Nathan wrote: From your experience, what is the best option for an Augmented reality framework? If you have developed one or developed with one, please comment. There isn't a lack of options - just looking for feedback on which ones actually work. The largest list I could find on this topic is this: http://socialcompare.com/en/comparison/augmented-reality-sdks I probably need: - GPS and sensors use - Placement of markers, icons, and some vectors (lines or shapes) in the 3D world. - Should work without internet or data. Shouldn't be a problem since I am not counting on an online feed. - Non GPL. I may need ( in the dream future): - more complex 3d rendering with meshes and dynamically loaded textures. Nothing too major, just maybe like overlaying a Google Earth like image with the camera. ;) I probably don't need: - Data for the Points of Interest, I'll provide my own and they'll be small in number. - Computer Vision based reality. That eliminates quite a few. - Object manipulation - I don't need to design cities or anything like that. I'm looking for more of the viewfinder sort of thing. I prefer buy over build, I think because I don't want to start from scratch on working around the bugs on every single device. Of course, I don't want to buy and still have to fix all the bugs myself. So here are some I'm considering. - ARLab.com. As described on their website at least, it sounds like the ArBrowser - Wikitude. A bit more expensive, but possibly more established and mature. Since their sample app has a million downloads. - http://www.chupamobile.com/products/details/296/Augmented+Reality+Toolkit/. Probably made by a guy in his basement, but if it does work, it is only $20. Probably worth buying just to prototype something before going full scale. Can anyone comment? Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Gradle build is screwing up in weird ways on 5% of devices when used with Proguard -- same config and source works fine in Eclipse build
So after some further follow-up I can confirm there are two fixes: 1) Just print out the value of the variable in a Log.d. Believe it or not, that fixes the code. 2) Change float into double. Based on customer reports I received, the bug only affected users running API 15 or 16, and only some models of phones, not all (again, based on customer reports). Still if you guys switch to Gradle using Proguard 4.9 with obfuscation on (even with optimization off), might want to watch out for floating point conversions in your code, or just compile with obfuscation off or export with Eclipse. On Thu, Aug 8, 2013 at 2:17 PM, Digipom Inc. digi...@gmail.com wrote: Interesting, I wasn't aware of the strictfp modifier. It seems that changing one of the floats to a double may have fixed it... I sent out several more specific tests and waiting for the remote debugger to confirm. :) On Wed, Aug 7, 2013 at 5:12 PM, Nobu Games dev.nobu.ga...@gmail.comwrote: If it is floating point related you could try adding the strictfp modifier to your methods or classes that rely on platform-independent floating point arithmetics. On Wednesday, August 7, 2013 12:02:04 PM UTC-5, Digipom wrote: I figured it out -- I seem to have run into some sort of an obscure floating-point optimization bug that occurs on certain devices. I opened https://code.google.**com/p/android/issues/detail?**id=58698https://code.google.com/p/android/issues/detail?id=58698to track the issue. I haven't found a workaround yet aside from exporting from Eclipse for now, but I'm trying different things like replacing floats with doubles to see if that makes a difference. It's slow-going since I can't reproduce the issue locally and rely on remote debugging. ;) On Sunday, August 4, 2013 3:42:52 PM UTC-4, Digipom wrote: Hello, I recently moved to Gradle from Eclipse so that I could have an easy time of building from the command line, and at first I was very happy with the Gradle build, until about 5% of the customers started emailing me and complaining that the app was behaving strangely and not working correctly. No crashes, just... behaving oddly, and only on 5% of the devices. The code Proguard config is identical, so it seems something bad is happening with the way that the code is being generated. I haven't figured it out yet, but I'm digging into things with apktool and I'm seeing a lot of differences with the generated classes from the same class files, which I find strange because the Proguard config that I'm feeding in is the same. Unfortunately, I have to go back to manual builds with Eclipse for now due to this issue. Does anyone else have any similar experiences or insight into this? Are the Eclipse / Gradle builds using different build tools behind the scenes which could lead to differences in the generated code and cause some files to be mis-generated? 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 --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/h48v0STCW5o/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Digipom http://www.digipom.com -- -- Digipom http://www.digipom.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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.