Re: [android-developers] Advertising opt out
I see this was not only the same discussion, but also the same users: https://groups.google.com/forum/?fromgroups=#!searchin/android-developers/CTR/android-developers/CycndZ5BH1c/1VkYuh4LlCEJ https://groups.google.com/forum/?fromgroups=#%21searchin/android-developers/CTR/android-developers/CycndZ5BH1c/1VkYuh4LlCEJ On 17/09/12 18:18, John Coryat wrote: Many developers force users to purchase something in order to remove advertisements from their apps. While this may seem to be a good revenue model, it tends to annoy and anger users. It has some other serious consequences as well. One of the important metrics in calculating the CPC (Cost per Click) is the CTR (Click Through Rate). A low CTR will also result in a lower CPC. By forcing users to view ads that they will never click on developers actually are lowering their earning potential. One way to raise CPC, CTR and customer satisfaction is to allow users to opt out of advertising without charging them. It's not only good for customer relations but also the bottom line. How many users actually pay to remove ads? It has to be a very low rate compared to the number who are frustrated and annoyed at seeing ads. The good will alone makes this worthwhile. The real benefit is increased CPC and CTR. We've recently implemented AdMob advertising in our main app and have had virtually no complaints at all. A couple of users have missed the several places where we state that Anyone, anytime can opt out of ads and contacted us. When they understand the way we've set it up, universally, the former angry user is now an ecstatic one. In addition, we're seeing excellent CTR and eCPM (effective Cost per thousand). I can't say with impunity that our opt out policy is causing the high eCPM but it probably is helping. Consider free opt out for your advertising supported apps. It's good for everyone. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Advertising opt out
What has no sense at all is to say that the higher the CTR, the higher the income. Please, let me quote myself on this very same subject on the third of July: You get income for each click, whatever the CTR is. Please, bear in mind that the CTR is the resulting proportion of dividing clicks by impressions, not the other way. In other words: if your clicks worths one cent each one, with 1000 clicks you will get 10 dollars, and it does not matter if the CTR, that may vary with the number of impressions, is 1% or 2%. You can be sure that you will get more revenue with 100 clicks on 1 impresions (CTR=1%) than with 10 clicks on 100 (CTR=10%). And answering to your question, the only thing that it is SURE is that if you do not show the ads to these users, they will not click on them. That's really a fact. But it is not sure that people who opt out were never going to click on your ads anyway. On the other hand, what do you actually win for putting such option in your app? Having users that will give you 0 income installing your application does seem to be a big deal, indeed... Best regards, On 18/09/12 03:36, Kristopher Micinski wrote: why is that? I think it might be plausible to think that people who opt out were never going to click on your ads anyway... kris On Mon, Sep 17, 2012 at 9:25 PM, Francisco Marzoa fmmar...@gmail.com wrote: I have read this before, and it has the same sense: none. On Sep 17, 2012 6:20 PM, John Coryat cor...@gmail.com wrote: Many developers force users to purchase something in order to remove advertisements from their apps. While this may seem to be a good revenue model, it tends to annoy and anger users. It has some other serious consequences as well. One of the important metrics in calculating the CPC (Cost per Click) is the CTR (Click Through Rate). A low CTR will also result in a lower CPC. By forcing users to view ads that they will never click on developers actually are lowering their earning potential. One way to raise CPC, CTR and customer satisfaction is to allow users to opt out of advertising without charging them. It's not only good for customer relations but also the bottom line. How many users actually pay to remove ads? It has to be a very low rate compared to the number who are frustrated and annoyed at seeing ads. The good will alone makes this worthwhile. The real benefit is increased CPC and CTR. We've recently implemented AdMob advertising in our main app and have had virtually no complaints at all. A couple of users have missed the several places where we state that Anyone, anytime can opt out of ads and contacted us. When they understand the way we've set it up, universally, the former angry user is now an ecstatic one. In addition, we're seeing excellent CTR and eCPM (effective Cost per thousand). I can't say with impunity that our opt out policy is causing the high eCPM but it probably is helping. Consider free opt out for your advertising supported apps. It's good for everyone. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How to deal with random hangs without stack dump?
Hi there, I am facing some random hangs without neither stack dump or force close message. My app is simply closed without no message about. I am even using critercism for reporting crashes, but in these situations there is even no report. My guess is that something is crashing below Dalvik, at native level, so the VM has no chance to handle it. I have been able to reproduce these on my SGS2, but could not get any valuable information about. It occurs randomly, though I suspect of SoundPool. I have been able to run the app for more than an hour with sound disabled without crashing. But the problem is that after that, I have had it running for more than an hour also with sound enabled... so my theory about soundpool is a bit weak. Anyway it used to crash always when it should make a sound, so I do not discard the problem is still on the SoundPool anyway, but given its own random nature it is very difficult to determine why and thus find a reliable workaround. I am about to fully remove soundpool from my app and use mediaplayer instead to see if there is some improvement, but in any case I rather like to know how other developers deals with these random crashes, and if there is some way of debug them through Eclipse and ADB tools at least to be more closed to the source of the problem. Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to deal with random hangs without stack dump?
Hi there, I am facing some random hangs without neither stack dump or force close message. My app is simply closed without no message about. I am even using critercism for reporting crashes, but in these situations there is even no report. My guess is that something is crashing below Dalvik, at native level, so the VM has no chance to handle it. I have been able to reproduce these on my SGS2, but could not get any valuable information about. It occurs randomly, though I suspect of SoundPool. I have been able to run the app for more than an hour with sound disabled without crashing. But the problem is that after that, I have had it running for more than an hour also with sound enabled... so my theory about soundpool is a bit weak. Anyway it used to crash always when it should make a sound, so I do not discard the problem is still on the SoundPool anyway, but given its own random nature it is very difficult to determine why and thus find a reliable workaround. I am about to fully remove soundpool from my app and use mediaplayer instead to see if there is some improvement, but in any case I rather like to know how other developers deals with these random crashes, and if there is some way of debug them through Eclipse and ADB tools at least to be more closed to the source of the problem. Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Getting android device Information
AFAIK there is no way you could be sure that you are in front of a table or a phone (or a TV). Bear in mind that in the future there may be even other different device types. You better rely on screen density and/or resolution to calculate the font size. That's what I do on my last casual game -still unpublished-. So, if you use a size of 10 for an screen that is 800 pixels height, you may use a size of 20 for an screen that is 1600 pixels height. So you can do something like: realFontSize = (getWindowManager().getDefaultDisplay().getHeight() * 10) / 800 Anyway I think it should be a more straightforward native way to do this in most cases using dp or so, but I am not sure about. Hope a more advanced Android developer could give you a better answer, but in the meantime you can use that code as a workaround. Regards, On 26/07/12 13:07, |-NK-| wrote: Hi I am developing an application that can be used on android phone and tablets. I have a UI on which I need to generate buttons on screen dynamically. I set font size of these buttons to 10 for phone devices, and it looked fine. But when I ran same for Tablet , the font was small and the buttons size too. I am using same class for handling UI on both tablet and phone, but using different layout xml files for tablet and phone. How can I find out which device am I using, so that I can set the button properties depending upon devices. I need to do something similar to this int size; if(device == Tablet) { size = 20; } else if(device == phone) { size = 10; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] mono for android
Hi, When I started Android development, just three months ago, I have more knowledge on C# than in Java -I used Java about more than 15 years ago, while I have been doing things in C# just until one year ago or so-, and given this experience I think that is better to learn Java than trying to use C# for Android development. Best regards, On 26/07/12 10:00, goran gg wrote: I am not familiar with java but c# I track discussion here like silent viewer .It is very interesting. Please, forgive me for question : After years of C# , development mobile software is logical cream (ice cream like Mono 4 ). So using C#, SQL and xaml at same and different environment at the same time is great .Platform is not to mach required unlike Windows Phone. After one mount looking vs 2010 ultimate c# linq XAML and sign keytool,jarsigner.. zipalign superbly problem: required not evolution version for applay on device. whether you use MONO for android ? whether are all use shipped version ? thank for you time . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem getting id of a resource when using a Library project
Hi there, I am facing problems getting the id of a resource by name when using a library project: int resId = context.getResources().getIdentifier(myresname, drawable, net.iberdroid.mygamecore); It seems like this always returns 0 when using the project as a library, but it were working flawlessly while it was an standalone project. net.iberdroid.mygamecore is where those resources resides, and in fact they are there. That code is even executed within the library project package, not from the android project that links it. Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem getting id of a resource when using a Library project
I found a solution, but it is a bit weird and since I use a library for not making repetitive changes on different versions of same game (tipically free and pay versions), also a bit annoying. In this context, net.iberdroid.mygamecore is the Library Project shared by payment and free versions, and net.iberdroid.gamefree and net.iberdroid.gamepro are the Android Projects for free and pay versions of the game. If I change the package name on the previous code by net.iberdroid.gamefree it works fine. But the problem is that that code is within the library, and will be used also by net.iberdroid.gamepro, so putting the package name of the free version will broken the pay one and viceversa. So if I want to still share that code within the library, I will need to get the package name of the project dinamically. So this will do the trick: |public static int getDrawableId(String dname) { String pn = context.getPackageName(); int resId = context.getResources().getIdentifier(dname, drawable, pn); return resId; } | On 24/07/12 12:53, Francisco M. Marzoa Alonso wrote: Hi there, I am facing problems getting the id of a resource by name when using a library project: int resId = context.getResources().getIdentifier(myresname, drawable, net.iberdroid.mygamecore); It seems like this always returns 0 when using the project as a library, but it were working flawlessly while it was an standalone project. net.iberdroid.mygamecore is where those resources resides, and in fact they are there. That code is even executed within the library project package, not from the android project that links it. Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem getting id of a resource when using a Library project
Hi Mark, I did not read your answer, that was the point, but using directly the main project package name creates a new problem. See my other answer for the solution I finally reach. Thank you very much, On 24/07/12 13:06, Mark Murphy wrote: On Tue, Jul 24, 2012 at 6:53 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: I am facing problems getting the id of a resource by name when using a library project: int resId = context.getResources().getIdentifier(myresname, drawable, net.iberdroid.mygamecore); It seems like this always returns 0 when using the project as a library, but it were working flawlessly while it was an standalone project. net.iberdroid.mygamecore is where those resources resides, and in fact they are there. That code is even executed within the library project package, not from the android project that links it. Any ideas? Have you tried using the package name of the main project, instead of the library? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] open database mysql files in android using intent
Explain it better. You didn't even tell where these files are stored or how do you access them. El 19/07/2012 11:09, Laras ervhint.hun...@gmail.com escribió: hi all, i have database and using mysql, in my database i store files, but only the file path, the file it self was moved to the folder i made... my problem in here, i want to open the file (that stored in database) in android using intent, i was trying so long but doesn't get any idea, or site that can help me... anybody can help me...or if my question is too hard to understand, at least reply, so i can explain it for more... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Forcing lower resolution drawables on phones with big screens and small RAM
I used to use BitmapFactory.decodeStream for creating Bitmaps from raw assets. Just guessing, may be you can load each bit map, show it in the fly, and recycle it before loading next one. El 19/07/2012 04:12, Matt Schoen mtsch...@gmail.com escribió: Drat. I was able to get this to work, but now it just always runs out of memory! I guess this method is less memory-efficient? Here's the code being executed: for(int i = 0; i total_animation_length; i++) imageResources[i] = Drawable.createFromResourceStream(context.getResources(), new TypedValue(), context.getAssets().open(flame_high/ + String.format(file_name, i)), test); On Wednesday, July 18, 2012 6:09:46 PM UTC-4, Fran wrote: Use they Assets folder instead. Take a look on AssetManager docs. El 17/07/2012 22:00, Matt Schoen mtsch...@gmail.com escribió: Unfortunately I've already done your last suggestion. The images are pretty small already. I'm still not convinced that the streaming would work. For one thing, the flicker loops, and for another, the range of frames changes quite often. For example: If the phone starts upright, we play images 90, 91, 92, 93, 94, 95, 90, 91... Then, if you til it, it'll be like 90, 91, 92, 80, 81, 82, 60, 61, 62, 40, 41, 120, 121, 140, 141... ^ ^ ^ ^^ The carats signify where the accelerometer value has changed so that the first frame is different. This happens quite frequently (to make for a smooth bend) and is completely unpredictable. As far as I can tell, we'd always get a hiccup when the accelerometer value changed. I'm really hoping that I can do what I was originally asking for. It seems so simple to just force the loading of a different set of drawables. If I wanted to load the images some other way (not through the drawables folder) how could I do that? On Tuesday, July 17, 2012 12:48:48 PM UTC-4, Nobu Games wrote: You still could go with the streaming idea. At any given time you would have a fixed size amount of frames in memory (let's say 15 bitmaps, just as an example). As the animation progresses you need to load the next batch and discard older ones. In order to prevent loading hickups you could proceed as follows: Your window of animation bitmaps has 15 items. As the animation counter reaches item #6 you would recycle the last 5 ones and load the next 5 ones that come after item #15 Loading needs to be done in a background thread (AsyncTask) Of course you'd need to add special logic for your case, like allowing to loop a certain amount of animation frames and starting playback from any point of the sequence and so on. But this could be done with a fixed size window of frames. I think that's the only sane way to do that based on that huge bitmap sequence and you could even adjust the window size according to the available memory. Play around with these numbers in order to get the best result for your animation. By the way, I would just animate the flame itself and use a single, static bitmap for the lighter. That way you could use a low-resolution bitmap sequence of the flame and scale it up on devices with less memory. Lights and shadows could be faked in real time, too, by drawing overlays on the view's canvas. Maybe you can get away with that solution and don't need to implement a streaming technique. On Tuesday, July 17, 2012 9:28:59 AM UTC-5, Matt Schoen wrote: Hey, thanks for the reply. I guess I should have explained more clearly. This is a lighter type animation, which responds to accelerometer input. The flame flickers (plays from a start frame on a short loop) and when you tilt the phone, the start frame is swept through an animation of the flame bending from one side to another. Because of this, I'm not sure I could really stream anything since I might need any one frame of the animation at any point. It just occurred to me that maybe I could store only half the frames and flip them in software (currently the flip is just rendered into the animation). This is why I'm just using a big image sequence (about 150 frames) as drawables. Any advice? On Saturday, July 14, 2012 12:26:13 PM UTC-4, Nobu Games wrote: How many items are in your animation list? If it is really, really huge I'd add some streaming logic to your animation player, so older frames get recycled while future frames are loaded in the background. That way you have absolute control over a moving window of frames and you could size that window according to the available amount of free memory. You wouldn't risk OOM crashes on any device with that technique. Alternatively you could create a video based on your frames and play that one back instead. On Friday, July 13, 2012 10:54:46 PM UTC-5, Matt Schoen wrote: Hey there, I've tried to find info on this, but it seems like a pretty esoteric case. I'll admit that I'm probably completely off-base to start, but the app is 99%
Re: [android-developers] Is possible to change required features once the apk was published?
I assume you are talking about Google Play, and what you mean is that in your AndroidManifest.xml file you put wrong requirements. In that case, I am afraid you need to publish a new version of your apk file with those requirements corrected, because Google Play gets those from the apk itself and there is no way you can change the uploaded apk contents. Usually your users will be either updated automatically if they choose it when they installed the application before, or notified about the existing update so they can decide whether to update to the new version. Regards, On 19/07/12 09:55, geoslab wrote: I made a mistake while selecting the required features of my app in my Developer Console. The consequence is that some devices are not supported now. Is possible to change required features once the apk was published? Obviously, I wouldn't want generate a new version that would force users to download it. Thanks! Juan. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Someone stole my sound effects
Well, if it were so easy the other guy could have recorded them by himself instead of stole others work. It depends on which birds and where. Is also rather difficult to find the place and time to record some of them and also avoiding other noises. I would complain to Google at least. It is free. El 18/07/2012 23:37, bob b...@coolfone.comze.com escribió: I would say don't do anything. The fact is there are birds outside giving away sounds for free. It's time to find a new niche. On Wednesday, June 27, 2012 1:18:40 AM UTC-5, kekzilla wrote: Sorry if this isn't the right spot. I have an app on the market place (currently #1) it is a collection of bird sounds. About half of them are mine and half are public domain. There's a new app on the market that is in 3rd place. The guy basically took my apk file and took the sounds out and put them in his. I don't care about the public domain sounds, but the others I spent a while creating. This isn't big time, but it is annoying. I was under the impression that the work becomes copyright when it is created, but I have no proof that I made any of them except that my app has been up since Feb. and his just came up this month. Can I do anything? I thought about filling out the google trademark form but I have no proof except my app is older. Anyone have experience with this? or should I just forget about it. I'm looking for a way to prevent him from stealing any new sounds I create, but I am still new to app creation/programming. 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sqlite database growing
Afaik there is no explicit limit, so it can grow while there is space on the device. El 19/07/2012 11:09, Atul Darne atulmaharash...@gmail.com escribió: Hi, I have an app, which stores its data to sqlite db, and it keeps growing as i insert records, i would like to know how much is the max limit for which i can use db ? is size will matter? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android Development Issues
You will have better chance of getting an useful answer on that issue in Eclipse ADT forum. El 19/07/2012 11:09, Riftwalker ercf...@gmail.com escribió: Hello, I have been trying to get into android development and I have experience programming with Java, so it's not too beyond what I already know. The issues I'm having are with getting Eclipse to work correctly for me. I installed all the necessary android additions to eclipse and downloaded the sdk etc just like every tutorial says. However, whenever I try to create a project, eclipse seems to be adding extra files that make it so I can never get the application, even the simple Hello Android style ones to work on an emulator. And when I try to simply import a completed project, a lot of times it won't run on an emulator and I can never get the project exported with a signature to see if I could transfer it to an extra android phone I have that I was planning on using for application development. My computer I am attempting this on is a macbook pro running OS X 10.6.8. Does anyone have any suggestions on anything? Every tutorial I look at (and I've looked at many) and attempt, ends up not working and I follow every step just as they say. It's really frustrating to try to get into android programming and not even get the simple Hello World style of program to work. 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Forcing lower resolution drawables on phones with big screens and small RAM
Use they Assets folder instead. Take a look on AssetManager docs. El 17/07/2012 22:00, Matt Schoen mtsch...@gmail.com escribió: Unfortunately I've already done your last suggestion. The images are pretty small already. I'm still not convinced that the streaming would work. For one thing, the flicker loops, and for another, the range of frames changes quite often. For example: If the phone starts upright, we play images 90, 91, 92, 93, 94, 95, 90, 91... Then, if you til it, it'll be like 90, 91, 92, 80, 81, 82, 60, 61, 62, 40, 41, 120, 121, 140, 141... ^ ^ ^ ^^ The carats signify where the accelerometer value has changed so that the first frame is different. This happens quite frequently (to make for a smooth bend) and is completely unpredictable. As far as I can tell, we'd always get a hiccup when the accelerometer value changed. I'm really hoping that I can do what I was originally asking for. It seems so simple to just force the loading of a different set of drawables. If I wanted to load the images some other way (not through the drawables folder) how could I do that? On Tuesday, July 17, 2012 12:48:48 PM UTC-4, Nobu Games wrote: You still could go with the streaming idea. At any given time you would have a fixed size amount of frames in memory (let's say 15 bitmaps, just as an example). As the animation progresses you need to load the next batch and discard older ones. In order to prevent loading hickups you could proceed as follows: - Your window of animation bitmaps has 15 items. - As the animation counter reaches item #6 you would recycle the last 5 ones and load the next 5 ones that come after item #15 - Loading needs to be done in a background thread (AsyncTask) Of course you'd need to add special logic for your case, like allowing to loop a certain amount of animation frames and starting playback from any point of the sequence and so on. But this could be done with a fixed size window of frames. I think that's the only sane way to do that based on that huge bitmap sequence and you could even adjust the window size according to the available memory. Play around with these numbers in order to get the best result for your animation. By the way, I would just animate the flame itself and use a single, static bitmap for the lighter. That way you could use a low-resolution bitmap sequence of the flame and scale it up on devices with less memory. Lights and shadows could be faked in real time, too, by drawing overlays on the view's canvas. Maybe you can get away with that solution and don't need to implement a streaming technique. On Tuesday, July 17, 2012 9:28:59 AM UTC-5, Matt Schoen wrote: Hey, thanks for the reply. I guess I should have explained more clearly. This is a lighter type animation, which responds to accelerometer input. The flame flickers (plays from a start frame on a short loop) and when you tilt the phone, the start frame is swept through an animation of the flame bending from one side to another. Because of this, I'm not sure I could really stream anything since I might need any one frame of the animation at any point. It just occurred to me that maybe I could store only half the frames and flip them in software (currently the flip is just rendered into the animation). This is why I'm just using a big image sequence (about 150 frames) as drawables. Any advice? On Saturday, July 14, 2012 12:26:13 PM UTC-4, Nobu Games wrote: How many items are in your animation list? If it is really, really huge I'd add some streaming logic to your animation player, so older frames get recycled while future frames are loaded in the background. That way you have absolute control over a moving window of frames and you could size that window according to the available amount of free memory. You wouldn't risk OOM crashes on any device with that technique. Alternatively you could create a video based on your frames and play that one back instead. On Friday, July 13, 2012 10:54:46 PM UTC-5, Matt Schoen wrote: Hey there, I've tried to find info on this, but it seems like a pretty esoteric case. I'll admit that I'm probably completely off-base to start, but the app is 99% done, so I'd rather not change my implementation from it's current state. I have an animation that I'm using a big list of drawables to display, and while it works fine on phones with enough RAM, I get VM out of memory crashes on devices with basically 512 MB RAM and below. I've found the getMemoryClass() function, which seems to report 32 for a device with 512MB. I tried overriding the density value, which successfully avoided the crash, but also resized my whole view! All I want is to be able to programmatically tell the view framework to default to the low-res images. Is this possible? On Tuesday,
Re: [android-developers] File location of database file by using SQLiteDatabase
These are under /data/db/packagename or something similar. You cannot access to database files straightforward on a real device if it is not chrooted. On Jul 16, 2012 2:53 PM, Alok Yadav er.al...@gmail.com wrote: Hi All, In SQLiteDatabase, Table and its rows and columns are saved in a file. i want to know the location that database file in which inserted new record and updated new record saved. Pls suggest me the location of that file as i want to see my data in that file. 1) If i am using my app in Emulator. 2) If i am using my app in Android mobile where i have only .apk file of my app. 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Handling Bitmap Out of Memory Error
GC does NOT take care of recycling Bitmaps, so the answer is that YOU should do that. On Jul 17, 2012 9:16 AM, B.Arunkumar awsnetworkrecor...@gmail.com wrote: Hi, We are using 640*480 resolution video frames with frame rate of 10 frames/sec. Another question related to bitmaps is do we really need to recycle bitmaps or can we assume that the Garbage Collector would take care of disposing bitmaps? Thank you, B.Arunkumar On Jul 17, 6:49 am, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Hi, I bet that Motorola has android 2.1 or 2.1.-update1 I'm fed up of OOM problems with these, and have not found a solution after lot of tries, including changing several bitmaps by graphic primitives drawn on the fly to use less memory, so I just assumed that there is something I must live with. On the other hand, at least in my cases and I think in most of the cases, if you cannot load these bitmaps your application cannot work properly, so there is no way of handling such situation that may be better than the crash itself. Anyway your bitmap seems to be too big. What resolution are you using? SGSII has 800x480 pixels, that means that you need about to 1536000 bytes for storing a full screen bitmap as ARGB_, but you are requesting more than the double, a waste of space. And if you are doing the same with several bitmaps, it is A LOT of wasted memory. Regards, On 16/07/12 14:23,B.Arunkumarwrote: Hi, We have an app which renders bitmaps on imageview. On Samsung Galaxy, it works fine. But On Motorola Droid, it runs into memory issues and crashes every now and then with the following logcat. /dalvikvm-heap( 3640): 3686400-byte external allocation too large for this process. E/GraphicsJNI( 3640): VM won't let us allocate 3686400 bytes W/dalvikvm( 3640): threadid=11: thread exiting with uncaught exception (group=0x4001d7e0) E/AndroidRuntime( 3640): FATAL EXCEPTION: Thread-25 E/AndroidRuntime( 3640): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 3640): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 3640): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTPClient.ProcessFrame(RTPClient.java:419) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTPClient.ProcessRtpVideoPacket(RTPClient.java: 204) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.AdvanceProcess(RTSPUDPclient.java: 659) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.processSelectionKey(RTSPUDPclient.java: 726) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.run(RTSPUDPclient.java:2068) E/AndroidRuntime( 3640): at java.lang.Thread.run(Thread.java:1096) W/ActivityManager( 1081): Force finishing activity com.example.OnVRViewer/.AsyncRecordTrial My question is even though we have a try catch on Bitmap.createBitmap it is still crashing. Why is the catch block not working? And how do we handle the exception without crashing on Motorola Droid. Following is my code right now: try { bm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_); } catch (Exception ex) { android.util.Log.e(Bitmap, Error); } Thank you, B.Arunkumar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] session mangement
Go to your bank, withdraw about $3000 and use them top pay someone that actually know how to do that work. On Jul 16, 2012 10:35 AM, laxman k laxman.k1...@gmail.com wrote: how to mange session..plz tell m. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Audio Stream buffers within 8 secs on Emulator but takes almost 50 secs to buffer on a Phone
Look for related messages on Logcat. On Jul 17, 2012 8:51 AM, Zoheb Rahman zoh...@gmail.com wrote: On Monday, July 16, 2012 11:00:07 AM UTC+5:30, Zoheb Rahman wrote: I have tried the code on the emulator using Platform 2.2 API level 8 as well as an Emulator using Platform 4.0.3 using API level 15 .. it works perfectly and starts the stream in about 5 secs. But when i run the code on my HTC one x (Android Version 4.0.3)or tried running it on the HTC Desire S(Android Version 2.3.5) it takes over 50 secs to stream Here is my code public static MediaPlayer mp; public String url = http://vprbbc.streamguys.net:**80/vprbbc24.mp3 http://vprbbc.streamguys.net:80/vprbbc24.mp3; public void onCreate(Bundle savedInstanceState) { mp = new MediaPlayer(); try { mp.setDataSource(url); mp.setOnErrorListener(this); mp.setOnPreparedListener(this)**; mp.prepareAsync(); } catch(IOException e){ e.printStackTrace(); } } // close of onCreate public void onPrepared(MediaPlayer player) { mp.start(); There is no issue with the internet connection. Both the phone and the emulator are connected to the same internet connection. I have also tried running the code on a samsung tab and the streams starts up in roughly 6 secs. Tried running this on several android phones yesterday, samsung, HTC and sony ericsson take between 50 to 80 secs to start playing. The samsung tab is the GT-P1000 that runs android 2.2 only this one device seems to play the stream fast enough -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Handling Bitmap Out of Memory Error
:-X On Jul 17, 2012 10:29 AM, Ralph Bergmann | the4thFloor.eu ra...@the4thfloor.eu wrote: Am 17.07.12 09:22, schrieb Francisco M. Marzoa Alonso: GC does NOT take care of recycling Bitmaps, so the answer is that YOU should do that. public void recycle () ... This is an advanced call, and normally need not be called, since the normal GC process will free up this memory when there are no more references to this bitmap. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Run application with system / root permissions.
You simply cannot do that without a chrooted device. Each app runs within its own sandbox and one application cannot do nothing on other app. On Jul 14, 2012 8:32 PM, Jordi Sayeras jsayer...@gmail.com wrote: Hi, I've been searching about this topic but I haven't found a clear solution yet. As far as I know, you can specify different *protectionLevel* in your *AndroidManifest.xml*, those permissions allow other applications to interact with the one you are developing. As an example, imagine that I want to kill a processes, that is not mine (from another package) or that I want to install a driver I've developed. In both cases the problem is the same, those things need to be run as a system / root. How can I develop programs that require system / root permissions, do I need an special license? *Note:* Please, note that granting the permission: *uses-permission android:name=android.permission.KILL_BACKGROUND_PROCESSES/* Using *android:sharedUserId=android.uid.system* does not work either. Also, consider that I cannot ask the users to have their mobiles rooted. Thanks in advance. Jordi. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Run application with system / root permissions.
s/chrooted/rooted/g On Jul 17, 2012 3:12 PM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: You simply cannot do that without a chrooted device. Each app runs within its own sandbox and one application cannot do nothing on other app. On Jul 14, 2012 8:32 PM, Jordi Sayeras jsayer...@gmail.com wrote: Hi, I've been searching about this topic but I haven't found a clear solution yet. As far as I know, you can specify different *protectionLevel* in your *AndroidManifest.xml*, those permissions allow other applications to interact with the one you are developing. As an example, imagine that I want to kill a processes, that is not mine (from another package) or that I want to install a driver I've developed. In both cases the problem is the same, those things need to be run as a system / root. How can I develop programs that require system / root permissions, do I need an special license? *Note:* Please, note that granting the permission: *uses-permission android:name=android.permission.KILL_BACKGROUND_PROCESSES/* Using *android:sharedUserId=android.uid.system* does not work either. Also, consider that I cannot ask the users to have their mobiles rooted. Thanks in advance. Jordi. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Forcing lower resolution drawables on phones with big screens and small RAM
Maybe I'm wrong, but I think he pointed that the frame sequence depends on user input, so he cannot preload a series of frames because each next frame varies with user interaction on previous one. On Jul 17, 2012 6:51 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: You still could go with the streaming idea. At any given time you would have a fixed size amount of frames in memory (let's say 15 bitmaps, just as an example). As the animation progresses you need to load the next batch and discard older ones. In order to prevent loading hickups you could proceed as follows: - Your window of animation bitmaps has 15 items. - As the animation counter reaches item #6 you would recycle the last 5 ones and load the next 5 ones that come after item #15 - Loading needs to be done in a background thread (AsyncTask) Of course you'd need to add special logic for your case, like allowing to loop a certain amount of animation frames and starting playback from any point of the sequence and so on. But this could be done with a fixed size window of frames. I think that's the only sane way to do that based on that huge bitmap sequence and you could even adjust the window size according to the available memory. Play around with these numbers in order to get the best result for your animation. By the way, I would just animate the flame itself and use a single, static bitmap for the lighter. That way you could use a low-resolution bitmap sequence of the flame and scale it up on devices with less memory. Lights and shadows could be faked in real time, too, by drawing overlays on the view's canvas. Maybe you can get away with that solution and don't need to implement a streaming technique. On Tuesday, July 17, 2012 9:28:59 AM UTC-5, Matt Schoen wrote: Hey, thanks for the reply. I guess I should have explained more clearly. This is a lighter type animation, which responds to accelerometer input. The flame flickers (plays from a start frame on a short loop) and when you tilt the phone, the start frame is swept through an animation of the flame bending from one side to another. Because of this, I'm not sure I could really stream anything since I might need any one frame of the animation at any point. It just occurred to me that maybe I could store only half the frames and flip them in software (currently the flip is just rendered into the animation). This is why I'm just using a big image sequence (about 150 frames) as drawables. Any advice? On Saturday, July 14, 2012 12:26:13 PM UTC-4, Nobu Games wrote: How many items are in your animation list? If it is really, really huge I'd add some streaming logic to your animation player, so older frames get recycled while future frames are loaded in the background. That way you have absolute control over a moving window of frames and you could size that window according to the available amount of free memory. You wouldn't risk OOM crashes on any device with that technique. Alternatively you could create a video based on your frames and play that one back instead. On Friday, July 13, 2012 10:54:46 PM UTC-5, Matt Schoen wrote: Hey there, I've tried to find info on this, but it seems like a pretty esoteric case. I'll admit that I'm probably completely off-base to start, but the app is 99% done, so I'd rather not change my implementation from it's current state. I have an animation that I'm using a big list of drawables to display, and while it works fine on phones with enough RAM, I get VM out of memory crashes on devices with basically 512 MB RAM and below. I've found the getMemoryClass() function, which seems to report 32 for a device with 512MB. I tried overriding the density value, which successfully avoided the crash, but also resized my whole view! All I want is to be able to programmatically tell the view framework to default to the low-res images. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Forcing lower resolution drawables on phones with big screens and small RAM
Yes, it is possible since AFAIK you can access diretly to any resource by itself path, instead of using th resource id. I am connected through my phone now and have no time to find the exact method, but googling a bit you should find it fast, probably on Stackoverflow and/or Android development docs. On Jul 14, 2012 5:57 AM, Matt Schoen mtsch...@gmail.com wrote: Hey there, I've tried to find info on this, but it seems like a pretty esoteric case. I'll admit that I'm probably completely off-base to start, but the app is 99% done, so I'd rather not change my implementation from it's current state. I have an animation that I'm using a big list of drawables to display, and while it works fine on phones with enough RAM, I get VM out of memory crashes on devices with basically 512 MB RAM and below. I've found the getMemoryClass() function, which seems to report 32 for a device with 512MB. I tried overriding the density value, which successfully avoided the crash, but also resized my whole view! All I want is to be able to programmatically tell the view framework to default to the low-res images. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Jelly Bean Crash with Bitmap Recycle Sorry, an error has occurred: bitmap is recycled
I have had the same problem with some devices, but I did not study the case in deep, just applied this workaround directly: if ( ! oldBitmap.isRecycled()) oldBitmap.recycle(); It may be faster than comparing one bitmap to another, but to be honest I did not try the other method. Regards, On 13/07/12 15:42, Craigo wrote: Hi Google, My app that has been running for over 2 years without an update, finally broke with Jelly Bean. The error: Sorry, an error has occurred: bitmap is recycled. The problem was with calling recycle on a bitmap: Bitmap bitmapOld = bitmap; bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, false); bitmapOld.recycle(); Note: I never referenced bitmapOld again. The fix was easy, I just don't recycle any more. However, it seems odd that this would have broken. Maybe creating the scaled bitmap shares memory with the unscaled bitmap? Anyway, hopefully this information is useful to someone. Cheers, and keep up the excellent work! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Your Registration to Google Play is still being processed.
Hi, 24 hours ago were weekend... give it some more time. And if you think 24 hours is too much, do not even try Amazon market, you can be waiting for WEEKS for a single app approval. Regards, On 16/07/12 08:20, elirev4 wrote: I registered to the Google Play Developers 24 hours ago and this message Your Registration to Google Play is still being processed. is still there... How much time will I have to wait for Google to approve my account? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Alternative ad provider to Admob
http://lmgtfy.com/?q=admob+alternatives On 14/07/12 04:20, Zaid wrote: I am looking for an alternative ad provider for android, i am currently using admob banner ads for my android applications. i know this question has been asked before, but there are many new ad networks popping up and i would like some up to date answers. i am looking for banner ads,preferably something as easy to integrate as AdMob. any suggestions for ad providers? 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
Re: [android-developers] Tip: don't load PNGs with transparency using RGB_565 in Jelly Bean
ARGB_ is discouraged in google development docs as it produces very poor quality with some bitmaps. And I have checked that it is true. If you have a bitmap with a gradient or something similar, it will look really crappy with ARGB_. On 16/07/12 12:37, String wrote: Okay, I'll say right up front, there's no good reason why you should be doing this. If your PNG has an alpha-channel, what are you doing loading it using a config that doesn't support it? Nonetheless, I was doing this in one of my apps; the PNGs had transparency for historical reasons, but I'd been loading them using RGB_565 to save memory (the loss in quality wasn't important in this case). And prior to Jelly Bean, this worked fine, but in 4.1 it failed silently. It appeared to work, but the resultant bitmap was unusable; saving it to SD for debugging yielded a 0-length file. The solution is simple: either remove the alpha-channel from your PNG, or load it with a different Config, one that supports transparency. If you can spare the RAM, ARGB_ is generally the best choice (see https://plus.google.com/u/0/111962077049890418486/posts/Ytar76F56y5). Or if memory's tight, ARGB_ will still work, and uses the same 16bytes/pixel as RGB_565. 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
Re: [android-developers] Handling Bitmap Out of Memory Error
Hi, I bet that Motorola has android 2.1 or 2.1.-update1 I'm fed up of OOM problems with these, and have not found a solution after lot of tries, including changing several bitmaps by graphic primitives drawn on the fly to use less memory, so I just assumed that there is something I must live with. On the other hand, at least in my cases and I think in most of the cases, if you cannot load these bitmaps your application cannot work properly, so there is no way of handling such situation that may be better than the crash itself. Anyway your bitmap seems to be too big. What resolution are you using? SGSII has 800x480 pixels, that means that you need about to 1536000 bytes for storing a full screen bitmap as ARGB_, but you are requesting more than the double, a waste of space. And if you are doing the same with several bitmaps, it is A LOT of wasted memory. Regards, On 16/07/12 14:23, B.Arunkumar wrote: Hi, We have an app which renders bitmaps on imageview. On Samsung Galaxy, it works fine. But On Motorola Droid, it runs into memory issues and crashes every now and then with the following logcat. /dalvikvm-heap( 3640): 3686400-byte external allocation too large for this process. E/GraphicsJNI( 3640): VM won't let us allocate 3686400 bytes W/dalvikvm( 3640): threadid=11: thread exiting with uncaught exception (group=0x4001d7e0) E/AndroidRuntime( 3640): FATAL EXCEPTION: Thread-25 E/AndroidRuntime( 3640): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 3640): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 3640): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTPClient.ProcessFrame(RTPClient.java:419) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTPClient.ProcessRtpVideoPacket(RTPClient.java: 204) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.AdvanceProcess(RTSPUDPclient.java: 659) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.processSelectionKey(RTSPUDPclient.java: 726) E/AndroidRuntime( 3640): at com.example.OnVRViewer.RTSPUDPclient.run(RTSPUDPclient.java:2068) E/AndroidRuntime( 3640): at java.lang.Thread.run(Thread.java:1096) W/ActivityManager( 1081): Force finishing activity com.example.OnVRViewer/.AsyncRecordTrial My question is even though we have a try catch on Bitmap.createBitmap it is still crashing. Why is the catch block not working? And how do we handle the exception without crashing on Motorola Droid. Following is my code right now: try { bm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_); } catch (Exception ex) { android.util.Log.e(Bitmap, Error); } Thank you, B.Arunkumar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Facebook clipping my share text
Hi there, I am adding social sharing of highscores to my app. It works fine on Google+, but when sharing in facebook the text is clipped, showing only the link to the application and the text it gathers from google play, and also an image icon that has nothing to see with my app but it is also gathered by Facebook from google play due the application link. This is the text I send as defined on strings.xml resouce, for l10n: string name=game_sharing_score formatted=false My new High Score on Gamename: %d\n Sure you cannot beat me! :-P\n\n If you have an Android phone or tablet, you can download Gamename from here:\n https://play.google.com/store/apps/details?id=gamepackage /string (I have changed real game name and package by Gamename and gampackage in this message. Of course in the app the values are the actual ones). The code for sharing is the following one: String shareScoreMsg = String.format(context.getString(R.string.game_sharing_score), highestScore); Intent shareScoreInt = new Intent(Intent.ACTION_SEND); shareScoreInt.setType(text/plain); shareScoreInt.putExtra(Intent.EXTRA_TEXT, shareScoreMsg); game.startActivity(Intent.createChooser(shareScoreInt, context.getString(R.string.game_sharing_score_title))); game is an Activity descendant instance, and context is the application context, and the resource string game_sharing_score_title is just a title for the activity that says Share your score. Anyway everything works fine with the code, the problem seems to be with facebook itself, that although it receives the whole text, it just shares the last link to Google Play. Does someone knows any workaround for this issue? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Facebook clipping my share text
JFTR I also tested with WhatsUp and it works fine also with this service, so it is pretty clear that the problem is just with FaceBook. On 15/07/12 14:07, Francisco M. Marzoa Alonso wrote: Hi there, I am adding social sharing of highscores to my app. It works fine on Google+, but when sharing in facebook the text is clipped, showing only the link to the application and the text it gathers from google play, and also an image icon that has nothing to see with my app but it is also gathered by Facebook from google play due the application link. This is the text I send as defined on strings.xml resouce, for l10n: string name=game_sharing_score formatted=false My new High Score on Gamename: %d\n Sure you cannot beat me! :-P\n\n If you have an Android phone or tablet, you can download Gamename from here:\n https://play.google.com/store/apps/details?id=gamepackage /string (I have changed real game name and package by Gamename and gampackage in this message. Of course in the app the values are the actual ones). The code for sharing is the following one: String shareScoreMsg = String.format(context.getString(R.string.game_sharing_score), highestScore); Intent shareScoreInt = new Intent(Intent.ACTION_SEND); shareScoreInt.setType(text/plain); shareScoreInt.putExtra(Intent.EXTRA_TEXT, shareScoreMsg); game.startActivity(Intent.createChooser(shareScoreInt, context.getString(R.string.game_sharing_score_title))); game is an Activity descendant instance, and context is the application context, and the resource string game_sharing_score_title is just a title for the activity that says Share your score. Anyway everything works fine with the code, the problem seems to be with facebook itself, that although it receives the whole text, it just shares the last link to Google Play. Does someone knows any workaround for this issue? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Facebook clipping my share text
This seems to be a recurrent problem with Facebook. I have found a lot of messages of people that can share links but not text through a SEND_ACTION intent. And some of those messages are older than one year... it seems like FB guys are not very interested on its Android app. It's a pitty. Something that could be so easy and, in fact, it is really easy for Twitter, Google+, WhatsUp, etc... becomes a lot more complicated due FB s*ckers. :-| -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: MediaPlayer.isPlaying() question
He didn't tell that, so... On Jul 10, 2012 7:50 PM, Innovation1 john.warm...@gmail.com wrote: That doesn't answer the question. If isPlaying() returns false, all that says is the media player is currently stopped or paused, it does not tell you that the player IS actually paused. On Monday, 14 March 2011 03:31:38 UTC-4, Krzysztof Majkowski wrote: From documentation: Returns true if currently playing, false otherwise So, when player is paused method is playing will return false. On 13 Mar, 19:25, Ken H hunt1...@gmail.com wrote: Will android.media.MediaPlayer.**isPlaying() return true if the MediaPlayer is paused? Ken -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: MediaPlayer.isPlaying() question
Btw, the question in this thread was if isPlaying could return true on pause, so I couldn't imagine a better answer. Apart from No, of course. On Jul 10, 2012 7:50 PM, Innovation1 john.warm...@gmail.com wrote: That doesn't answer the question. If isPlaying() returns false, all that says is the media player is currently stopped or paused, it does not tell you that the player IS actually paused. On Monday, 14 March 2011 03:31:38 UTC-4, Krzysztof Majkowski wrote: From documentation: Returns true if currently playing, false otherwise So, when player is paused method is playing will return false. On 13 Mar, 19:25, Ken H hunt1...@gmail.com wrote: Will android.media.MediaPlayer.**isPlaying() return true if the MediaPlayer is paused? Ken -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android ADT r20 Bug with Eclipse
Its clearly a bug on last ADT update. You can safely remove those error messages either from the Problems view, or clicking on one with right button and selecting Clear lint messages. It is a bit annoying, but a reasonable workaround while they release a fixed version. On Jul 13, 2012 2:28 AM, Rafael Timmerberg raf...@googlemail.com wrote: Since the latest ADT update I have issues with Errors raised from Eclipse, although they are fixed and saved like this: Syntax error, insert ; to complete Statement. Usually I have to clean the Project or Cut the whole function to paste it again to get that error resolved. Has someone an idea, what is causing this issue? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] newbie question
R is an autogenerated class. You should have a gen folder inmediatly below your project, and an R.java file there below your project's package name. If the file is not being generated, may be there is some other problem with your installation. Google for R cannot be resolved into a variable, there is a lot of answers on stackoverflow from people with similar issues. Maybe someone can fit your problem. Regards, On 11/07/12 13:43, ideaman wrote: Hi, I have installed Eclipse Juno 4.2 the Android SDK the Eclipse plugin and have Java 7 update 3 and Java 6 update 30 Everything seems ok, besides one small problem, it doesn't work. I create a new Android project and then I have the following errors: on the Android Manifest.xml I have 2 of these errors: com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\Daniel\workspace\Talk1\AndroidManifest.xml: The markup in the document following the root element must be well-formed. on the mainActivity .java I have the following error: in this line = setContentView(R.layout.activity_main); I see on the side R cannot be resolved into a variable. This happens immediately after the wizard finishes, I didn't have the chance to make any changes or write a line of code and I already have errors that I don't know how to solve. Please HELP!! Daniel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] connectivity of android appliacation with sqllite
On 02/07/12 13:34, Ashu wrote: can we connect a android application to sqlite database just like a connectivity of mysql to java code,, No plz help me ,i am new to android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Some Silly error, tailed with a huge headache.
On 11/07/12 21:37, Cythes wrote: For some reason eclipse thinks the ()'s are wrong. Here is the code for that part... notifyDetails.setLatestEvent(Infocontext, contentTitle, contentText, intent); mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails); Any idea what can be causing this? Yeah! I am pretty sure that it is the phantom syntax errors that comes with a recent ADT update. http://www.eclipse.org/forums/index.php/m/893850/ The solution is pretty straightforward: open the Problems view, select these errors and remove them. You can send a bug report wherever it should be sent or do as I, the lazy way, and wait for someone to report it and some other to solve it... :-D Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] building a Dictionary....need help
So, as far as I have understood you want that some other do your work for free, and then you get the money. Hmmm... Each one takes 50% of the effort. A fair trade, indeed... If you find someone so stupid let me know, please. I have a lot of work on my TODO list that I have not been able to do due lack of time, but I have a bag full of thanksful stuff to pay developers. Regards, On 02/07/12 11:47, formatXX wrote: *hi brothers im new to android developing and i have some basic java information and coding.not so much so now i decided to create a Dictionery for Android but i have a probelm is i dont know how to create the Databse (table )for it i mean for words and Search i know create and coding for the UI and menus...etc but im stopped in the Data base for itcan some one Create a Database for me i want put it more than 8 words from En lang translator to 5 langs.please some one if have free time create for me the Database it wilb be very good for me and i be so thanksful * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Tools for porting MFC code
On 12/07/12 10:01, MMM wrote: It means I can not port my MFC code. Only the solution is I need to rewrite the code for android? YES -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)
I experimented same issue using Crittercism, that I rather liked to use that permission for debugging crashes. After seeing that it was not working, I simply desist and rely on other debugging information. I was not sure if the fail was on Android side or Crittercism one, but reading your message and other replies to it, it seems like it is on Android side. Regards, On 08/07/12 21:26, Ievgenii Nazaruk wrote: Hi all, I've been working on an application for developers that uses DropBoxManager. The DropBoxManager requires READ_LOGS permission to be granted in order to query information from it. Today I've tested my application on newest (api 16) emulator before releasing it to Google Play. It turned out that Android now refuses to grant this permission to 3rd party applications. This is weird because I've looked through all Jelly Bean's documented changes and couldn't find anything that mentions READ_LOGS permission. So basically my questions: - Did anyone see this change documented? - Can someone confirm this behavior on Galaxy Nexus with Jelly Bean on it (the one released to attendees of Google I/O)? And questions to someone from Android team: - Why this breaking change wasn't described in documentations like READ_EXTERNAL_STORAGEhttp://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGEwas? - What should developers and testers do in order to use those handy utility applications that require READ_LOGS to be useful? Is there any way to allow READ_LOGS to 3rd party applications without making custom build (i.e. something in Developer Options that I could've missed)? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Localization support of messages coming from server
Probably the best way is to do l10n in the server side also as Justin suggest. But if you can't, you may try another approach if messages from server are limited and has no variable parameters, using a HashMapString, Integer so each server string message is mapped to a resource id. But note this solution is not valid if the server sends strings with variable parameters such as you have run 11 miles where them number of miles may vary. You can still handle these cases using regular expresions but it gets more complicated, so if you have control over the server the real solution is, as told, implement l10n also on it. El 11/07/2012 12:45, Reddy devireddy@gmail.com escribió: Hi All, I am creating an application which supports multiple languages. Everything is fine for static string data. But how can i handle the messages coming from server to display in corresponding language. Regards, Murali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Storing downloaded files into local db??
I agree with Kaiser. Better to store those files outside, in the SDCard for example, and save only file path and metadata in the DB. I have done things like that on them past with PostgreSQL and MySQL and I do not found a real advantage and several complications. You can use binary columns (BLOB) to store files there. I do not know if SQLite supports something similar, but you can always encode binary data in Base64 or so... Anyeay, I would not do it If I were you. Also bear in mind that SQLite stores a whole database in a single file, so I am pretty sure that you will have real problems with that approach using big media files sooner than later. El 11/07/2012 12:25, Anton Kaiser i...@anton-kaiser.de escribió: Don't do that. There is really no need to bloat databases with files. Save the file on the file system and create an entry for it with the needed meta data and the file path. I know that is not what you wanted to hear, but I'm sure you can't give me a good reason to do it your way ;) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Payment issue
Hi there, I know this may not be the best place for this question, but I do not know a better one. Feel free of redirect me to such place if exists. I sent it also to the Admob group on google but no answer yet. Anyway I would like to read other developers opinions on this issue, as this is my first AdMob payment and I am really lost about this issue, and I have found no explanation through AdMob's payment FAQs or other documents. According to my first payment invoice, Admob has made a payment by wire on my bank account of more than $190 (about €150) the second day of this month. But I have received yesterday a payment with less than one third of that amount (about €40). I think last-minute invalidated clicks cannot explain this. Mainly because I understand that the payment invoice reflects the effective amount transfer by wire, as that what it claims, so these $190 must be the actual amount after discounting those invalid clicks. Does anyone have had similar problems? Any ideas are welcomed. Thanks a lot in advance. Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it possible to Canvas.drawBitmap() directly to a file?
I do not think so, at least not straight forward. On 08/07/12 16:50, Guilherme Utrabo wrote: I'm trying to reduce memory consuption of my app. It uses Canvas.drawBitmap on a bitmap in memory, and when the drawing is complete, saves it to the sdcard. I'm wondering if there is any way to append the drawing direct to a file via stream, instead of writing the hole bitmap in memory. Do you guys know if it is possible? Thanks in advance. Guilherme -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Easy and fast String obfuscation?
Hi there, I am looking for a way to obfuscate some strings in a way that they may be unobfuscated later. The point is that my app -a casual game- will take some lines from a file on an http server, and I do not want to have it as readable plain text. Please, note that I do not care if a user takes the effort to decode and read it. There he will find the solutions to some game levels no more, what I want is just to protect users to see the solutions even by accident, but if some one wants to cheat, I do not give a damn. I also like that the result of encoding process is still a readable string, so the file may be threat as a text file still and not as a binary one. Also it should be standard or very easy to implement, so I can generate compatible encoded strings using PHP also to decode later with Java. I tried first with Android's Base64 class that seems to be a perfect solution, but it requires API Level 8, so 2.1 devices are discarded and I do not want that. I think a XOR encoding may produce binary output at encoding. MD5 is discarded for obvious reasons: it is not reversible. Any ideas? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Easy and fast String obfuscation?
Hi, JFTR, I have find a good implementation of the Rot13 algorithm for Java that is perfect for my needs with just slights modifications on the character mapping to add Spanish ones. And I think it will be easy to implement the same in PHP also. Though PHP has his own rot13 but it uses just alphabetic characters, so I will create my own implementation with same char mapping as in the Java class. Best regards, On 06/07/12 12:47, Francisco M. Marzoa Alonso wrote: Hi there, I am looking for a way to obfuscate some strings in a way that they may be unobfuscated later. The point is that my app -a casual game- will take some lines from a file on an http server, and I do not want to have it as readable plain text. Please, note that I do not care if a user takes the effort to decode and read it. There he will find the solutions to some game levels no more, what I want is just to protect users to see the solutions even by accident, but if some one wants to cheat, I do not give a damn. I also like that the result of encoding process is still a readable string, so the file may be threat as a text file still and not as a binary one. Also it should be standard or very easy to implement, so I can generate compatible encoded strings using PHP also to decode later with Java. I tried first with Android's Base64 class that seems to be a perfect solution, but it requires API Level 8, so 2.1 devices are discarded and I do not want that. I think a XOR encoding may produce binary output at encoding. MD5 is discarded for obvious reasons: it is not reversible. Any ideas? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] help me plz.
AFAIK you need to create a service for that. Anyway why you not look for something easier for the first exercise? Regards, On 06/07/12 18:26, Aashish kumar wrote: I am making a app similar to a Alarm Clock as the first exercise. I would like to let my app start up itself in the specified time,even it has not been actived in the background. Just like a Alarm Clock. how should I 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
Re: [android-developers] Android Carousel
May be the emulator and the actual device has different screen sizes? Regards, On 04/07/12 14:11, Jorge Gil Royo wrote: Using the emulator 4.x working properly. When I use the phone there is no message in the logcat containing information about the carousel. Is the first time something happens to me so strange. Thank you! 2012/7/4 Jorge Gil Royo jorgeg...@gmail.com Usando el emulador 4.x funciona correctamente. Cuando uso el teléfono móvil no aparece ningún mensaje en el LogCat que contenga información acerca del carrusel. Es la primera vez que me sucede algo tan raro. Gracias! 2012/7/2 TreKing treking...@gmail.com On Fri, Jun 29, 2012 at 6:26 AM, Jorge Gil Royo jorgeg...@gmail.comwrote: But when I test the application on a mobile phone (Android 4.x) the carousel works correctly, but no buttons appear. And if you test on the 4.X emulator? Does anyone know why it happens? Does anyone know how to fix it? Your question is extremely vague. How about some screenshots? Anything in the LogCat that looks useful? - 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android Carousel
Ok, forgot my previous message... X-D On 05/07/12 12:43, Jorge Gil Royo wrote: Problem solved. What happened was that I did not realize the resolution of the mobile screen, then the carousel buttons appear, but were covered by other layouts. Once adjusted the size and position of the buttons of the carousel, the buttons are displayed correctly. Thanks for the help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] GooglePlayStore
It is a one time fee to be registered on Google Play, so you must pay it. On Jul 4, 2012 8:59 AM, baturanija1 jadrankobodiroga1...@gmail.com wrote: Hey,people i made an app and i would like to place it on PlayStore.APP is free and i search on internet where to place app, and it shows me an informations that i have to pay 25 $ to place an appIs it true or i did not understand that story?If its not please sent me a link with location where could i put my free app..Thanks people for sharing knowledge :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android 2.1update-1 image for emulator?
Hi there, I have a recurrent Outofmemory crash when loading a Bitmap that is making me crazy. Its occurs mostly on Android 2.1-update1 devices -about 92% of crashes occurs with some device with that Android version-. Is there any manner to run this version on the emulator, so I have any chance to solve it? BTW, I have reduced a lot the memory consumption of my application even substituting bitmaps by graphic primitives drawn on the fly. I am pretty sure that it has no memory leaks, 100% of the crashes occurs without a low memory condition, I recycle every single bitmap I use when I do not need it for a long time, loading it again from disk when needed... also I have tested it with several different physical devices and emulators, including Android 2.1 version, and it does not crashes never with those... So I am pretty sure that it is not a problem with my code itself, so I rather like to have the chance of debugging it within a 2.1-update1 device to have a chance of create a workaround, if it is possible. Though not 100%, I think an emulator instance running a 2.1update-1 image may help (or may not, at all, but I have not too much things to try yet...) Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] GooglePlayStore
You should expect to recover those $25 from your application income soon. Anyway there are alternative markets that does not need to pay such fee. You may try Slideme and google a bit on alternatives to Google Play. Amazon is also free the first year, but it is limited to USA market. On Jul 4, 2012 10:23 AM, Jadranko Bodiroga jadrankobodiroga1...@gmail.com wrote: then nothing.. i am a poor.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] My Developer account got suspended, how can I create a new one?
On 27/06/12 07:34, pierre1232 wrote: I have three apps got suspended, a day after, my account was suspended too. Einstein used to say that the solution to a problem was mainly in its definition. And I think you are not defining the problem right. The first question you should try to answer is: WHY your apps and account have been suspended? Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to: Free to Paid App and retain preference and db files?
On 30/06/12 11:22, Fred Niggle wrote: as long as the .apk has the same name, i.e. com.my.app, then you wont lose the preferences and database. That's impossible, indeed. Two different applications may have different package names. And the only way of having one per pay version and another free, is with different 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
Re: [android-developers] How to: Free to Paid App and retain preference and db files?
If you use a SQLite3 db or so for preferences, you cannot access it from different packages, but in some cases you can implement an export/import mechanism, saving the preferences in a file into the external SD card. My first app uses just a plain text file written into the SDCard and for having same preferences in free and in per pay versions I just need to use the same name for that file. Currently I use an SQLite database, so I cannot do that so direct. But to be honest I do not care. At least in my case it is not so important. Best regards, On 30/06/12 11:01, Mystique wrote: Hi, I have a Ads supported app and I am planning to release a paid version without Ads and extra features. My questions are how do I release the app so my user can purchase and use with losing the preferences and db? Can I package it with the same name and upload into Google Play as new app or how is it been normally done? Cheers. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?
Hi, Well, your point of view is not statistically relevant, but as android developer what I want -and I think this is actually generalizable- is the most income for my work. And my limitated experience with just one app after two months of its release in both forms, free with ads and payed without them, is that I have got more than 35 times more income from the ads on the free version than from purchased one. I do not want to reveal the exactly income, but you can get the idea from these numbers: for 10 dollars of income on payment version, I have got 350 dollars from ads on the free one. And for me it is pretty clear that after more than 100.000 installs on the free version and less than 100 on the payed one, is that there is A LOT of users out there that does not care a bit about the ads. And such quantity of users are statistically relevant, indeed. Though my app is a casual game and I am pretty sure that in other type of apps things may work in a different way. For example, on a scientific calculator ads will be really annoying and users of that kind of app are not likely to click on the ads as casual game users does. Best regars, On 01/07/12 16:31, Kostya Vasilyev wrote: 2012/7/1 Mystique joven.ch...@gmail.com Yes, I have additional features for the paid version but was thinking to maintain the Ads in the free version. So you are suggestion to completely remove the Ads for free and focus on the Paid version for incentive? My suggestion, as a fellow developer, is to give it some thought, rather than assuming that ads are some kind of Eleventh Commandment. In-app billing, or a separate unlocker app, seems like an easier free-to-premium migration path than two separate apps. So, losing some on the ads, you might gain some in the upsell conversion ratio. As an Android *user*, though, I really dislike apps with ads. The idea of irritate the user until he agrees to pay just seems wrong to me. -- K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?
On 01/07/12 16:45, John Coryat wrote: The idea of irritate the user until he agrees to pay just seems wrong to me. In my opinion, it is far better to let users opt out of ads for free than use advertising as some sort of black mail to push users into paying. In our app, only 2.7% of users choose to opt out of banners. This is pretty interesting, but I think if you put the ads disabled by default and puts an option to enable them, you will get the inverted proportion... I know it is an elucidation, but my hypothesis is that those numbers could be explain also for the laziness of the majority of the users, not only for their interest on banners. The rest let them display. We have premium users who choose not to opt out as well. A small percentage of users hate ads. Giving them the opportunity to just remove them easily and freely increases the acceptance of your app and also helps give it a positive image. Now put that theory on measurable income numbers... One thing to keep in mind. By not allowing free opt out, all you are doing is decreasing the CTR for your ads and that lowers revenue. :potatoes That's not true, indeed. You get income for each click, whatever the CTR is. Please, bear in mind that the CTR is the resulting proportion of dividing clicks by impressions, not the other way. In other words: if your clicks worths one cent each one, with 1000 clicks you will get 10 dollars, and it does not matter if the CTR, that may vary with the number of impressions, is 1% or 2%. Moreover, from my own experience with Admob I am pretty sure that they penalize high CTR rates, considering more clicks non valid with high CTRs than with lower ones. Part of secret sauce for determining what you are paid is the CTR, so keeping that high will increase your revenue. JMP potatoes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] don't find my own app in play
Did you have a custom ROM on your device? If the answer is affirmative, then it should be the cause of the problem, specially if you enabled Copy Protection on Google Play for your app. Regards, On 27/06/12 21:46, toki wrote: Hi, i don't find my app with in play with my mobile phone. A friend of me, he has the same device, does find the app. I didn't find out, whats the reason for this. What could be wrong with my device? (the android version should be ok..) BR Tobias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Question about this group itself
Hi, Well, my problem is that I do not see my own posts on this group through my Thunderbird mail client since I subscribed to it. I know they reaches the group because I receive the answers, and also they are visible through web G. groups interface. But they seem not to reach my Inbox. I do not know if it is a problem of Thunderbird, the GMail account I use to subscribe to the group, or some configuration related to the group subscription itself. I do not discard no option, although if I send a message to myself with that gmail account, it reaches my Inbox with no problems, so I think that the group subscription setting is the most plausible cause. If someone has a clue on how to solve this... Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SQLite does not write inserts but does not raise error neither
Hi there, I have a function to write scores in an SQL database table. Here is the code: public void setScores(int scores[]) { int len = (scores.length 10) ? 10 : scores.length; SQLiteDatabase db = this.getWritableDatabase(); db.beginTransaction(); db.delete(scores, null, null); ContentValues values = new ContentValues(); int score = 0; for (int i=0; ilen; i++) { score = scores[i]; values.put(score, score); db.insert(scores, null, values); } db.setTransactionSuccessful(); db.endTransaction(); db.close(); } I have checked with Eclipse debugger that scores[] array does actually carries the scores when the function is called and even values different from 0 are assigned on values.put(score, score), but when loading the table later they are not there. O_o This is the function call that creates that table: db.execSQL(CREATE TABLE scores (score UNSIGNED INTEGER)); It is called only when the database does not exists within the onCreate event on an SQLiteOpenHelper derived class, so it should be created when the inserts are performed. I do not get any error from SQLite when doing the transaction, so I am really lost with this. I have other tables and I perform other inserts and transactions on the same database and those works fine. May be there is something wrong with my code that I have not noticed yet. It is my first attempt to use an SQLite database within an Android app. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SQLite does not write inserts but does not raise error neither
I answer to myself: there seems that there is nothing wrong with the function itself, but with some other code inherited from previous version where a file was used to store scores, that cleans the array and it is saved in the database through other function used to import old data from files to the DB. I have solved it yet. Best regards, On 26/06/12 13:16, Francisco M. Marzoa Alonso wrote: Hi there, I have a function to write scores in an SQL database table. Here is the code: public void setScores(int scores[]) { int len = (scores.length 10) ? 10 : scores.length; SQLiteDatabase db = this.getWritableDatabase(); db.beginTransaction(); db.delete(scores, null, null); ContentValues values = new ContentValues(); int score = 0; for (int i=0; ilen; i++) { score = scores[i]; values.put(score, score); db.insert(scores, null, values); } db.setTransactionSuccessful(); db.endTransaction(); db.close(); } I have checked with Eclipse debugger that scores[] array does actually carries the scores when the function is called and even values different from 0 are assigned on values.put(score, score), but when loading the table later they are not there. O_o This is the function call that creates that table: db.execSQL(CREATE TABLE scores (score UNSIGNED INTEGER)); It is called only when the database does not exists within the onCreate event on an SQLiteOpenHelper derived class, so it should be created when the inserts are performed. I do not get any error from SQLite when doing the transaction, so I am really lost with this. I have other tables and I perform other inserts and transactions on the same database and those works fine. May be there is something wrong with my code that I have not noticed yet. It is my first attempt to use an SQLite database within an Android app. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] detect if an app is launched
Hi, Some guys was talking yesterday or the day before about getting CPU usage of running processes on a question about how to control battery use by apps that cannot be done directly. Make some search on the forum, I think it may be useful for you. Best regards, On 26/06/12 14:04, Narendra Singh Rathore wrote: Hi all, I want to know if it is possible to detect an application launch, through its package name. Suppose, I have created a test app, in which I want to get some information about a specific app, For eg. Contact app of the devicelike how many times it has opened or closed, in a specific amount of time. I want to store the information (say, in database) when that app has just been launched (of course, on the same instant). I want all that by providing package name of that application. Is all what I want possible? If yes, how to do that? I guess, I need to use BroadcastReceiver for this. What do you say? Thanks n Regards, NSR -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] detect if an app is launched
Hi, I have found the link, published by Nobu the day before yesterday: http://www.javachartingandroid.com/2011/04/android-get-application-process-cpu-usage-and-memory-usage/ Best regards, On 26/06/12 14:04, Narendra Singh Rathore wrote: Hi all, I want to know if it is possible to detect an application launch, through its package name. Suppose, I have created a test app, in which I want to get some information about a specific app, For eg. Contact app of the devicelike how many times it has opened or closed, in a specific amount of time. I want to store the information (say, in database) when that app has just been launched (of course, on the same instant). I want all that by providing package name of that application. Is all what I want possible? If yes, how to do that? I guess, I need to use BroadcastReceiver for this. What do you say? Thanks n Regards, NSR -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]
Greetings, I have had a lot of those. You can reduce the sampling as told by Justin, and also use less bits per pixel: default is ARGB_, but you have also ARGB_ and ARGB_565. You should now anyway that use of ARGB_ is discouraged because it may generate a really bad quality output in some cases. I was using it to save memory but I have found that several images, specially those that includes gradients, looks really ugly in that mode. Anyway the BEST way to solve this is to make a more rational use of the available memory. I used to load ALL my application bitmaps into static members of a class at app loading, so they were available for the rest of the session. It was not a problem on my first app version, but the app grew and I started to have OutOfMemoryError exceptions in some devices. So what I do now is freeing those bitmaps that I do not need for a while, and load those needed by demand. For example, if you have a game with a main menu and a Play button, there is no reason to: a) Load game bitmaps before the user touches Play button. b) Keep main menu bitmaps in memory after the user touches Play button. So my advice is to review your code and try to load/recycle bitmaps as needed in each different application screen or state. Best regards, On 26/06/12 14:54, Vijay Krishnan wrote: Hi all, How to resolve the java.lang.OutOfMemoryError while calling BitmapFactory.decodeStream(stream). Thanks, vijay.k -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Doubt about heap size
Thanks a lot, I thought that something like that may be happening. But I have not very clear yet how this memory assigment works, due to the DDMS feedback: when my app runs on the 2.1 emulator it shows 3M of available heap space. In a given moment I have ~75% of that heap memory allocated. Assuming it should grew dynamically, it is expected that when I try to load a bitmap that does not fit on the 25% free heap memory, it should grew to some more than 3M and load the bitmap within the new heap available space. But instead of doing that, it crashes with an Out of memory exception. The bitmap is just 800x480 pixels, that with four bytes per colour (including one for alpha) should occupy less than 1,5M in RAM. I have managed to solve these problems -at least for now- making a more intelligent use of the heap, recycling bitmaps sometimes when they are not needed for a long period, and loading them again from assets or resources when needed. But I am still curious about this behaviour because it may be a real problem for me further, in this app or in other one. Best regards, On 24/06/12 16:28, Streets Of Boston wrote: Don't mistake *maximum *heap for *available *heap. A process can have free memory in its allocated heap. This is available heap. A process' currently allocated heap space is equal or *less *than the maximum. When needed, the process can get some extra heap space until its maximum has been reached. On Sunday, June 24, 2012 5:56:08 AM UTC-4, Fran wrote: Hi there, I have read that the maximum heap available for an app is 16M, despite that there may be higher on newer devices. Anyway on a 2.1 emulator with Eclipse/DDMS my available heap shown is just about 3M, while in my SGS2 real device shows about 5M of available heap. As you see, a lot of lower than 16M. My app runs fine on my SGS2, but it crashes complaining about not having sufficient heap memory on the emulator, and I have received a few reports with the same error on Google Play. I am currently doing an effort to decrease heap consumption, but I wonder why DDMS shows values so low and if some devices may actually have less than 16M of heap memory. My app is developed for Android 2.1+ Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] l10n issue: string is not translated in es
Hi, I am facing a new problem when trying to export my signed application package. Android lints complains through eclipse about some strings that are not translated to Spanish. These are strings using on exception reporting that I DO NOT WANT to be translated into Spanish, so it should just use the default ones in English. But the stupid Lint does not exports the apk package. The weirdest thing is that it says about the error: By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variable ANDROID_LINT_COMPLETE_REGIONS. Well, providing just a subset is what I want to do, but what is happening is exactly the contrary: I have not defined such variable on my OS, I have checked that it is undefined, and I have not defined it neither nowhere in my life, so it seems like BY DEFAULT you must define each string for each language. Any hints on this? Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: l10n issue: string is not translated in es
Ok, I have found a solution by myself. It seems like default behavior have different meanings for Eclipse and for Android... Window / Preferences / Android / Lint Error Checking And there under Correctness::Messages select MissingTranslation and set Severity to Warning, or at least something that is not Fatal as it were set. The problem gone. Best regards, On 25/06/12 19:34, Francisco M. Marzoa Alonso wrote: Hi, I am facing a new problem when trying to export my signed application package. Android lints complains through eclipse about some strings that are not translated to Spanish. These are strings using on exception reporting that I DO NOT WANT to be translated into Spanish, so it should just use the default ones in English. But the stupid Lint does not exports the apk package. The weirdest thing is that it says about the error: By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variable ANDROID_LINT_COMPLETE_REGIONS. Well, providing just a subset is what I want to do, but what is happening is exactly the contrary: I have not defined such variable on my OS, I have checked that it is undefined, and I have not defined it neither nowhere in my life, so it seems like BY DEFAULT you must define each string for each language. Any hints on this? Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Doubt about heap size
Hi there, I have read that the maximum heap available for an app is 16M, despite that there may be higher on newer devices. Anyway on a 2.1 emulator with Eclipse/DDMS my available heap shown is just about 3M, while in my SGS2 real device shows about 5M of available heap. As you see, a lot of lower than 16M. My app runs fine on my SGS2, but it crashes complaining about not having sufficient heap memory on the emulator, and I have received a few reports with the same error on Google Play. I am currently doing an effort to decrease heap consumption, but I wonder why DDMS shows values so low and if some devices may actually have less than 16M of heap memory. My app is developed for Android 2.1+ Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Activity Animation
Hi, Emulator is really slow, you should not measure your app performance based on emulator results. The speed of an animation depends on the speed of the device: the faster the device, the faster the animation. You must use some kind of method to sync your animation framing so it runs at same speed on all devices. For example, if you plan to show 25 frames per second, i.e. one frame every 40 milliseconds, you may calculate the time for next frame based on System.currentTimeMillis() + 40. It should be something like: // Init this value on the constructor, for example nextFrameTiming = 0; ... // This could be wherever the image its drawn or prepared to be drawn, depending on how your code works if ( System.currenTimeMillis = nextFrameTimming ) { nextFrameTiming = System.currentTimeMillis() + 40; changeFrame(); } So you only change to a new frame as fast as once each 40 milliseconds. Note that this will be useful to make the animation slower in devices where it runs too fast, but obviously it will not made it to run faster in devices where it runs too slow due hardware limitations. On 24/06/12 14:00, ala hammad wrote: Hello all , i want to ask why when animate activity show slow in emulater but in device show very fast .. how to make it slowly to show it to user ??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: l10n and coordinate mapping on an image
Thanks a million. Again. ;-) On 21/06/12 23:14, Nobu Games wrote: You can use a regular Java resource bundlehttp://en.wikipedia.org/wiki/.propertieswhich can be fully localized. They are a set of files ending with .properties which you can use for storing the button coordinates for each local. Just create in one of your packages a set of files with the same base name (ButtonCoords for example), followed by an underscore and the locale like _en_US or just _en. The suffix is .properties: *ButtonCoords_en.properties:* homeButton = 10,10,100,100 closeButton = 20,20, 200,200 ... *ButtonCoords_fr.properties:* homeButton = 12,11,105,105 closeButton = 22,22, 201,201 ... Then you need to load that properties file with following code. Java automatically takes care of picking the correct file for the currently set locale: ResourceBundle bundle = ResourceBundle.getBundle(path/to/package/ButtonCoords); The retrieved bundle object will be something like a HashMap that maps Strings (homeButton, closeButton) to their according values. String coordsStr = bundle.getString(homeButton); String[] coordsArray = coordsStr.split(,); int[] coords = new int[coordsArray.length]; int i = 0; for(String coord : coordsArray) { coords[i++] = Integer.parseInt(coord.trim()); } Make sure to provide a default .properties file without a locale (name it just ButtonCoords.properties) so there won't be an error when someone plays your game with an unsupported locale. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Formatted string and localization problem
Hi Tor, I used this instead: string name=exception_loading_music formatted=falseCouldn\'t load music file %s (%s)/string Is there some difference with your proposal? Thanks a lot in advance, On 20/06/12 20:35, Tor Norbye wrote: Try string name=exception_loading_musicCouldn\'t load music file %1$s (%2$s)/string -- Tor On Wed, Jun 20, 2012 at 11:31 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Hi there, I have a l10n string that I need to format later, it looks like this: string name=exception_loading_musicCouldn\'t load music file %s (%s)/string But Eclipse complains about a couple of errors on XML parsing: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=false attribute? - error: Unexpected end tag string It dissapear adding that formatted=false attributed, but I am curious about that... I use these %s because I will use Formatter.format later to build an string with the file name that raises the exception and the e.toString() output. Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ANR keyDispatching TimedOut
Hi, I am getting more and more of these errors from people that has installed my game on Google Play: Activity: com.marzoa.ruletafree/.RuletaAfortunadaGame Cause: ANR keyDispatchingTimedOut The weird thing is that on the stacktrace attached there is no reference to my own application or any of its packages: DALVIK THREADS: main prio=5 tid=1 MONITOR | group=main sCount=1 dsCount=0 s=N obj=0x40020cf8 self=0xcd58 | sysTid=17349 nice=0 sched=0/0 cgrp=default handle=-1345017776 at android.app.ActivityThread.completeRemoveProvider(ActivityThread.java:~4384) - waiting to lock 0x467c8a80 (a java.util.HashMap) held by ??? at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2137) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634) at dalvik.system.NativeStart.main(Native Method) SmsReceiverService prio=5 tid=9 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x4681d560 self=0x268718 | sysTid=17361 nice=10 sched=0/0 cgrp=bg_non_interactive handle=2531112 at java.lang.Object.wait(Native Method) - waiting on 0x4681dc90 (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:288) at android.os.MessageQueue.next(MessageQueue.java:146) at android.os.Looper.loop(Looper.java:110) at android.os.HandlerThread.run(HandlerThread.java:60) Thread-11 prio=5 tid=8 MONITOR | group=main sCount=1 dsCount=0 s=N obj=0x468095a0 self=0x260980 | sysTid=17360 nice=0 sched=0/0 cgrp=default handle=2493120 at android.app.ActivityThread.releaseProvider(ActivityThread.java:~4360) - waiting to lock 0x467c8a80 (a java.util.HashMap) held by ??? at android.app.ContextImpl$ApplicationContentResolver.releaseProvider(ContextImpl.java:1660) at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1453) at com.android.mms.data.Contact$ContactsCache.getContactInfoForPhoneNumber(Contact.java:635) at com.android.mms.data.Contact$ContactsCache.getContactInfo(Contact.java:580) at com.android.mms.data.Contact$ContactsCache.updateContact(Contact.java:521) at com.android.mms.data.Contact$ContactsCache.access$500(Contact.java:306) at com.android.mms.data.Contact$ContactsCache$1.run(Contact.java:457) at com.android.mms.data.Contact$ContactsCache.get(Contact.java:472) at com.android.mms.data.Contact.get(Contact.java:131) at com.android.mms.data.ContactList.getByIds(ContactList.java:54) at com.android.mms.data.Conversation.fillFromCursor(Conversation.java:766) at com.android.mms.data.Conversation.init(Conversation.java:131) at com.android.mms.data.Conversation.cacheAllThreads(Conversation.java:1062) at com.android.mms.data.Conversation.access$800(Conversation.java:35) at com.android.mms.data.Conversation$2.run(Conversation.java:901) at java.lang.Thread.run(Thread.java:1096) Thread-8 prio=5 tid=7 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x46806220 self=0x25d800 | sysTid=17357 nice=0 sched=0/0 cgrp=default handle=2479720 at java.lang.Object.wait(Native Method) - waiting on 0x468061b0 (a java.util.ArrayList) at java.lang.Object.wait(Object.java:288) at com.android.mms.data.Contact$ContactsCache$TaskStack$1.run(Contact.java:388) at java.lang.Thread.run(Thread.java:1096) Binder Thread #2 prio=5 tid=6 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x467ccc20 self=0x23cd60 | sysTid=17355 nice=0 sched=0/0 cgrp=default handle=1205896 at dalvik.system.NativeStart.run(Native Method) Binder Thread #1 prio=5 tid=5 NATIVE | group=main sCount=1 dsCount=0 s=N obj=0x467c8108 self=0x140f60 | sysTid=17354 nice=0 sched=0/0 cgrp=default handle=1314592 at dalvik.system.NativeStart.run(Native Method) Compiler daemon prio=5 tid=4 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x467c22a0 self=0x13ebc0 | sysTid=17353 nice=0 sched=0/0 cgrp=default handle=1305472 at dalvik.system.NativeStart.run(Native Method) Signal Catcher daemon prio=5 tid=3 RUNNABLE | group=system sCount=0 dsCount=0 s=N obj=0x467c21e8 self=0x13e970 | sysTid=17351 nice=0 sched=0/0 cgrp=default handle=1309296 at dalvik.system.NativeStart.run(Native Method) HeapWorker daemon prio=5 tid=2 VMWAIT | group=system sCount=1 dsCount=0 s=N obj=0x449e7628 self=0x13f848 | sysTid=17350 nice=0 sched=0/0 cgrp=default handle=1251936 at dalvik.system.NativeStart.run(Native Method) So this is not very useful to isolate and try to solve the problem. Any hints? Thaks A LOT in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email
Re: [android-developers] Formatted string and localization problem
Well, the other approach also seems to solve the problem, so as both approaches seems to solve the problem, I do not see the difference between them. And your answer didn't help me, indeed. BTW, there is no need of being so high-handed when answering. Best regards, On 21/06/12 17:11, Justin Anderson wrote: Is there some difference with your proposal? Yes, the difference is that his fixes the problem. Did you try it? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Is there some difference with your proposal? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Formatted string and localization problem
Hi, Thanks a lot for your instructive answer. I have no strings in my application where the order of the arguments are relevant, but I will bear this in mind for further. Best regards, On 21/06/12 17:55, Tor Norbye wrote: You need to number the string arguments because in some translations, the order in which the substitutions appear may not be the same. If you just use %s, there is no way to for example use the second argument earlier than the first; it will need to find the first occurrence of %s and match it with the first parameter, and so on. With numbered arguments, one translation could do this: Dear %2$s, %1$s. (for example when the strings represent first and last names, where there are different conventions across localizations.) -- Tor On Thu, Jun 21, 2012 at 8:24 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Well, the other approach also seems to solve the problem, so as both approaches seems to solve the problem, I do not see the difference between them. And your answer didn't help me, indeed. BTW, there is no need of being so high-handed when answering. Best regards, On 21/06/12 17:11, Justin Anderson wrote: Is there some difference with your proposal? Yes, the difference is that his fixes the problem. Did you try it? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Is there some difference with your proposal? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] l10n and coordinate mapping on an image
Hi there, I am using a bitmap with several parts that can be touched by the user as they were buttons. These parts may be bigger or littler depending on the language. Currently, as I have split English and Spanish version into two different apps, I just have the coordinates hardcoded in my Java classes. But now I am integrating both languages on the same app, having yet done the different string and image resources, but I do not know what is the best approach to this problem. I could make some hack, like encoding the coordinates between an string using string file resources, and parsing these as needed to get again the coordinates. But I think there should be a better way and I do not want to do -again- dirty code that I will need to change sooner than later. Any ideas? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to move an app to another on Google Play
Greetings, Well, I know the subject sounds weird, but I do not know how to express it better in a brief. The question is that I have created an application in two languages, as it was my first one and I want to release it ASAP, I simply create two different applications for each one (Spanish and English), and uploaded them such way to Google Play. I have had no major problems with this, apart from loosing positioning as installations and ratings are separated, but now I have planned to release a new version in Italian and may be later in German, and I do not want to keep them separated because I prefer that all installations and ratting are in one application account instead of spread among several ones. Also adding improvements and fixing bugs will be easier with just one application than with one for each language. Moreover, I for each language I must maintain two versions: free with ads and per pay without them. Not a major problem with just two languages neither, but a bit annoying with four. I have yet a clear idea on what changes I must do to my code for supporting several languages at once, however this will generate some problems with Google Play that I have not very clear how to address. The first problem is that if I create a new application package, I will lost all ratings and installs on previous one. I think the best solution may be reusing the application package for the Spanish version, that is about reaching 100 000 total installs and 1400 comments, and send the English version to the trash, loosing just about 15 000 installs and 75 comments. So, I am not specially concerned about that. But it happens that appart from free versions of my app, I have also released per pay versions in both Spanish and English. I do not care about loosing both the comments and the installs on those, since I have just one comment in the English version and less than 70 installs counting both English and Spanish, but If I just discontinue the development of one of those, the users will complain as they have paid for it. I do not want to just refund them for the old application, since I am pretty sure that I will lost money because many of them may decide to keep the old version even without updates instead of buying the new one with the refunded money. So I have considered offering refund on the purchase of the new app instead for those users that can probe that they have purchased the old one. The question is: what about the 30% of Google Play? It will be returned to the user also? It will be charged to me even when I refund the user? Well, any ideas on this issue as a whole are welcome. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to move an app to another on Google Play
On 20/06/12 17:40, Justin Anderson wrote: The question is that I have created an application in two languages, as it was my first one and I want to release it ASAP, I simply create two different applications for each one (Spanish and English), and uploaded them such way to Google Play. That doesn't make any sense... You wanted to get your app out the door faster so you created two different applications? All you had to do was add another strings.xml file and stick with one app... How would creating two applications be faster than adding a single file to your project? Ok, it looks pretty straightforward when you know how localization works on Android, but I released my first application after reading just the first half of the book Beggining Android Games that does not cover localization and many other things, so I did it with the limited knowledge I had on that moment, and most of the time recycling sample code. So if I had invest more time in learning, perhaps I had released the application with localization even faster. But I could not know how much time I could need to learn those things before learning those things... chicken and egg problem. Also my lack of experience didn't let me figure out the problems that I could have further -as I had now- doing that way. I have yet a clear idea on what changes I must do to my code for supporting several languages at once, however this will generate some problems with Google Play that I have not very clear how to address. Any string that is displayed in the UI should be converted to a string reference... You will have a different values folder for each language you want to support... For example, re/values will contain a strings.xml file and it will usually be English. Then if you want to add another language, say French, you would create a res/values-fr folder that contains the French version of the strings.xml file Yeah, by now I have read about that on developer.android.com yet. The question is: what about the 30% of Google Play? It will be returned to the user also? It will be charged to me even when I refund the user? I'm not 100% sure, but when I've refunded money it seemed like Google lost their 30%... Thanks for that point, it is a really valuable information for me. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Localization doubt
Hi there, I am starting with l10n and I have a doubt on that. As I have read, the system will choose the l10n resources for me based on user's configuration, but I planned to give the users of my app to choose a different language from configuration one if they want. My app is a casual game for guessing words, it is in Spanish and English, but some Spanish people -me among them- may find useful to play also the English version of the game so they improve their English vocabulary, and vice versa. Is there any way to tell the system to use resources of a given language, regardless system configuration? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to move an app to another on Google Play
Thanks for the point, but as far as I have hardcoded strings on my Java code, I need to change my code... Also the concept of code may be understood on a wider manner that includes not only Java code, but also XML resource files and other things like that. Of course I have been reading that guide, and also the Helo l10n example. Anyway thank you very much for the interest, On 20/06/12 17:52, Nobu Games wrote: I have yet a clear idea on what changes I must do to my code for supporting several languages at once, Maybe I'm getting you wrong but I'm having the impression that you don't completely understand the features that are already there. If you coded your app how Google wanted you to code your app in the first place you do not need to change anything about your *code*. Ever since then Android comes with a pretty good working internationalization feature. I suggest that you read following page before trying to implement your own internationalization feature: http://developer.android.com/guide/topics/resources/localization.html But maybe you already know about that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Localization doubt
Excellent! Thanks a million. :-) On 20/06/12 18:17, Nobu Games wrote: http://stackoverflow.com/questions/2900023/change-language-programatically-in-android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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: Localization doubt
It seems not to exists an straight way to do it. That guy says this is the code, but I advice you not to use it never... And other commenters complain about it not working well. I am afraid will end implementing my own l10n handling regardless Android's one... On 20/06/12 18:17, Nobu Games wrote: http://stackoverflow.com/questions/2900023/change-language-programatically-in-android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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: Localization doubt
After thinking it a bit, I will relay on system's language and so Android's l10n for user's interface, and threath the game words language independently. I think it is the better approach. Thanks for your help, it has been useful for me to find the best path. On 20/06/12 18:17, Nobu Games wrote: http://stackoverflow.com/questions/2900023/change-language-programatically-in-android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Formatted string and localization problem
Hi there, I have a l10n string that I need to format later, it looks like this: string name=exception_loading_musicCouldn\'t load music file %s (%s)/string But Eclipse complains about a couple of errors on XML parsing: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=false attribute? - error: Unexpected end tag string It dissapear adding that formatted=false attributed, but I am curious about that... I use these %s because I will use Formatter.format later to build an string with the file name that raises the exception and the e.toString() output. Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] UTF-8 encoding and decoding
Hi, I am implementing an standalone client/server protocol to make one of my games online capable. One of the problems I have found is that some strings passwed between client and server may have characters that must be encoded on UTF-8 (like spanish ñ for example). The first thing I though was using hexadecimal notation for each char, so an string like ESPAÑA will be enconded and sent as: 004500530050004100D10041 But I rather like to avoid this, since it generates an unnecessary network load for just one char, and I expect to have hundreds of concurrent connections, so it is important to loose all the fat I can... I have found this altenative notation may be a good alternative: ESPAU+00D1A But I did not found where it is documented, also I do not know if Android has native functions to handle this, that may be an interesting advantage for prefering one notation over another. Also this one, claimed to be JavaScript escapes looks interesting, with the same load than the previous one: ESPA\u00D1A I am using this online tool for my testings: http://www.rishida.net/tools/conversion/ Well, bearing in mind that the client will be written in Android, and the server in PHP, what you think should be the best option for encoding UTF-8 chars during transmission? Regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Changing hosts file on an Android device
Hi Kristopher, It is just for development, but I do not want to root my own devices since, you know, I want to try my applications in devices closed to users ones, that are not rooted usually. Moreover, If I root my devices it may not work properly with services like Google Play, and I use them also to check downloaded packages from Google Play and so. And I have not infrastructure yet to have several devices rooted and several non-rooted for checking both things. To be honest, I have just two devices for development: one is my own phone and the other is my wife's one X-D Things may be easier if my DLS router and WIFI AP had DNS server capabilities, but it has not, so I should configure a Bind or something similar in some of my other computers and then instruct the router to use its IP as primary DNS server for DHCP configuration. A pain in the... The other way could be to do this programmatically, so... is there any way to configure a host resolution table just within my application through Android? I cannot just use the IP addresses directly, because I will access some virtual servers through HTTP and the requests to these must include its domain name, since they share the same IP address. Regards, On 08/06/12 17:30, Kristopher Micinski wrote: On Fri, Jun 8, 2012 at 11:12 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Hi there, When I develop a dynamic web site I used to change the /etc/hosts file on my linux boxes and the equivalent on Windows ones to test the site on different browsers, so I add a line in the way of: 192.168.1.21devel.mysite.com So when I put http://devel.mysite.com on a browser, it connects to my development Apache server. So what I'd like to do it is the same on my Android device, I think I cannot edit /etc/hosts file on it at least while it is not rooted, but if there is other way to do this it will be enough. That's right, you'll need root to do this.. typically mods do this sort of thing to disable ads across the system... I know there are complexer ways to do this, like setting up a DNS server on my own network and give it through DHCP to the device when its connected to my WIFI access point, but I rather like to do it in a simpler manner if there is any... Hmm.. That's also right, you can't really modify the system internals without root or firmware mods, but, as you note, setting up DNS, etc... Wait, why are you doing this again? Is this something you want to work just for your development device, or do you want it to work across apps? kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Data interchange with a PHP server
Hi, Thanks by your advices. I do not need validation against schema nor XML structure neither, so I will start directly with JSON. Thanks a lot, On 09/06/12 15:25, Chris Mawata wrote: The built in http client is the usual Apache HttpClient so it can handle the passing of a cookies for you. I would suggest you make the program actually work and produce correct results before worrying about speed. First worry about what you need. For example do you need validation against a schema? (JSON won't do that). Do you need the extra structure of XML? Which of the two (actually three since you might go for SAX parsing rather than DOM parsing) fits the skill sets already available to you? Isolate the code that processes the http response in its own module so that you can change it without affecting the rest of the code. Once the code is working and giving you correct results then worry about speed. Optimizing a non-running program rarely works. On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote: Hi there, I need to interchange data between my Android app, written in Java using eclipse, and an Apache HTTP server through some PHP scripts. What is the best way to do so? I do not know if there is some bultin functions yet on API that could make the communication easier than directly using sockets and parsing strings. Thanks a lot in advance, On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote: Hi there, I need to interchange data between my Android app, written in Java using eclipse, and an Apache HTTP server through some PHP scripts. What is the best way to do so? I do not know if there is some bultin functions yet on API that could make the communication easier than directly using sockets and parsing strings. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Changing hosts file on an Android device
I finally ending just using my hosting provider DNS and creating there subdomains of actual domains for development, using internal IP addresses of my network instead of public ones. It works perfectly and I do not need to set up and keep running my own DNS server. Best regards, On 08/06/12 17:30, Kristopher Micinski wrote: On Fri, Jun 8, 2012 at 11:12 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: Hi there, When I develop a dynamic web site I used to change the /etc/hosts file on my linux boxes and the equivalent on Windows ones to test the site on different browsers, so I add a line in the way of: 192.168.1.21devel.mysite.com So when I put http://devel.mysite.com on a browser, it connects to my development Apache server. So what I'd like to do it is the same on my Android device, I think I cannot edit /etc/hosts file on it at least while it is not rooted, but if there is other way to do this it will be enough. That's right, you'll need root to do this.. typically mods do this sort of thing to disable ads across the system... I know there are complexer ways to do this, like setting up a DNS server on my own network and give it through DHCP to the device when its connected to my WIFI access point, but I rather like to do it in a simpler manner if there is any... Hmm.. That's also right, you can't really modify the system internals without root or firmware mods, but, as you note, setting up DNS, etc... Wait, why are you doing this again? Is this something you want to work just for your development device, or do you want it to work across apps? kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Data interchange with a PHP server
Hi there, I need to interchange data between my Android app, written in Java using eclipse, and an Apache HTTP server through some PHP scripts. What is the best way to do so? I do not know if there is some bultin functions yet on API that could make the communication easier than directly using sockets and parsing strings. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Data interchange with a PHP server
Hi, For JS it is clear that JSON will be faster, but what is the better choose in Java for Android? I mean, is it JSON parsed faster than XML on Dalvik? And for the authentication I used to use PHP sessions and cookies when developing web pagers. Will be this also the prefered way to do it with the Android HTTP client? The other way I am considering is to give the client a token from the server after authentication and pass it in every POST or GET request to the server. This has the disadvantage of having to take care of passing it in every request, but on the other hand avoiding cookies should made the code simpler and easier to debug. Regards, On 08/06/12 15:59, Chris Mawata wrote: There is an HTTP client on Android. When you talk about parsing strings, what structure do you have? There are facilities for handling JSON and XML. On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote: Hi there, I need to interchange data between my Android app, written in Java using eclipse, and an Apache HTTP server through some PHP scripts. What is the best way to do so? I do not know if there is some bultin functions yet on API that could make the communication easier than directly using sockets and parsing strings. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Changing hosts file on an Android device
Hi there, When I develop a dynamic web site I used to change the /etc/hosts file on my linux boxes and the equivalent on Windows ones to test the site on different browsers, so I add a line in the way of: 192.168.1.21devel.mysite.com So when I put http://devel.mysite.com on a browser, it connects to my development Apache server. So what I'd like to do it is the same on my Android device, I think I cannot edit /etc/hosts file on it at least while it is not rooted, but if there is other way to do this it will be enough. I know there are complexer ways to do this, like setting up a DNS server on my own network and give it through DHCP to the device when its connected to my WIFI access point, but I rather like to do it in a simpler manner if there is any... I use Eclipse for development, so if there is a chance to do something via DDMS or using command line tools like adb, it will be welcomed. Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] want to install a software .exe from my Android App
On 30/05/12 12:03, Meryeme Ayache wrote: I am trying to install a .exe softaware WHAT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Google play stats stalled
Hi, The stats on my Google Play developer console seems to be stalled since yesterday. It has been updating between 12:00 and 13:00 GMT, but today at 15:40 GMT they are showed outdated. I have the same active install that I had yesterday, and the last day shown on graphics is 28 May. I rather like to know if this is a general issue or it is affecting just me. Anyone with same problem? Thanks a lot in advance. Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google play stats stalled
Ok, I am more confident now. Thank you very much, On 30/05/12 17:50, Kostya Vasilyev wrote: Not sure if my stats are affected, but I remember seeing a notice in the developer console about this yesterday. The notice also said they're working on a fix (as ever). -- K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SoundPool error Unable to load sample: (null)
Hi there, I am facing an Unable to load sample: (null) error with the SoundPool, while trying to load a sample (not surprising, yeah?). I have discarded all common flaws that should raise that kind of error, so the file does exists (I can see it there), the file is readable (assets manager seems to read it with no problem), and the file is not corrupt (I can reproduce it with a wav player without problems). So I do not know what could be the cause of this error. Here is the code snippet: try { AssetFileDescriptor assetDescriptor = assets.openFd(filename); int soundId = soundPool.load(assetDescriptor, 0); return new AndroidSound(soundPool, soundId); } catch (IOException e) { throw new RuntimeException(Couldn't load sound ' + filename + '); } assets is an AssetManager instance, and it loads pretty well other samples in the same directory. It does not raises an IOException, so it is pretty clear that the file is there and it is readable, but when executing the soundPool.load line, it complains with the error Unable to load sample: (null). Any ideas? Thanks a million, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google play stats stalled
Hmmm... I have this message on my console: Issues with statistics export Temporary issues exporting statistics Learn more https://www.google.com/support/androidmarket/developer/support/bin/answer.py?answer=2635279 It is not exactly the same, since I do not want to export stats, but may be it is related: if they are working on solving stats exporting, may be they are retaining the whole thing... thought... I will wait til twomorrow before complaining... Best regards, On 30/05/12 17:50, Kostya Vasilyev wrote: Not sure if my stats are affected, but I remember seeing a notice in the developer console about this yesterday. The notice also said they're working on a fix (as ever). -- K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] want to install a software .exe from my Android App
It looks, at least for me. May be my own ignorance, or perhaps that I have not understood you very well. My point is that Android OS is a linux based system, where you cant exec MS-DOS/WINDOWS binary executable files like those with .exe extension (at least not directly, you can do it with some using WINE for example, but thats another history...). Also if you develop your application the common way, i.e. in Java with Android SDK, it will run on a sandbox within the system, on the Dalvik VM, so your chances to execute native code are even less (though I think you can use JNI for the task), and to be honest I do not know how to do that and what issues you may found (may be you need even a rooted device). Anyway, the point is that you cannot execute a Micro$oft .exe binary file within your Android device. And installing WINE or something for the task seems to be too complicated for just considering it. Maybe I am wrong anyway. Regards, On 30/05/12 13:16, Anirudh Loya wrote: Crazy ? On Wed, May 30, 2012 at 6:56 AM, Francisco M. Marzoa Alonso fmmar...@gmail.com wrote: On 30/05/12 12:03, Meryeme Ayache wrote: I am trying to install a .exe softaware WHAT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SoundPool error Unable to load sample: (null)
I answer to myself, JFTR: For some reason SoundPool were unable to load a wav sample that in fact works in every other player that I have used. So I simply ended using another file with a different format. Here is the format of the offending file, as told by mplayer on my GNU/LiNUX box: |Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 96000 Hz, 1 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000-192000) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) | And here it is the one for the other file that does work: |Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 22050 Hz, 2 ch, s16le, 705.6 kbit/100.00% (ratio: 88200-88200) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) | There are many differences, but the point is that the second works, so I simply discarded the first one and move into the second. Knowing this if I needed the first sound sample, I just need to adjust its rate and channels with an audio editor like Audacity to solve the problem. Why it did not just work in first case? Who knows, but if I can solve it so easy... who cares at all? On 30/05/12 19:21, Francisco M. Marzoa Alonso wrote: Hi there, I am facing an Unable to load sample: (null) error with the SoundPool, while trying to load a sample (not surprising, yeah?). I have discarded all common flaws that should raise that kind of error, so the file does exists (I can see it there), the file is readable (assets manager seems to read it with no problem), and the file is not corrupt (I can reproduce it with a wav player without problems). So I do not know what could be the cause of this error. Here is the code snippet: try { AssetFileDescriptor assetDescriptor = assets.openFd(filename); int soundId = soundPool.load(assetDescriptor, 0); return new AndroidSound(soundPool, soundId); } catch (IOException e) { throw new RuntimeException(Couldn't load sound ' + filename + '); } assets is an AssetManager instance, and it loads pretty well other samples in the same directory. It does not raises an IOException, so it is pretty clear that the file is there and it is readable, but when executing the soundPool.load line, it complains with the error Unable to load sample: (null). Any ideas? Thanks a million, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Eclipse and DDMS
Hi, Is there anyway to see and edit hidden files on android devices from Eclipse/DDMS? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en