Re: [android-developers] Google Play Game Services - Cloud Save
cool, that's good to hear. Thanks for the response Kris. On Wed, Dec 18, 2013 at 10:30 PM, Kristopher Micinski < krismicin...@gmail.com> wrote: > To answer your question, no such thing applies to the cloud save API > in the way you're describing. If your app isn't easily serializable > in an incremental fashion, then an explicit save point sounds like a > perfectly reasonable thing to do... > > Kris > > > On Thu, Dec 19, 2013 at 1:07 AM, Chad Ata wrote: > > haha.. you're right, the chance of getting featured is practically zero. > We > > probably have a better chance with the lottery.. or a lightning bolt. > > But, for example, Amazon has a Developer Select program in which you get > > additional exposure on their app store if you implement a set of features > > and meet certain guidelines. > > We're probably not going to get featured =/ but might as well shoot for > the > > stars and do things the way they want =] > > > > > > On Wed, Dec 18, 2013 at 9:51 PM, Kristopher Micinski > > wrote: > >> > >> Uhh. > >> > >> Hate to break it to you, but there is basically no way you are going > >> to considered for featuring anyway, that's a whole 'nother ballgame > >> :-). You can argue with people about how to make that happen, but I > >> can basically guarantee you that they're not going to decompile your > >> code and check whether you're using their API the specific way it was > >> designed to be used. > >> > >> Kris > >> > >> > >> > >> > >> On Wed, Dec 18, 2013 at 5:33 PM, Chad Ata wrote: > >> > Thanks for the response Kris, > >> > > >> > I ask because none of the conflict resolution docs recommend this > >> > solution. > >> > See: > https://developer.android.com/training/cloudsave/conflict-res.html > >> > I'm also concerned that if it doesn't meet their quality guidelines, > >> > then it > >> > would not be considered for featuring. > >> > Maybe I'm being paranoid =] but then again, maybe i'm not > >> > > >> > -Chad > >> > > >> > > >> > On Wed, Dec 18, 2013 at 1:17 PM, Kristopher Micinski > >> > wrote: > >> >> > >> >> I don't see why this would be at all problematic. It seems > completely > >> >> within the guidelines that says this is a bad idea. The Cloud Save > >> >> API is just that, an API: so I'd use it however it worked best for > >> >> you! > >> >> > >> >> Kris > >> >> > >> >> > >> >> On Wed, Dec 18, 2013 at 3:08 PM, Sheado wrote: > >> >> > Hi Android, > >> >> > > >> >> > Would it be considered bad practice to implement Cloud Save as > simple > >> >> > backup/restore buttons in our game's menu? > >> >> > To clarify, user would press backup on the device with the data > they > >> >> > want. > >> >> > Then press restore on the device they want to update. > >> >> > > >> >> > Quietly updating game content as recommended in the docs would not > be > >> >> > trivial in our game, so we are considering going with a > >> >> > backup/restore > >> >> > approach. > >> >> > > >> >> > Would this be ok, or would this not meet good Google Play > development > >> >> > guidelines? > >> >> > > >> >> > 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
Re: [android-developers] Google Play Game Services - Cloud Save
haha.. you're right, the chance of getting featured is practically zero. We probably have a better chance with the lottery.. or a lightning bolt. But, for example, Amazon has a Developer Select program in which you get additional exposure on their app store if you implement a set of features and meet certain guidelines. We're probably not going to get featured =/ but might as well shoot for the stars and do things the way they want =] On Wed, Dec 18, 2013 at 9:51 PM, Kristopher Micinski wrote: > Uhh. > > Hate to break it to you, but there is basically no way you are going > to considered for featuring anyway, that's a whole 'nother ballgame > :-). You can argue with people about how to make that happen, but I > can basically guarantee you that they're not going to decompile your > code and check whether you're using their API the specific way it was > designed to be used. > > Kris > > > > > On Wed, Dec 18, 2013 at 5:33 PM, Chad Ata wrote: > > Thanks for the response Kris, > > > > I ask because none of the conflict resolution docs recommend this > solution. > > See: https://developer.android.com/training/cloudsave/conflict-res.html > > I'm also concerned that if it doesn't meet their quality guidelines, > then it > > would not be considered for featuring. > > Maybe I'm being paranoid =] but then again, maybe i'm not > > > > -Chad > > > > > > On Wed, Dec 18, 2013 at 1:17 PM, Kristopher Micinski > > wrote: > >> > >> I don't see why this would be at all problematic. It seems completely > >> within the guidelines that says this is a bad idea. The Cloud Save > >> API is just that, an API: so I'd use it however it worked best for > >> you! > >> > >> Kris > >> > >> > >> On Wed, Dec 18, 2013 at 3:08 PM, Sheado wrote: > >> > Hi Android, > >> > > >> > Would it be considered bad practice to implement Cloud Save as simple > >> > backup/restore buttons in our game's menu? > >> > To clarify, user would press backup on the device with the data they > >> > want. > >> > Then press restore on the device they want to update. > >> > > >> > Quietly updating game content as recommended in the docs would not be > >> > trivial in our game, so we are considering going with a backup/restore > >> > approach. > >> > > >> > Would this be ok, or would this not meet good Google Play development > >> > guidelines? > >> > > >> > 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. > >> > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Android Developers" group. > >> To post to this group, send email to > android-developers@googlegroups.com > >> To unsubscribe from this group, 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/-XbklDth9Cs/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 becaus
Re: [android-developers] Google Play Game Services - Cloud Save
Thanks for the response Kris, I ask because none of the conflict resolution docs recommend this solution. See: https://developer.android.com/training/cloudsave/conflict-res.html I'm also concerned that if it doesn't meet their quality guidelines, then it would not be considered for featuring. Maybe I'm being paranoid =] but then again, maybe i'm not -Chad On Wed, Dec 18, 2013 at 1:17 PM, Kristopher Micinski wrote: > I don't see why this would be at all problematic. It seems completely > within the guidelines that says this is a bad idea. The Cloud Save > API is just that, an API: so I'd use it however it worked best for > you! > > Kris > > > On Wed, Dec 18, 2013 at 3:08 PM, Sheado wrote: > > Hi Android, > > > > Would it be considered bad practice to implement Cloud Save as simple > > backup/restore buttons in our game's menu? > > To clarify, user would press backup on the device with the data they > want. > > Then press restore on the device they want to update. > > > > Quietly updating game content as recommended in the docs would not be > > trivial in our game, so we are considering going with a backup/restore > > approach. > > > > Would this be ok, or would this not meet good Google Play development > > guidelines? > > > > 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. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, 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/-XbklDth9Cs/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.
[android-developers] talkback crashes with my tablet under 4.0.5
hi wasn't sure where to post this i'm visually impaired using a arc hose 101g9 tablet running 4.0.5 with talkback version 3.0.2 i have been having bad luck lot of freezes when it freezes i loose speech i had a sighted person check the screen all the contents were still there i have to reboot all the time it happens on all voices even the default google voice i e mailed archose support they said they don't support third party apps -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] talkback freezes on my arc hose 101g9 tablet
hi i'm not sure where to post this i'm visually impaired got a tablet its a arc hose 101g9 i'm running 4.0.5 and talkback version 3.0.2 it freezes all the time when it freezes i loose speech all i'm doing is reading items on the screen i had a sighted person check the screen everything was still there it happens with all the voices even default google tts -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] adb refuses to recognize devices
That works! You, sir, have saved my sanity, and my development machine from being smashed by a hard object. Thank you so much! Chad -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] adb refuses to recognize devices
Hi, I'm using debian linux, and suddenly (after months of successful development), adb refuses to recognize any of the hardware devices that I plug into the USB ports. adb shell, and adb logcat no longer work. And adb devices shows the following. List of devices attached no permissions I've rebooted my development machine, rebooted my devices, switch USB ports, started and stopped the adb server, and adb still refuses to recognize the device, and consequently prevents installing packages on them. Has anyone encountered this situation, and found a way to resolve it. Your advice would be much appreciated, since this has pretty much ground my development to a halt. Thanks, Chad -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Unable to get Native Socket to accept requests
I'm porting a tinyish server to Android using the NDK. The ultimate goal is for my app to interact with the server through JNI and Android Service classes. I've run across a stumbling block, however. The server fails to start as soon as I call accept() on the socket. I've pasted the code below. All I want to to is open a socket that listens to localhost requests of port . If anyone can give me advice, I would greatly appreciate it. Thanks, --- static void socket_listen_to(const char *host_name, unsigned int port) { struct sockaddr_in address; int listening_socket; int connection_socket; if (host_name) { struct hostent *host_data; host_data = gethostbyname(host_name); if (!host_data || host_data->h_addrtype != AF_INET || host_data- >h_length != sizeof address.sin_addr) { exit(EXIT_FAILURE); } host_name = host_data->h_name; memcpy(&address.sin_addr, host_data->h_addr_list[0], sizeof address.sin_addr); } listening_socket = socket(PF_INET, SOCK_STREAM, 0); if (listening_socket == -1) { exit(EXIT_FAILURE); } address.sin_family = AF_INET; address.sin_port = htons((unsigned short) port); if (bind(listening_socket, (struct sockaddr *) &address, sizeof address) == -1 || listen(listening_socket, 5) == -1 ) { closesocket(listening_socket); exit(EXIT_FAILURE); } connection_socket = accept(listening_socket, NULL, NULL); if (connection_socket == -1 ) { closesocket(listening_socket); exit(EXIT_FAILURE); } } unsigned int port = ; const char host_name[] = "localhost"; socket_listen_at(host_name, port, >p_input_FILE, >p_output_FILE); -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] APK Signature Certificate Check
Ah, ok - I like this approach =] I'm a bit fuzzy on the implementation details, but I think I can figure this out. Thanks! -Chad On Thu, Nov 10, 2011 at 6:56 PM, Nikolay Elenkov wrote: > On Fri, Nov 11, 2011 at 11:45 AM, Chad Ata wrote: > > Thanks for the response Nikolay, > > > > I was hoping to avoid server-side checks because I don't want potential > lag > > or bugs to affect the legit users. But I'll consider your suggestion if > this > > becomes a big problem for us. > > > > You could embed the hash as a resource with a non-obvious name, > and tripple-base64 encode it for extra fun if you don't want to use a > server. If they are changing/modifying your resources, it might be > better to store bits of it in code and calculate it dynamically > though. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] APK Signature Certificate Check
Thanks for the response Nikolay, I was hoping to avoid server-side checks because I don't want potential lag or bugs to affect the legit users. But I'll consider your suggestion if this becomes a big problem for us. -Chad On Thu, Nov 10, 2011 at 6:40 PM, Nikolay Elenkov wrote: > On Fri, Nov 11, 2011 at 11:21 AM, Sheado wrote: > > > > Currently I have something in place where I get the PackageInfo's > > signatures (e.g. getPackageManager().getPackageInfo) and feed them > > into X509Certificate which i use to check the issuer DN. > > > > This will at least tell me that the DN changed, but that's obviously > > easily to get around. > > What's the proper way to go about checking the package signature with > > a remote service? > > Use MessageDigest to calculate the SHA1 hash of the certificate blob. > Then send this to a server and compare with the hash of your own > certificate. Anyone can create a certificate with any DN, so checking > the DN buys you nothing. > > Of course, if they are modifying your package, they can disable the > checking code... > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: APK Signature Certificate Check
Good point Zsolt, They seem to only be modifying the xml, so I'm hoping it's just a simple operation they're running. I'm not big on DRM, but this could potentially cost us money in this case (since a few thousand have already downloaded the tweaked version - and they could potentially hit our servers), so I just don't want to make it too convenient for them. -Chad On Thu, Nov 10, 2011 at 6:38 PM, Zsolt Vasvari wrote: > If they unpack, modify, resign and redestribute your app, they are > certainly capable of removing any checks you may put in there to > verify any of those things you are mentioning. > > On Nov 11, 10:21 am, Sheado wrote: > > Hi All, > > > > Sorry if this has already been answered, but searching for this is > > returning piles of LVL-related posts. > > > > We recently discovered that our app's apk is being unpacked, modified, > > then resigned and re-distributed without our approval. What's the > > proper way of checking for a modified apk signature? > > > > Currently I have something in place where I get the PackageInfo's > > signatures (e.g. getPackageManager().getPackageInfo) and feed them > > into X509Certificate which i use to check the issuer DN. > > > > This will at least tell me that the DN changed, but that's obviously > > easily to get around. > > What's the proper way to go about checking the package signature with > > a remote service? > > > > Or am I going about this all wrong? Perhaps checksums are the better > > way to go? > > > > Thank You, > > -Chad > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] In-app Billing - not working on 1.6 & 2.1
Thanks for double-checking. For me, some of the transactions are working, such as the purchase request. The purchase confirmation is never completing though. I don't want to take any chances with our users, so I'm going to remove the feature for <=2.1 for now. -Chad On Wed, Oct 5, 2011 at 2:19 AM, Kostya Vasilyev wrote: > > 2011/10/5 Sheado > >> Hello, >> >> In-app billing doesn't seem to be working on 1.6 & 2.1. I'm testing >> with the Dungeons sample app and purchasing android.test.purchased. >> Same issue in my own app. >> > > I just ran a quick test on a 2.0.1 device, and it worked - for an app > that's in production, with an already purchased item (so this test confirmed > "restore transactions", not a new order). > > >> >> Is billing unstable for those versions? Should I remove billing for >> 1.6 & 2.1 devices? >> >> Thanks! >> -Chad >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MediaPlayer Error (-38, 0)
Is there a documented list of MediaPlayer error codes anywhere? That would be very helpful. I keep getting (-38, 0) when trying to switch streams. Since I'm stopping the MediaPlayer, resetting it, setting the new URL and preparing it, I shouldn't be getting errors--especially since each URL works if I play it directly. I've Googled the error, but cannot find any consensus. Any insight as to what this error code means? Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
Hi Joao, Cool, that's similar to what we've done. I think I'm going to ignore this problem until I get a few more bug reports - hopefully with more details. Thanks for helping out! -Chad On Thu, Sep 29, 2011 at 2:44 PM, Joao Braga wrote: > I see... > Well I don't know the style of your game and how it was developed. > I'm developing a game engine myself and for the memory issue, we are > building a Memory Manager that knows exactly when to allocate, when to free > and when to reuse an object of the game. > > The result of it is less load time and less memory being used. On the other > hand it takes more time to create the game itself. > > I don't know if it fits to your problem, but seems to me that it's a option > to be considered. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
On some phones, like the small screen Motorola's, we've found that we really push the memory limitations. If a user has a lot of junk of the screen (in-game), then they risk OOM exception. We are aggressively calling bitmap.recycle() whenever an image is no longer being used - and that has been really helpful. But every once in a while, we still notice these weird bugs. As for the sessions, I just mean the time between onResume() and onPause(). So if 200k users play the game once, 1 of them gets the error - which is being reported via Android Market. On Thu, Sep 29, 2011 at 2:16 PM, Joao Braga wrote: > I see, but it souldn't be a problem since the phones have enough memory to > load a image like that. > I'm just talking about the image, I don't know how the rest of your engine > is managing the memory. > > But you said something about 200k sessions...how this sessions work? > The clients connect to a server (computer) or the clients (phones) can host > games and the crash happens when it is hosting a certain number of clients? > Tell us about your architecture > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
It's a game. At a certain part it loads a large transparent png - about 900x300 or something like that. This issue seems to happen only with the larger images, which is why I was thinking it had to do with possible low memory situation. -Chad On Thu, Sep 29, 2011 at 2:05 PM, Joao Braga wrote: > It's an architectural problem. > What's your application about? > > What does it do? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
Hi Joao, Yes that code works for me - actually I was already doing something similar in a different part of my code. Unfortunately, since it's such a rare bug I won't know if it really fixed the problem until I deploy it to my users. -Chad On Thu, Sep 29, 2011 at 2:01 PM, Joao Braga wrote: > Maybe, but I can't tell since I never used it. > > Did the code work for 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
Thanks for the responses guys, Just a note: My code always works when I test it. The bug is happening once every 200k sessions (as reported via Android Market). -Chad On Thu, Sep 29, 2011 at 1:58 PM, Chad Ata wrote: > Thanks for the response Joao, > > Interesting. Do you think there's a bug in the decodeResource() when using > BitmapFactory.Options? > > -Chad > > > On Thu, Sep 29, 2011 at 1:49 PM, Joao Braga wrote: > >> Try this: >> >> Bitmap bitmap; >> bitmap = BitmapFactory.decodeResource(res, R.drawable.image); >> bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(), >> bitmap.getHeight(), false); //if you want to make it scaleble >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BitmapFactory.decodeResource returning null sometimes for local resource
Thanks for the response Joao, Interesting. Do you think there's a bug in the decodeResource() when using BitmapFactory.Options? -Chad On Thu, Sep 29, 2011 at 1:49 PM, Joao Braga wrote: > Try this: > > Bitmap bitmap; > bitmap = BitmapFactory.decodeResource(res, R.drawable.image); > bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(), > bitmap.getHeight(), false); //if you want to make it scaleble > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Replicating the results of the deprecated Sensor.TYPE_ORIENTATION
hi there, Sure.. I'm still cleaning up and fixing an issue with the landscape devices. Here's where I am right now - landscape seems to work like it used to with TYPE_ORIENTATION. public void onSensorChanged( SensorEvent event ) { switch( event.sensor.getType() ) { case Sensor.TYPE_ACCELEROMETER: gravity = event.values.clone();// TODO - optimize boolean b = SensorManager.getRotationMatrix( R, null, gravity, geomagnetic ); if( b ) { switch( rotation ) { case Surface.ROTATION_0://TODO case Surface.ROTATION_180: SensorManager.remapCoordinateSystem( R, SensorManager.AXIS_MINUS_X, SensorManager.AXIS_Y, outR ); break; case Surface.ROTATION_90://TODO case Surface.ROTATION_270: // TODO break; } SensorManager.getOrientation( outR, values ); pitch = (float) Math.toDegrees( values[1] ); } break; case Sensor.TYPE_MAGNETIC_FIELD: geomagnetic = event.values.clone(); break; } } warning: that code's not optimized. hope it helps though. On Thu, Jun 9, 2011 at 2:19 AM, String wrote: > Mind posting your corrected code for others who are trying to do something > similar? > > String > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Replicating the results of the deprecated Sensor.TYPE_ORIENTATION
woops.. figured it out. my coordinate re-mappings (remapCoordinateSystem()) are messed. The documentation is really helpful - but I still managed to confuse which coordinate system I'm supposed to map to. Thanks anyway! On Wed, Jun 8, 2011 at 7:31 PM, Sheado wrote: > Hi All, > > I've been using SensorManager with Sensor.TYPE_ORIENTATION for its > pitch/roll values. I want to update the code to support multiple > screen orientations (and while I'm at it get rid of some deprecated > code). > > My current solution is below. The main problem with it, is that if I > set the phone down on the table, the roll does not go to 0. With some > phones, it stays were it last was before being set down. With others, > it fluctuates (noticeably) around some value. > > I've tried looking for the deprecated source in the Android git > source, but could not find exactly where things were being stabilized. > Any help would be appreciated! Maybe somebody at Google could post the > deprecated code? > (please excuse the messy/unoptimized code below:) >public void onSensorChanged( SensorEvent event ) >{ >switch( event.sensor.getType() ) >{ >case Sensor.TYPE_ACCELEROMETER: >if( gravity == null ) >gravity = event.values.clone(); >// would it help to calculate alpha > every time? >final float alpha = 0.8f; >gravity[0] = alpha * gravity[0] + (1 - > alpha) * event.values[0]; >gravity[1] = alpha * gravity[1] + (1 - > alpha) * event.values[1]; >gravity[2] = alpha * gravity[2] + (1 - > alpha) * event.values[2]; >boolean b = SensorManager.getRotationMatrix( > R, null, gravity, > geomagnetic ); >if( b ) >{ >switch( rotation ) >{ >case Surface.ROTATION_0: >case Surface.ROTATION_180: > > SensorManager.remapCoordinateSystem( R, > SensorManager.AXIS_MINUS_X, SensorManager.AXIS_Z, outR ); >break; >case Surface.ROTATION_90: >case Surface.ROTATION_270: > > SensorManager.remapCoordinateSystem( R, SensorManager.AXIS_Z, > SensorManager.AXIS_X, outR ); >break; >} >SensorManager.getOrientation( outR, > values ); >roll = (float) Math.toDegrees( > values[2] ); >} >break; >case Sensor.TYPE_MAGNETIC_FIELD: >geomagnetic = event.values.clone(); >break; >} > } > > Thanks! > -Sheado -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Context differences
My understanding is that you should use getApplicationContext when possible. Using "this" as the context introduces the possibility of accidentally hanging on to a reference to your entire activity, thus creating a memory leak. As for getBaseContext(), I believe you use that when you create a context wrapper, to get the context that's being wrapped. I could be wrong about that though... never used it. ~c On Tue, Mar 1, 2011 at 11:17 AM, dashman wrote: > What are the differences between any of these calls - > all called from within my Activity sub-class instance. > > getApplicationContext() > > getBaseContext() > > this > > I need to get the context primarily for prefs for my apps - there > are multiple Activities but i'd like to reference the same > common prefs for my app. > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Out of memory - despite being way under 16mb
Awesome, Thanks Sean - I'll definitely try that out. On Sat, Feb 26, 2011 at 2:35 AM, seanw wrote: > > > On Friday, February 25, 2011 8:12:29 PM UTC, Sheado wrote: >> >> ... >> > Dianne - that explains a lot, thank you. Is there any way to get an >> accurate (bitmap included) picture of the heap in pre-honeycomb builds >> of an app? >> > > Hi, > > You can use these functions; > > Runtime.getRuntime().totalMemory() > android.os.Debug.getNativeHeapAllocatedSize()) > > The first one tells you how much memory is being used on the Dalvik heap > and the second one tells you how much is being used on the native heap. > > Regards, > > Sean > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Out of memory - despite being way under 16mb
Thanks for that link String. I'll look into calling System.gc() - I've always thought (and read posts warning against it) it was bad practice to do so on Android. But I'll do it anyway if it fixes my problem =] -Sheado On Fri, Feb 25, 2011 at 3:07 PM, String wrote: > Sounds to me like you are probably hitting the bitmap deallocation problem: > http://code.google.com/p/android/issues/detail?id=8488 > > In summary, the issue is that bitmap memory takes several GC passes to > deallocate, so it's really easy to get ahead of the GC and run out of > memory. > > AFAIK, there's no fix. You can help the situation somewhat by calling > System.gc() after every Bitmap.recycle() call, and again before every bitmap > allocation. But that's only somewhat. I've also found that setting bitmap > variables to null after recycling them makes matters worse, but YMMV. > > String > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 MapController's zoomToSpan() execution deferred?
That sounded like an excellent suggestion so I gave it a try. The new code looks like this: mapController.zoomToSpan(latitudeDelta, longitudeDelta); /* * If the MapView has not been drawn yet, we won't be able to retrieve an * accurate zoom level. We have to queue up the work to make the adjustment, * if necessary. */ mapView.post(new Runnable() { public void run() { if (mapView.getZoomLevel() > 20) { mapView.getController().setZoom(20); } } }); And, that still didn't work although I fully expected it to. But, after debugging it awhile I noticed some strange behavior that I did not expect. First, I wanted to check that my runnable got queued up OK, and it ran when I expected it to run. It did not. Before I explain what I observed let me first explain my activity / view structure. Tabbed Activity w/ 3 tabs - Tab 1 - ListActivity - Tab 2 - MapActivity - Tab 3 - Plain 'Ol Activity So the sequence I did was: 1. Enter Tabbed Activity, ListActivity in Tab 1 is shown by default. 2. Click on Tab2, the MapActivity. I would have expected the Runnable to be executed at this point. 3. Click 'back' to exit Tabbed Activity. 4. Re-enter Tabbed Activity, again ListActivity in Tab 1 is shown by default. And, this is the point at which the Runnable was executed. I am at a loss as to why. P.S. I must have misunderstood getMaxZoomLevel() because that didn't return what I thought it would which is the zoom level at which you still get the satellite imagery and not the blank white screen w/ grey X's. So, I went back and hard-coded to zoom level 20. On Sep 1, 4:29 pm, Steve Howard wrote: > The zoom may be deferred if the MapView hasn't been drawn yet. Have you > tried putting your logic in a Runnable and post()ing it to the MapView? > > Steve > > On Sun, Aug 29, 2010 at 7:18 PM, Chad McQuillen > wrote: > > > > > My application has a MapView which shows a collection of items in a > > satellite view. I use the MapController's zoomToSpan() method to > > initialize the zoom level of MapView. I later discovered that the > > MapView was showing a blank white screen with grey X's (zoom'd too > > far, zoom out once and everything looks as expected) for the use case > > when the collection of item's locations were very close to each > > other. So, I modified the code from this: > > > mapController.zoomToSpan(latitudeDelta, longitudeDelta); > > > to this: > > > mapController.zoomToSpan(latitudeDelta, longitudeDelta); > > > if (mapView.getZoomLevel() > mapView.getMaxZoomLevel()) { > > mapController.setZoom(mapView.getMaxZoomLevel()); > > } > > > but, I still got the same result. I added some debug before and after > > the zoomToSpan() to retrieve the zoom level from MapView and noticed > > that the zoom level did not change. I'm guessing somehow that the > > work is queued up?? > > > I don't know if this information is important or not to this problem, > > but I'll also mention that the MapView is created from a MapActivity > > which is hosted in the tab host of a TabActivity that contains three > > tabs, one of which is the map. I searched this forum and elsewhere > > and haven't seen anyone encounter such a problem before. I'm hoping > > someone can point me in the right direction. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is MapController's zoomToSpan() execution deferred?
My application has a MapView which shows a collection of items in a satellite view. I use the MapController's zoomToSpan() method to initialize the zoom level of MapView. I later discovered that the MapView was showing a blank white screen with grey X's (zoom'd too far, zoom out once and everything looks as expected) for the use case when the collection of item's locations were very close to each other. So, I modified the code from this: mapController.zoomToSpan(latitudeDelta, longitudeDelta); to this: mapController.zoomToSpan(latitudeDelta, longitudeDelta); if (mapView.getZoomLevel() > mapView.getMaxZoomLevel()) { mapController.setZoom(mapView.getMaxZoomLevel()); } but, I still got the same result. I added some debug before and after the zoomToSpan() to retrieve the zoom level from MapView and noticed that the zoom level did not change. I'm guessing somehow that the work is queued up?? I don't know if this information is important or not to this problem, but I'll also mention that the MapView is created from a MapActivity which is hosted in the tab host of a TabActivity that contains three tabs, one of which is the map. I searched this forum and elsewhere and haven't seen anyone encounter such a problem before. I'm hoping someone can point me in the right direction. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Debugger Disconnected when calling External Intent???
So I'm calling the Camera Intent like so, Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); camera.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Util.tempImgFile))); As I watch the Debug tab in Eclipse as soon as that intent is called my application is terminated and the debugger is disconnected, thus I cannot stop the application at any breakpoint after that intent is called. Is there a way to work around that so I can hit any breakpoints after that call? Thanks, Chad -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: running sqlite3 commands from app?
On Dec 1, 2009, at 9:32 AM, dsukhram wrote: > When I try to run the '.tables' command by doing the following: > > SQLiteDatabase db = this.openOrCreateDatabase(DB_NAME, MODE_PRIVATE, > null); > db.execSQL(".tables"); > Try this: db.execSQL("SELECT name FROM sqlite_master where type='table' and name NOT LIKE 'sqlite_%';"); -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Bounding Geometry in Maps?
You know, I took a look at that lat/lon span and totally dismissed it. Now it makes sense. Thanks for the pointer. So is it safe to assume that I need to divide the span value in 1/2 prior to adding/subtracting that value from the center point lat/lon? Thanks, Chad On Nov 13, 3:23 pm, TreKing wrote: > The MapView class has a center point and latitude and longitude spans that > you can use to compute the visible area. > > - > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking > > On Fri, Nov 13, 2009 at 9:30 AM, Chad wrote: > > Is there a way to get the current bounding geometry or bounding box in > > a current map view? I am connecting to a large dataset and would like > > the ability to send a bounding box of the users current view to the > > server to retrieve only the points that are within the users view and > > maybe buffer a little outside similar to google earth. > > > Thanks, > > Chad > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Bounding Geometry in Maps?
Is there a way to get the current bounding geometry or bounding box in a current map view? I am connecting to a large dataset and would like the ability to send a bounding box of the users current view to the server to retrieve only the points that are within the users view and maybe buffer a little outside similar to google earth. Thanks, Chad -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google wave invitations...?
Yeah, sure, I'd take one. On Thu, Oct 15, 2009 at 11:53 PM, Kenneth Adam Miller < kennethadammil...@gmail.com> wrote: > You got one too. > > oh wait... they're not invitations... > just nominations > anyway, i'm sure you still want one :) > and i'm giving them > > > > On Thu, Oct 15, 2009 at 10:49 PM, Kenneth Adam Miller < > kennethadammil...@gmail.com> wrote: > >> ok you got it >> add me to your wave. We'll work together >> >> >> On Thu, Oct 15, 2009 at 10:44 PM, Guru wrote: >> >>> I want it.Thanks very much! >>> >>> On Fri, Oct 16, 2009 at 9:11 AM, Kenneth Adam Miller < >>> kennethadammil...@gmail.com> wrote: >>> >>>> Who wants to be in Google wave? >>>> I have 16 invitations >>>> >>>> >>>> >>> >>> >>> -- >>> Thanks and Regards >>> Gurudutt P.S. >>> >>> >>> >> > > > > -- Chad Fawcett http://twitter.com/chadfawcett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 on ADP1 Force close
See: http://groups.google.com/group/Android-DevPhone-Updating The images on HTC's site are invalid, using test keys, apparently they (JBQ, HTC) are on it, and new images coming soon. On Wed, Sep 30, 2009 at 11:05 PM, otiasj wrote: > > I had the same problem with my Ion, > I had to make a fastboot erase userdata to make it work correctly > > On Oct 1, 11:27 am, 20cents wrote: > > Same problem here... > > Plus the android Market & GTalk apps don't work anymore > > > > Thanks for any help or info > > > > On Sep 30, 8:16 pm, babaroga_srb wrote: > > > > > Hello everyone! > > > > > I have just updated my ADP1 to the latest 1.6 version. During > > > installation everything went ok. But every time when my phone boots i > > > receive Force Close error regardin Google Partner Setup (process > > > com.google.android.partnersetup). Could someon please tell me what is > > > this about? > > > > > Best regards, > > > Sava > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Bug, voicemail setting reset at boot
Hi all. I prefer to use a different voicemail system than the one provided by my carrier, one I have been using for a few years. (If you care: It uses GSM redirects to make some class of incoming calls forwarded to a particilar number. I use Youmail.) Anyway, the upshot is that the number I want dialed at long-click '1' in the dialer is not the same as what the phone came with. I set the new number in the phone settings, and all is well until next boot. Then it's reset to the default number my carrier suggests/ provides. To recreate: - go to settings, call settings, voicemail. Note your voicmail number. - Change it to '+17142043114'. Save. - Reboot. - Go back to voicemail setting. Note it is back to the original. --- Firmware v1.0 Baseband v62.33.20.08H_1.22.12.29 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---