[android-developers] Re: Why my service in Broadcast Receiver gone in seconds.
Hi, Kai- We cannot tell from what you posted what is going on. Please take a look at how and when you create the Application, the BroadcastReceiver and the Service. Are they all in the same process? Recall that, for example, if you create the BroadcastReceiver using the tag in the Manifest, if you specify no flags, it defaults to running in the same process as the Application (http://developer.android.com/reference/android/R.styleable.html#AndroidManifestReceiver_process). But if, for example, the process 'hosting' the BroadcastReceiver has no other component, then when the BroadcastReceiver is done, the OS will aggressively kill the hosting process. The simplest approach is to use the same process for all three: Application, Service & BroadcastReceiver. Then the process will stick around until all three are backgrounded or killed (except under "conditions of extreme memory pressure"). See http://developer.android.com/guide/topics/processes/process-lifecycle.html for details on what is liable to be killed under what circumstances. On Saturday, March 19, 2016 at 5:53:57 AM UTC-7, Kai Zhang wrote: > > Hello all, > My app runs in background. I use alarmmanager to trig a alarm every > minutes.When my Broadcast receiver receive the alarm I start a service.But > I found that the service only last for about 4~5 seconds.I think every time > the alarmmanager trig a alarm and a new Broadcast receiver instance > created.the Broadcast receiver goes quickly.So the service gone with it?But > the android.os.Proccess.myPid() is always the same.I am confusing with it. > Thanks, > zhangkai > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/4bcb8438-2a7f-4fc0-aea1-11637d2e22df%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Custom exception in AIDL
From an AIDL service? Some, even many Services use AIDL, but the AIDL file only describes the data-marshaling for the Service. So if you mean can I throw an exception from the AIDL file, the answer is no. But why would you want to? You can throw an exception from the Service itself exactly the same way you throw an Exception from any application component written in Java. On Friday, October 25, 2013 5:36:14 PM UTC-7, giles ian wrote: Can I throw a custom exception from an aidl service. If yes how ?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.
The best solution to your problem is probably to bite the bullet and rewrite your code to use shaders in OpenGL ES 2.0. All major phones and quite a few minor ones support it now. It may be your only solution, if the Galaxy S3 has to move too many more bits than the P350 did, or has a slower OpenGL client-server path. Or if Motorola took too many shortcuts in maintaining OpenGL ES 1.0 backwards compatibility. Finally, from this snippet, we cannot tell if you are handling your buffers correctly. For example is 'buffer' a directly allocated ByteBuffer? On Saturday, July 27, 2013 2:22:09 AM UTC-7, Edvinas Kilbauskas wrote: Hello, so I have this problem with galaxy S3 and OpenGL ES 1.0. Here's little backstory: I had LG P350 (600MHZ CPU, Adreno 200 GPU, 2.8 inch screen) for 2 years or so. And I was developing this little game framework which used OpenGL. My old LG handled it pretty well, good framerates, no lags, everything worked as expected. But few days ago I decided that I should get new phone, so I ordered Galaxy S3. So after I got the phone I installed my 2 games which used my framework and noticed that there is a delay between touching / moving finger on the screen and things appearing on screen. First I thought that this could be problem of my input handling system, so I did something like this to check if that was true: inputSystem.update(); float x = inputSystem.getTouchX(); float y = inputSystem.geTouchY(); Log.d(Touch: , X: + x + Y: + y); Essentially I just touched my screen, and looked at the logcat to see if there is any delay in receiving data. And there was absolutely no delay! As soon as I touched the screen, coordinates on logcat changed. Then I thought to myself... OK, maybe my rendering system is messed up. To test if that was true I did exactly this: public void onDrawFrame(GL10 gl){ FloatBuffer floatBuffer = buffer.asFloatBuffer(); public void tempDraw(GL10 gl){ gl.glClear(GL10.GL_COLOR_BUFFER_BIT); gl.glViewport(0,0,1280,720); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrthof(0, 20, 14, 0, -1, 1); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glVertexPointer(2,GL10.GL_FLOAT,0,floatBuffer); inputSystem.update(); float x = inputSystem.getLastTouchEvent().position.x; float y = inputSystem.getLastTouchEvent().position.y; Log.d(Touch: , X: + x + Y: + y); gl.glTranslatef(x,y,0); gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 6); } This is as simple as it could be, I didn't use my render system for rendering, I just used this little piece of code which couldn't get any simpler. It just draws little rectangle on screen in the position of last touch event. And guess what! This didn't do the trick either! It still has delay! *Also in developer options I enabled Show touches function, so I could see in real time how much delay there is.* After I scroll my finger through screen, I immediately can see output on logcat, but square on the screen still has huge delay. Here's the video showing the delay: GLSurfaceView lag/delay on Galaxy S3http://www.youtube.com/watch?v=fWZGshsXDhM You can see that Show touches android function showing the white dot on screen, this is where I WANT my square to be, but my square just follows it with delay. Just for comparison I will launch painting application which paint on EXACTLY the white dot. This is the performance I want in my game. It can't be the problem of my phone, because other games and apps that I downloaded from google play doesn't have this lag/delay problem. So can someone help me out please? What am I missing? Have any of you encountered this problem before? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Maps api key v1?
There is a world of a difference, Ian, between updating our software and completely breaking an entire set of APIs. Google did the latter. Many other companies instead keep the old APIs working for years, encouraging developers to develop only for the new API set. Now Google may have had a good reason for completely scrapping v1 and forcing everyone to migrate to v2 with no backwards compatibility -- but did Google ever communicate this to developers? I never saw this. Evidently, neither did a number of contributors to this thread. Finally, why are you even asking if he got a v1 API key? Even his first post should have made it clear that he got further than that in the development process. For you to insinuate that he did not even get this far shows both laziness on your part and contempt for Google's customers and partners, developers. On Tuesday, April 23, 2013 8:38:09 AM UTC-7, Ian Ni-Lewis wrote: You say that My career doesn't revolve around only Google, and I have other things to do than checking each x months if one API has been discontinuated and I need to develop everything again. We do occasionally need to update our software, and although we do try very hard to avoid breaking changes, they do sometimes happen. How would you prefer to be notified of these changes? Have you ever obtained a v1 API key or uploaded an app to Google Play? If not, then how would Google have communicated this important information to you? Ian On Tuesday, April 23, 2013 2:59:07 AM UTC-7, user123 wrote: Yes, in moments like this, I ask myself why I'm an Android developer :) I think I started basically because I didn't/don't like Apple. But reconsidering this position. Another thing I found quite annoying during this experience, is that there's not even a direct contact possibility. All I found was an email Address of Googe Play, then I got an automatic e-Mail in response, which told me, to answer directly if this doesn't solve the problem, I did, and then I got: Thank you for your note. If you're looking for information regarding Google Maps Android API, please visit our Google Play Android Developer site: http://developer.android.com/google/play-services/maps.html; I probably can't call this bad costumer service, since I'm only a stupid developer, not a costumer, and I don't deserve any direct communication with Google. And not to dream about the possibility to get some human-generated consideration about my case and a key for v1. And I'm not afraid of writing this, because Google will not even read it :) So I'll delay my release and post soon my questions about v2. And try my best to keep my motivation to be an Android developer. Am Dienstag, 23. April 2013 03:07:00 UTC+2 schrieb Indicator Veritatis: In your message starting this thread, you say: The context: I finished an app a few months ago. I want to release it now. Well, it appears Google has, in its infinite wisdom, decided during those few months not to give anyone a v1 key. Of course, this is inconsiderate to developers, but Google is like that. Even in its worst days, Apple had better relations with independent developers. But no doubt Google would ask, well, what were you doing in those 'few months' that you did not notice the need to update your app for the new API? Android developers have to roll with the punches and live with this kind of abuse from Google, we cannot change it. Complain if you have to to get it out of your system, but then move on. Either drop the app or rewrite it to use the new API. On Monday, April 22, 2013 3:47:10 AM UTC-7, user123 wrote: Can you please stop using this conversation (only) to promote yourself :) thanks. I can google the information myself. This is not any serious help. What I need is an API key for v1 to release my finished app. Am Montag, 22. April 2013 12:27:57 UTC+2 schrieb VenomVendor™: There is no other way, than porting to MapsV2. If you find any difficulty in anypart of MapsV2, We as a developer will support you to the best. I suggest you to post in the same thread rather than creating new thread. Before you Post, Search in StackOverflowhttp://stackoverflow.com/questions/tagged/android-maps-v2 *To start with MapsV2.* Here are few links to start with MapsV2 Getting Started with Google MapsV2http://venomvendor.blogspot.in/2013/04/getting-started-with-google-mapv2-for.html To create a custom overlay with custom typeface, I suggest you to see this Using Custom Typeface in Maps V2http://stackoverflow.com/q/15668430/1008278 If you want any help, let us know, Sharing is Caring. My Android Apps-(Rate Reviewhttps://play.google.com/store/apps/developer?id=VenomVendor ) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group
[android-developers] Re: Session management in android application
Have you looked at the tutorial on Android session managment using Shared Preferences at http://www.androidhive.info/2012/08/android-session-management-using-shared-preferences/ ? On Tuesday, April 9, 2013 1:47:34 AM UTC-7, rohan.d...@gmail.com wrote: Hi I have one application build on android 2.2. I need to know is there any *Session* management kind of stuff exist in android development ? So i can implement it in my entire android application. If yes then can you please share any web urls or code for my reference ? Thanks in advance !! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] how to do JUnit testing
The android.developer.com sites that SO post refers to are good, despite the low votes both the question and the answers got on SO. Couldn't you find an SO post that got better votes? The rest of the SO post is quite worthy of being completely ignored. On Monday, April 22, 2013 3:19:01 AM UTC-7, asheesh arya wrote: http://stackoverflow.com/questions/10845937/how-to-do-junit-testing-in-android On Mon, Apr 22, 2013 at 3:37 PM, Sadhna Upadhyay sadhna@gmail.comjavascript: wrote: Hi guys, can some one tell me that how to do JUnit testing in android.please help me if any one have any idea about it thank you very much in advance. Thanks and regards: sadhna -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks Regards ASHEESH ARYA +919990503567 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Ler e Retornar os aplicativos instalados no android
Yes, I know Google offers to translate the post, and the translation is even pretty good: but you will always get better answers if you post in English, even if the English is not so good. Furthermore, in your case, you need to be more specific in your request for help. What are these 'dificuldades'? Are you referring to your inability to find how to read the list of applications installed on the device? You need to start with reading (all beginning Android developers must start with a lot of reading) the documentation for the class PackageManager and perhaps package android.content.pm. Depending on what information about applications installed you need, you may or may not be able to get by with getPackageManager(), ApplicationInfo and getInstalledApplications() On Monday, April 8, 2013 8:03:26 PM UTC-7, eduardo santiago wrote: Sou um novo desenvolvedor android e estou desenvolvendo um aplicativo, mas estou com dificuldades em uma parte dele; meu aplicativo precis ler e retornar para o usuário os apps instalados no parelho, mas não sei como o fazer se alguém puder me ajudar ficarei muito agradecido! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Force Close just restarts the app?
A future version of the platform will probably just remove all activities owned by the app when it crashes. -- but doesn't this fit user expectations better? When the user sees your application has stopped working and the button force close, of course he thinks it is the entire application, not any one activity, that will be closed. So though yes, it is a sledgehammer, it fits user expectations better to close all activities making up the application (and services too). An alternative I would love to see Google at least consider is: offer the user a choice between killing the whole app (presumably by killing the hosting process) and killing just the activity. But most users are unaware of the boundaries between activities in an application anyway, so such an option would appeal more to developers than to users. On Saturday, February 13, 2010 11:31:14 AM UTC-8, Dianne Hackborn wrote: What generally happen when a process crashes is that it is killed, the crashing activity removed, and then the system restarts the next thing on the activity stack. If you had an activity before that one on the stack then that activity will be restarted. This does allow you to write a pathological case where you have one activity, that starts another, and the second activity crashing during initialization. That activity will be removed, the processed killed, and then the process restarted to display the previous activity which again launches the crashing activity. A future version of the platform will probably just remove all activities owned by the app when it crashes. This is a little excessive and I would like to be a little better about it, but yes this case is annoying. (For example if a browser has multiple activities for each tab/window, it would be unfortunately to lose all of them if you get a crash while using one of them.) On Sat, Feb 13, 2010 at 9:28 AM, Steeler cowbo...@yahoo.com javascript: wrote: I've noticed that whenever I introduce some new awful bug to my app and it crashes, Android just keeps starting it up over and over again. I eventually have to hit the dial button on the phone just to make my app lose focus. I searched this group's posts and the developer documents... I can't find anything about this. Is this usual behavior? If so, is there some way to disable it? Maybe it's just my coming from a desktop background, but I kind of think that when something is closed, it should stay closed, especially if the reason it was closed was that it crashed. And of course, I hope my final app never force closes, but with all the different hardware you never know... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hac...@android.com javascript: Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Maps api key v1?
In your message starting this thread, you say: The context: I finished an app a few months ago. I want to release it now. Well, it appears Google has, in its infinite wisdom, decided during those few months not to give anyone a v1 key. Of course, this is inconsiderate to developers, but Google is like that. Even in its worst days, Apple had better relations with independent developers. But no doubt Google would ask, well, what were you doing in those 'few months' that you did not notice the need to update your app for the new API? Android developers have to roll with the punches and live with this kind of abuse from Google, we cannot change it. Complain if you have to to get it out of your system, but then move on. Either drop the app or rewrite it to use the new API. On Monday, April 22, 2013 3:47:10 AM UTC-7, user123 wrote: Can you please stop using this conversation (only) to promote yourself :) thanks. I can google the information myself. This is not any serious help. What I need is an API key for v1 to release my finished app. Am Montag, 22. April 2013 12:27:57 UTC+2 schrieb VenomVendor™: There is no other way, than porting to MapsV2. If you find any difficulty in anypart of MapsV2, We as a developer will support you to the best. I suggest you to post in the same thread rather than creating new thread. Before you Post, Search in StackOverflowhttp://stackoverflow.com/questions/tagged/android-maps-v2 *To start with MapsV2.* Here are few links to start with MapsV2 Getting Started with Google MapsV2http://venomvendor.blogspot.in/2013/04/getting-started-with-google-mapv2-for.html To create a custom overlay with custom typeface, I suggest you to see this Using Custom Typeface in Maps V2http://stackoverflow.com/q/15668430/1008278 If you want any help, let us know, Sharing is Caring. My Android Apps-(Rate Reviewhttps://play.google.com/store/apps/developer?id=VenomVendor ) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Loading Images Using HttpURLConnection Concurrently
It should not cause a 400 error, since the 400 error is caused by bad syntax. Specifying HTTPS is not bad syntax, and it should handle the exact same URL as HTTP (only the scheme being different). But do you know that the server you are using conforms well to the HTTP 1.1 spec? On Saturday, April 6, 2013 6:27:58 AM UTC-7, Alex Fu wrote: If possible, I would rather not. I'm using my own server to serve up data so for the HTTPS bit, I used a self signed certificate. Not sure if that's something that would cause the 400 error. On Sat, Apr 6, 2013 at 2:55 AM, Harri Smått har...@gmail.comjavascript: wrote: Hi, Is it possible for you to share an example of an image URL you're using? -- H On Apr 6, 2013, at 5:59 AM, Alex Fu alex@gmail.com javascript: wrote: I tested HTTPS and I'm getting a 400 Bad Request error when using mobile data. On WiFi, everything goes through smoothly... wth. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/zf4czg611ZU/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Alex Fu -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android 4.2 introduced SELinux enabled by default on kernel. am I right?
First of all, DroidMaster, this looks like you copied it verbatim from another website forum. Such crossposting is not always welcomed. Secondly, ignore the lmgtfy.com links, since he did not even give you the right set of keywords for useful Google queries. Thirdly, there seems to be some confusion on the part of the original poster (presumably you, but who knows?): SELinux is NOT a version of Linux, nor a competitor to Linux. It is a security component included with some distributions of Linux. I have had it in Fedora for quite some time now, I usually turn it off, since the default policies delivered with Fedora updates are such crap. You can also set a mode where SELinux only advises when a process does an access forbidden by policy instead of actually blocking it. http://www.revsys.com/writings/quicktips/turn-off-selinux.html gives examples of how to do this in Fedora, but it is not exactly clear how to translate that info to the Android Linux environment. Then again, the third of Lew's lmgtfy.com links is the only one with a good set of keywords. If you do more reading at the sites that turns up, I think you will find the answer for the Android Linux environment. On Friday, April 5, 2013 4:02:43 PM UTC-7, DroidMaster wrote: Dear Expert, 1. As I have understood correctly, Android 4.2 introduced SELinux enabled by default on kernel. am I right. 2. There are some of the apps might not work correctly. Do you know what kind of app is not working? 3. Is there anyway to disable it ? I check on VZW Galaxy Nexus - build JDQ39 - I am not sure what is the Linux version - Either SELinux or Linux. 4. What is the benefit of using SELinux vs Linux? 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Can this variable become null?
Both mentalities are bad. I would actually venture to say that the singletons are evil mentality is worse, since enthusiasts tend to grow out of the singletons are awesome phase. But if someone believes that all singletons are always evil, how do you persuade them of the depth of their error? This is a much harder problem: it is a complete failure to understand what a 'pattern' even is, and why the 'forces' are so important for understanding the pattern. On Friday, March 15, 2013 12:22:05 PM UTC-7, TreKing wrote: On Fri, Mar 15, 2013 at 7:56 AM, Kostya Vasilyev kman...@gmail.comjavascript: wrote: So, don't really understand what all the bashing is about. It's a tool, use it correctly, and you'll be fine; use it wrong, and you could end up with a sore finger. Word. The Singletons are evil, if you use them you're doing something wrong mentality is just as bad as the Singletons are so awesome I'm going to use them for every goddamn thing mentality. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] bluetooth file transfer failure
Thanks for posting that link, Lew. I try to follow that practice myself, too. But this link expresses it SO well. The only thing they don't mention that I find worthy to add is that while constructing that SSCCE, one often finds the solution to the problem. So it is worth the extra time, one must resist the temptation to fail to do it because of the time it takes. The time really is well spent. On Thursday, March 14, 2013 6:26:31 PM UTC-7, Lew wrote: Indicator Veritatis wrote: In order to answer your question, we need to see the code where you create and set mmInstream, too. For all we know, you might have forgotten to connect it to any stream, Follow this advice: http://sscce.org/ akash roy wrote: here i am trying to send a file over bluetooth but its not sending any data. here the main problem is that its not sending or receiving any data over the two devices but they are connected to each other. on configuring the bluetooth chat example. Sending code: File myFile = new File(message.toURI()); Are you quite certain 'message' translates properly to a URI that the 'File' constructor can use? Are you certain that the abstract pathname represented by the 'File' instance is accessible? Double nosofpackets = Math.ceil(((int) myFile.length() )/4096); 'Math.ceil()' makes no sense with integer expressions. It will only return the argument's value. Are you quite certain that the length of the file will fit in an 'int'? Why does 'nosofpackets' (a non-compliant name) have to be 'Double' rather than 'double'? System.out.println(nosofpackets); BufferedInputStream bis= new BufferedInputStream(new FileInputStream(myFile)); byte[] send = new byte[4096]; for(double i=0; inosofpackets; i++) 'int' would be a better type for a loop index. It's actually pretty strange to think about what a 'double' is doing here. { send = null ; So why do you null out this variable and forget and eventually de-allocate the array? a=bis.read(send, 0,send.length); NPE! You can't get the length of 'null'. You did not tell us you were getting exceptions. How come? What is 'a'? Log.d(BluetoothChat, data packet + i); if(a==-1) { break; } mChatService.write(send); } Receiving code : while((bytes = mmInStream.read(buffer))0) What are these variables? { Log.d(TAG, data is there for writing); bos.write(buffer); } Incomplete question, cannot be answered completely. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] bluetooth file transfer failure
In order to answer your question, we need to see the code where you create and set mmInstream, too. For all we know, you might have forgotten to connect it to any stream, On Wednesday, March 13, 2013 9:28:08 PM UTC-7, akash roy wrote: here i am trying to send a file over bluetooth but its not sending any data. here the main problem is that its not sending or receiving any data over the two devices but they are connected to each other. on configuring the bluetooth chat example. Sending code: File myFile = new File(message.toURI()); Double nosofpackets = Math.ceil(((int) myFile.length() )/4096); System.out.println(nosofpackets); BufferedInputStream bis= new BufferedInputStream(new FileInputStream(myFile)); byte[] send = new byte[4096]; for(double i=0; inosofpackets; i++) { send = null ; a=bis.read(send, 0,send.length); Log.d(BluetoothChat, data packet + i); if(a==-1) { break; } mChatService.write(send); } Receiving code : while((bytes = mmInStream.read(buffer))0) { Log.d(TAG, data is there for writing); bos.write(buffer); } -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: two activities running at same time
No, Kristopher is right. You came into a free forum asking for free help without providing much detail, and then told the unpaid assistance they could see the app itself only if they paid a few bucks. That IS unprofessional. It certainly does not encourage people to help you. On Saturday, March 2, 2013 3:57:46 PM UTC-8, ga...@deanblakely.com wrote: Kris It's a broadcast receiver it runs on receipt of an sms message and runs for less than a second. Just sends the phone location back to the sender. Re: trying to get money out of them? I'm a capitalist. I build products and sell them for money. Nobody has to buy them. Sounds like you are a little left of me. On Saturday, March 2, 2013 9:46:30 AM UTC-7, Kristopher Micinski wrote: Your app can't run unless you actually run it the first time, that's a security feature. (Yes, I know you're catching on boot.) Doesn't it seem unprofessional to start out asking developers a question and then trying to get money out of them? Kris On Sat, Mar 2, 2013 at 11:36 AM, ga...@deanblakely.com ga...@deanblakely.com wrote: Well, the app reliably works while other activities are running and when the phone is locked. I will have it on Google Play next week and you can try it for yourselves (for a couple bucks). It's called SignalBeacon. You send the phone a text and you get back the phones location. It doesn't have to be running. In fact it never has to run. It just has to be installed on the phone. Gary On Thursday, February 28, 2013 8:53:21 AM UTC-7, ga...@deanblakely.com wrote: I have an app with a main activity that has no visible interface (android:theme=@android:style/Theme.NoDisplay). The app is started by receipt of an SMS message in a BroadCast activity which kicks off another activity (also no GUI) that does work and then sends an SMS message. It works very well; actually better than I had expected because it runs even if other apps are running a foreground activity. Now I'm familiar with the Android Activity Lifecycle but I guess this means that Android (I'm using 2.33) can run many activities at once. Even when I'm running a very active GPS tracking application that is writing layers on a mapview, my no-display app starts does his work and sends the results out on an SMS message. The tracking app that was running never even blinked. I don't have any problem (at least not programming related), I'm just curious why this works. Regards, Gary -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: two activities running at same time
A Service is a lot like an Activity w/o a UI, but the lifecycle is different: you have to override a rather different set of callbacks, for example. Especially for a bound service.The rules for keeping the hosting process alive are different, too. Services do not go on the Activity Stack either. On Sunday, March 3, 2013 7:54:52 AM UTC-8, Kristopher Micinski wrote: Well, since a Service is just an Activity without a UI, you still get the same behavior... You shouldn't be running blocking operations in a service either (even if they're scheduled a bit more nicely), it just coordinates things. Kris On Sun, Mar 3, 2013 at 3:47 AM, Piren gpi...@gmail.com javascript: wrote: i think everyone just forgot to mention the obvious and what you seemed to get wrong: At no point what so ever were your activity and the other acitvity running at the same time. Only one activity can be running (as in Resumed state) at a time. Android has one UI thread, if you're using it, someone else is waiting. In your instance what happens is that your activity is launching, pausing the other app and then giving control back once it is done. It doesn't matter that it has no UI. I've used such activities myself and they have the nasty habit of making the phone appear unresponsive - even without a UI, it is still the top app, thus whatever app is behind it, while appearing to run, will not recieve any input commands and most likely have the UI itself hault. Since its only for a brief state, no one is the wiser. Either way, you should take TreKing's suggestion, you should not be using a activity for this, rather a Service (which btw, is an activity without a UI) with a background thread. On Sunday, March 3, 2013 2:00:25 AM UTC+2, ga...@deanblakely.com wrote: TreKing. You gressed it. Broadcast receiver. It's an activity that runs for about 600 - 700 mills. On Saturday, March 2, 2013 11:05:23 AM UTC-7, TreKing wrote: On Sat, Mar 2, 2013 at 10:36 AM, ga...@deanblakely.com ga...@deanblakely.com wrote: Well, the app reliably works while other activities are running and when the phone is locked. This may be the case in your testing, but this is not guaranteed. Your app can and will be killed at any point while it's in the background to make room for other components as the system requires. You will find this out quite quickly once you release the app users who manage to get into these type of edge-cases. It sounds like you should be using a Service. You send the phone a text and you get back the phones location. It doesn't have to be running. In fact it never has to run. It just has to be installed on the phone. Obviously it does have to run at some point to do anything. Maybe it runs in response to a Broadcast instead of user interaction but it doesn't just magically work without actually running some code. - 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-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Hearing Aid
Well, of course you are right. The only right way to proceed is to give up on the whole idea of using an Android phone as a hearing aid. But you know how it is: the OP may have been hired specifically to do such a thing, and not be at liberty to say, no, it is a bad idea. On Thursday, February 28, 2013 9:55:21 PM UTC-8, Lew wrote: Shaik Shabana wrote: Thanks John for your reply. Can you pls let me know how can I proceed now? Didn't he just? He described the shortcomings of the smartphone as a hearing aid and suggested that you proceed to investigate the history and state of the art of hearing aids. If I read his advice correctly, he advised you not to make a hearing aid out of a smartphone. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: two activities running at same time
Both Stack Overflow posts your refer to assume that both Activities try to control the display. But the whole point of his post was that he has one that does not use the display at all. So these do not apply. That said, I am a little surprised it works, too. After all, though there is no requirement that an Activity do display, that is usually the case, so it is the best tested case. I doubt the case the OP is doing is heavily tested at Google, but he seems to have lucked out; perhaps because it is less demanding to get it working and keep it working. On Thursday, February 28, 2013 11:58:49 PM UTC-8, Tamilarasi Sivaraj wrote: This is not possible. You cannot have multiple activities running at the same time. And you refer this http://stackoverflow.com/questions/6692552/running-two-activities-at-the-same-time-on-the-screen http://stackoverflow.com/questions/11102337/can-you-have-two-activities-running-at-the-same-time Regards Android developer Trinay Technology Solutions www.trinaytech.com 5705750475 On Thursday, February 28, 2013 9:23:21 PM UTC+5:30, ga...@deanblakely.comwrote: I have an app with a main activity that has no visible interface (android:theme=@android:style/Theme.NoDisplay). The app is started by receipt of an SMS message in a BroadCast activity which kicks off another activity (also no GUI) that does work and then sends an SMS message. It works very well; actually better than I had expected because it runs even if other apps are running a foreground activity. Now I'm familiar with the Android Activity Lifecycle but I guess this means that Android (I'm using 2.33) can run many activities at once. Even when I'm running a very active GPS tracking application that is writing layers on a mapview, my no-display app starts does his work and sends the results out on an SMS message. The tracking app that was running never even blinked. I don't have any problem (at least not programming related), I'm just curious why this works. Regards, Gary -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Debugging beta apps
It appears Guy misread the note. It has happened to lots of people on lots of issues. The note really is not talking about discontinuing ACRA, but about discontinuing storage of the ACRA report results as spreadsheets on Google Drive. This leaves us free to continue to use ACRA, as long we find our own storage. Or perhaps he thought this was a first step, and that ACRA deprecation was soon to follow. But that seems rather unlikely. On Sunday, February 17, 2013 3:04:24 PM UTC-8, Mark Murphy (a Commons Guy) wrote: On Sun, Feb 17, 2013 at 5:59 PM, Guy Smith g...@multiniche.orgjavascript: wrote: ACRA is essentially being phased out (IMHO) - see https://github.com/ACRA/acra/wiki/Notice-on-Google-Form-Spreadsheet-usage. You are welcome to your opinion, but there are plenty of ACRA back-ends available, including ACRA's own Acralyzer, that do not require the use of Google Spreadsheets. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Thread Loop
And since Blake was too shy to mention his own web site and book, let me do it for him;) The coverage of these issues in Programming Android is better than in many Android books, and in his webcast Concurrent Programming in Android is even better. IntentService is so handy, I am amazed it got so little coverage in Android Developer documentation all this time. Even with the vast improvements in the 4.0 docs, IntentService is still under-documented. There is a lot you can do with either this or Looper/Handler without having to resort to AsyncTask, which really has been over-billed in recent years as if far more flexible and useful than it really is. On Wednesday, January 30, 2013 4:54:16 AM UTC-8, G. Blake Meike wrote: First of all, congrats for not doing this with an AsyncTask. Second, as of Honeycomb, you may not touch the network from the UI thread (as you've probably surmised by now). The fact that you are getting that error message suggest to me that you are using a Handler *attached to the UI thread* You can't do that. TreKing's suggestion of an alarm, scheduled with the alarm manager, coupled with an intent service, is probably a good way to go. The Alarm manager fires a PendingIntent at the IntentService. When the IntentService gets the intent, it runs the server check. -blake On Tuesday, January 29, 2013 11:47:39 AM UTC-5, Diego Nunes wrote: Good afternoon. I need from time to time do a check on a server, because I'm not using AsyncTask do not need no update from my view. Then I used a Handler that runs a thread from time to time, and this thread makes access to the server. In Honeycomb versions running down blz, already in top get a exception: android.os.NetworkOnMainThreadException. Someone uses a different strategy to do this kind of task? Thank you. --- Diêgo Nunes Assunção Give Peace a Chance -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Uncaught exception thrown by finalizer - java.io.IOException: close failed: EIO (I/O error)
Especially since in his final comment, he does not tell us on which object he called 'close()';) After all: most of us are using HTTP 1.1 these days, with connection: keep-alive (the default), so it is mysterious that he is calling close() on the connection in the thread's constructor in the first place. So other readers have little to learn from this thread, since we have no sound knowledge of either his original problem nor of the fix. On Thursday, January 24, 2013 12:34:23 PM UTC-8, Lew wrote: Marco Serioli wrote: Mah.. I've no change in libraries and no change in code. Only Eclipse ADT plugin has changed. That does not span the universe of conditions. Since you provide no evidence of your assertions, we have no way of knowing how you erred. Lew Marco Serioli wrote: And why in your opinion in the past I got no exception? Because the conditions that triggered it did not happen before. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: get last connected bluetooth device
I don't see an API for this, but if you can add your own BroadcastReceiver to listen for ACTION_ACL_DISCONNECTED, and ACTION_ACL_CONNECTED you can at least maintain your own list of connected devices, and keep track yourself of which was last connected at the (low) ACL level. It is a broadcast, after all, so you can register your own receiver for it without worrying about interfering with or interference from Android's own receiver(s) for the same Intent. If that is too low level for you, then you will need a different procedure. If you have only IPC proxies you are concerned with, it is even easier (use BluetoothProfile.ServiceListener). But you did not even tell us whether your device is the BluetoothSocketServer or not, so I cannot describe any of these other procedures. But you are right that BluetoothAdapter.ACTION_STATE_CHANGED does not help you in this problem: that Intent is far too coarse, only telling you when the whole adapter's state has changed (e.g. on/off): connection of remote devices is not considered part of the whole adapter's state. On Thursday, January 24, 2013 11:51:56 AM UTC-8, Stefan Strobel wrote: Hi Community, how do I get the last connected / paired bluetooth device when bluetooth is being turned off? As far as I can see, I cannot access the last connected device listening to the BluetoothAdapter.ACTION_STATE_CHANGED broadcast. Neither can I get something work with BluetoothAdapter.STATE_TURNING_OFF. How would I get device name and device address of the last connected bluetooth device when bluetooth is turned off? Thanks! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to start again if some third party task killer has killed my app ?
The link you give is all very good background on tasks and the activity stack (a.k.a. 'back stack), but how does that help the OP understand what is different in third-party task killers and why it has such a different effect on his program? If the third party task killer does it by killing the hosting Linux process (as it is rumored they do), then he cannot even count on onStop() or onDestroy() being called. Unless he can count on the user running Honeycomb or later, in which case he can count on onStop(). Or are you guessing that the force close is due to a null pointer? That is a very common cause, but not the only one. But in any case, the OP should look in the logs to see what exception immediately preceded the force close. Perhaps after reading the link you gave;) On Wednesday, December 26, 2012 10:22:22 PM UTC-8, djhacktor wrote: Read this http://developer.android.com/guide/components/tasks-and-back-stack.html On Thursday, 27 December 2012 11:32:06 UTC+5:30, Amit Dwivedi wrote: In my App I have several activities which are obviously related to each other. Whenever I am on some activity and the user kills my app by using any task killer. I want to do two things 1. Clear the Notification which I added when the user logged in.. 2. finish all the activities other than the first Activity i.e. Login Activity Now if user starts again my app either from the recent tasks or from launcher I want to start from the first activity i.e. Login Activity... Presently my code works absolutely fine if I use android *manage process* and end the activity or force close the app from *android task manager*. But if I am using some other task killer app i.e. Advanced task killer, after closing the app when I relaunch the App from recent apps the it tries to restart from the last used Activity instead of Login Activty and gives an ugly force close error and when I click close it redirects me back to Login Activity... The Notification is also not cleared when in this case. How do I handle third party task killers ? I have read several threads on SO but couldn't get the pointers, few of them are ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AsyncTask design question
I see several people have already replied, and correctly explained that having just one AsyncTask is a bad idea. But none seem to have commented: the very question, posed as a choice between one AsyncTask vs. one for each screen, seems to imply a fundamental misunderstanding of the purpose of AyncTask. The purpose of AyncTask is not to handle something for every screen. It is to handle long tasks that do not belong in the UI thread in the first place, the prototypical example being the upload or download of a single file via HTTP, with occasional, light communication back to the UI thread, e.g. progress updates on that up/download. AsyncTask is not a general purpose multi-tasking tool. As has already been pointed out, you can call the executor only once, and then not again. So it is not good for a background task that sits and waits for messages, processing each in turn. Looper/Handler is more suitable for that. AsyncTask is more useful for one shot tasks, and specifically for those that take too long to allow in the UI thread. Even for these tasks, complications emerge when you use AsyncTask and the phone is rotated. See https://groups.google.com/forum/?fromgroups=#!topic/android-developers/4dW4-KMUKJI for several different ways of dealing with this complication, choose the one best for your own application. On Tuesday, November 13, 2012 1:44:16 AM UTC-8, Albertus Kruger wrote: Hi, I am new to Android programming. I would like to know if it is better to have seperate AsyncTasks for every screen on your application or is it better to have one AsynTask class that handles all processing from different screens on my application ? I have looked at stackoverflow but its still not clear to me. I'm thinking one class might be a lot of overhead and making seperate AsyncTasks for every screen of my application will be good for performance. Thanks for any advice. Albertus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android training
If the hotkeys don't work, there are a small number of possibilities. The possibilities that come to my mind are: 1) you listed the hotkey for both Windows machines and the Mac, but tried only the Mac; but are not running a Mac, or are running too old a version of the Mac OS 2) something is wrong with your installation of Eclipse, and it does not respond to the hotkeys 3) the instructions forgot to mention which window has to have focus when you try that hotkey, and you made some mouse motion that moved the focus to someplace it would not be if you had followed the instructions to the letter with no other operations intervening. Actually, I think 3 is most likely. I have verified myself that if the mouse cursor is placed in the Console and you try the hotkey, it fails. But it works in the file edit window itself (of course), and even in the Navigator (which is a bit surprising). But 2 is a possibility, too. For my first several months of Android programming under Eclipse, I could not get the hotkey to work reliably, so I use right-mouse click instead to bring up the context menu and allow me to select 'Quick Fix'. Yet under the current version of Eclipse (Juno) installed on a Windows 7 system, I have had no problem with it. Finally, a question for you: is http://translate.google.com helpful for understanding the English of either these posts or the Google Android documentation? Dutch and English are closely related, the translator should not have too much trouble. On Wednesday, August 22, 2012 8:00:57 AM UTC-7, Imnewhere wrote: What do they mean by: *Open the MainActivity class and add the corresponding method:* */** Called when the user clicks the Send button */ public void sendMessage(View view) { // Do something in response to button }* *Tip: In Eclipse, press Ctrl + Shift + O to import missing classes (Cmd + Shift + O on Mac). * http://developer.android.com/training/basics/firstapp/starting-activity.html (the hotkeys doesn't work) Is there a site in Dutch? It's hard to understand HTML And it's difficult to understand English (I'm a little kid that is intressed in programming) I have already done the previous lessons... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: I want to translate courses about Android on Russian.
That depends, of course, on whose lessons you want to translate. Google's? I would think they already have arrangements for that. On Friday, October 12, 2012 1:58:03 PM UTC-7, Нерон Спарда wrote: Where can i get a permission for it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Html implementation in android
The question is poorly put. These technologies ARE already implemented in Android. They are supported by the browser control, which you can use with the APIs WebView, JavaScriptInterface, WebViewClient, and WebChromeClient, all in the android.webkit package. If you find the online SDK documentation on these insufficient, you can always get sample code for them from the downloadable code for Chapter 16 of Manning Press's Android in Action (Third edition). Of course, to get the explanation, you have to get the book too, but anyone can download the code. And there are at least a few helpful comments in the code;) On Tuesday, October 9, 2012 4:27:19 AM UTC-7, Sadhna Upadhyay wrote: Hi everybody, i want to know that how to implement Java script,HTML and CSS in android.if any one know pls share with me. Thanks: Sadhana -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Accessing a database hosted on a server
Your reply, TreKing, reminds me of the classic joke: you ask a programmer if he knows what time it is, and he says 'yes';) But a little more of a hint would have been quite appropriate. I take an especial interest in this because if I had been the one designing the Android database API, I like to think I would have made it a lot easier for the client programmer to use the exact same sequence (after initialization) of API calls whether the database is located on the phone or remotely accessible via (for example) HTTP. But they did not do this, and it it really not obvious how best to approach the problem. Even many of the people answering the same question on StackOverflow admit there is no one, good solution to this problem, saying instead disappointing generalities such as There is no easy way of connecting Android DIRECTLY to a remote database. No wonder all the answers got such low ratings! On Thursday, October 4, 2012 12:13:15 AM UTC-7, TreKing wrote: On Mon, Oct 1, 2012 at 3:38 PM, Leandro Rodrigues leud...@gmail.comjavascript: wrote: Is it possible to connect me to a database and insert and delete data? Yes, this is possible. - 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
Re: [android-developers] Re: What is the best phone to buy for Android Development?
It is true, but misleading that the emulator may work for most cases. Unless you are doing a very simple app, you should not even think of uploading it to the market until you have tested it on a real phone, preferably unrooted, since that is what most users will use. It is imperative if you are using OpenGL, the video, camera or sensors. This is because there really are different bugs in each of these areas not only on different phones, but even different software releases for each phone. This is the infamous fragmentation Google loves to pretend does not exist. But it is real, and that keeps companies like DeviceAnywhere in business, since they can test your software on a staggering variety of phones. On Tuesday, October 2, 2012 8:12:16 PM UTC-7, newkedison wrote: I also think some emulator may work for most case. I have a Galaxy Nexus phone for testing the release version and also send it to my friends who have a Android phone. On 1 October 2012 16:09, Peter Webb r.pete...@gmail.com javascript:wrote: Doesn't really matter. I find myself testing on 4 different devices in the emulator - corresponding to different screen sizes. I have a question: what's the config for the 4 different emulator? I think the OS may include 4.1 and 2.3, but how about the screen size? --- http://newkedison.tk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the best phone to buy for Android Development?
Everything you cay about command line vs. Eclipse window could be true yet there would still be one overwhelming advantage for the command line: the Eclipse UI and documentation for how to do all this filtering is limited and put in odd places; it is much easier to find out how to use command-line redirection and grep on command-line output, and those are both well documented. The documentation is easy to find, too. Also, when the Eclipse window simply fails to display the logcat output, I can never figure out why (except for one case: when 'Device' got mysteriously de-selected, which should never happen but does happen). When the command-line fails to display it, I can easily figure out why. On Wednesday, October 3, 2012 10:57:10 AM UTC-7, Lew wrote: On Wednesday, October 3, 2012 2:36:34 AM UTC-7, gjs wrote: Hi, debug messages was to imply anything emitted by locat, System.out.. , System.err.. , printStackTrace from Exception etc And yes it's the same whether through Eclipse or otherwise, I suggested it can be painful when debugging in Eclipse with some real (non Google sponsored) devices that emit an excessive amount of these messages to find your own messages within that mess, filtering and redirecting to file and grep and changing buffer sizes and other time wasting [sic] steps aside. Some of the carrier sourced devices fill the default Eclipse buffer in a minute or so, particularly when GPS is on, the Google devices Galaxy S, Galaxy Nexus, Nexus 7 don't. As you say, the volume of output can be excessive, but if so, it's the same excess as in command line. I don't believe the steps to filter output and adjust buffer sizes can be considered time wasting. Time is wasted if it produces less value than it costs. These steps produce more value than they cost. While I normally use only command line myself, I find the Eclipse logcat window to be very flexible. It has all sorts of convenient tools to help you filter your messages, so if anything folks would find it easier to use than command line, contrary to your conclusions. It lets you dynamically filter on debug level, process id (pid), regexes, app, tag or specific text. AFAICT it's infinite, so buffer size is a non-issue, and it has buttons to save the output and manage your filters. YMMV, but I don't recommend scaring people off the Eclipse logcat window. -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: abstract Uri?
You question the 'naturalness' of his desire to use 'new', but you don't seem to notice: you have merely moved the question, not answered it. Of course it is 'unnatural' to call 'new' on an abstract class, but he was asking why it was made abstract in the first place. You did not address this. Nor does the Google documentation of the class. All you did was move the question to why is calling a factory method more 'natural'? After all, factory methods are for when you do NOT know ahead of time exactly which class the created method will be. But why would that be the case here? THAT is what needs to be explained. Nor is it clear why you think there should be no obvious implementors of a class named 'Uri'. One obvious implementation of a class with such a name would be 1) Constructor takes string, returns (opaque?) integer handle for uri 2) methods for opening, closing, fetching resource at uri given by handle. But this is not the way Google did it; the Uri class instead has a noticeably more restricted scope. It does not provide methods for opening a Uri and fetching resources. Instead, the main methods provided are for analyzing the Uri string itself, breaking it down into port, authority (if any), query string etc. Other objects are then responsible for fetching. What benefit they got from doing it this way is far from clear, especially since they are now recommending use of java.net for external HTTP access for recent versions of Java, using android.net mainly for the internal Uris used for Content Providers. As for using the Wikipedia entry, I have been often disappointed by Wikipedia entries on OOD topics before. This time also, since they put the reader through an alleged Java example of the Factory method (complex numbers), and then admit that strictly speaking, it is not even an example of the pattern. This is NO help to the learner, and little help to the seasoned programmer. Finally, it is ironic that you observe (correct though that is), that use of factory methods is prevalent throughout the Java API. For java.net.URI is NOT abstract, but android.net.Uri IS abstract. The similarity of these names is probably a large part of why the OP expected both to be concrete. Both claim, after all, to do roughly the same thing: represent a URI (one immutable, the other mutable). The differences in the API alone do not really explain why they made it abstract. bob wrote: Can someone help me understand why the android.net.Uri class is abstract? You got the what, now for the why. Naturally, I want to do something like this: I question the naturalness of that desire. Uri uri = new Uri(http://www.example.com/file.mp4;); It's more natural, some would say, to use a factory method. (Google Java factory method and you'll find, e.g., http://en.wikipedia.org/wiki/Factory_method_pattern#Java, complete with reference to Josh Bloch's advice on the matter.) It's entirely unnatural to want to call a constructor on an abstract class. Such a class with no obvious implementors is a signal that it has a factory method. This is quite prevalent in the Java API. The why is to save the client from messy and irrelevant details of the implementation. You shouldn't have to decide which particular flavor of 'Uri' to instantiate, especially if the thing is tricky (e.g., has to support an ever-expanding list of protocols). Let the factory manufacture you one and you save all that headache. Study up on the reasons to prefer a factory method, and when not to. -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the best phone to buy for Android Development?
Yes, testing on real devices is important and useful for all the reasons you gave. But there are others. For one, it takes a ridiculously long time to launch the emulator. Hook up a real phone via USB instead, and it is ready in under 10 seconds. Another: the permissions are different on a real phone and the emulator. You automatically have root permissions on the emulator. Not so on the phone. This means that if you want to test the software in the environment the user will see (and you really should want this), you get a much closer match by using a real phone. So summarizing briefly, yes, you can do a lot of useful testing on an emulator, and it is a cheap and easy way to test on various screen sizes. But before you release your product to the market, it must be tested on a real phone, and should be tested on as many as possible. On Tuesday, October 2, 2012 5:40:32 PM UTC-7, gjs wrote: Hi, The world doesn't comprise Eclipse alone. Wow really! Thanks for letting us all know... A real device is useful for testing various hardware features - bluetooth, nfc, hd video recording, sensors - accelerometer, barometer, compass, gryo, magnetic, wifi direct etc etc Regards On Tuesday, October 2, 2012 6:22:44 AM UTC+10, Lew wrote: gjs wrote: I'd suggest using the latest Google Android device, currently that is the (Samsung) Galaxy Nexus, but rumors suggest it is to be updated very soon (?) Main reason is that the Google phones allow you to see your own debug message on the console pretty easily, where as most other phones have so such junk debug messages on the console, that they swamp your own debug messages making it difficult to test debug your own apps. You can filter debug messages but the console fills quickly (in Eclipse) anyway then has to be reset. I assume that by debug messages you mean the logcat contents. You can filter those by command-line quite readily also, for example into a text file, that you can examine at your leisure. You can also modify the buffer size to capture more data, or run the adb logcat command in the background redirecting to a file for an arbitrary amount of data. If you can live without relying on debug messages through Eclipse then any good recent phone will likely do, eg Samsung Galaxy S3, HTC One X, etc. The Google phones get OS updates before other phones as well. The world doesn't comprise Eclipse alone. Nilashis Dey wrote: I am new to Android Development and would like to know which phone I should get to test my apps? Obviously, I would like the phone for which drivers for all devices are easily available and for which I would find the most amount of support discussions online - for when I run into problems. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to make a video player.
Your question has a lot more to do with Flash than with Android. On Sunday, September 30, 2012 9:39:51 AM UTC-7, Sukhchain wrote: hey. i want to play an online live video from a server. for that i want to develop a flash embeded player... can any1 tell me hw can i develop that player the video is on rtsp protocol -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google has received a subpoena seeking information related to Android applications
Good assumption, even if it turns out not to be true in this case. I would not, for example, have assumed that the phone number in the message was a genuine FBI office number unless independently verified. Why the FBI would need that much detailed information for the stated purposes is also suspicious. All they really need to know is whether or not the developer responsible for uploading to the alternative market is the same as the one uploading on Google. They do not need the developer's full contact info for that. If they were really concerned with fighting piracy rather than reaping domestic intelligence, they could have a third party compare contact info and let them know which are matches w/o revealing the data: kind of like a contact information escrow agent. On Tuesday, October 2, 2012 8:15:05 AM UTC-7, Nathan wrote: Wow, if I'd gotten it, I'd probably assume it was a phishing message, and that somewhere there was a link to verify the bank account associated with your developer account. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NDK - What is host system?
I am pretty sure host system in this context means the system the build will actually run on, i.e. the phone itself. 'androideabi' looks like a typo. 'armeabi' does occur. Could that be what you meant? 'android' goes without saying, after all. The list of supported abis is in the doc subdir of your ndk installdir, in the file CPU-ARCH-ABIS.html sec. I.1. 'armeabi' is listed, 'androideabi' is not. On Friday, September 28, 2012 12:36:49 PM UTC-7, KNERD wrote: I am getting this error while using the NDK on a project: checking build system type... i686-pc-linux-gnu checking host system type... Invalid configuration `arm-linux- androideabi': system `androideabi' not recognized aconfigure: error: /bin/sh ./config.sub arm-linux-androideabi failed It's obvious what the build system type is, but the documentation seems to not even mention what a HOST SYSTEM TYPE is. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to publish paid apps when your country is not in Merchant list?
Using a bank in a country on the merchant list is one alternative, another is to use a different Android market, such as slideme.org, which has more flexible payment arrangements. I would not use getjar.com, since they only allow the 'freemium' model, which is useless outside of games. On Tuesday, September 25, 2012 7:01:48 AM UTC-7, rahul wrote: I’ve one question. How do application developers from the countries who are not in this merchant list (like India) publish there paid apps in the market. I mean there must be some way. Do they have to open a bank account in other country like US and open a merchant account from that. Is it allowed legal? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Where to download the Lenovo A2901 ADB interface USB driver?
If it is a Windows driver you are interested in, go to the Lenovo website for your Lenovo and select the right USB package (including lots of drivers, I forget the exact name). Download from there. On Tuesday, September 25, 2012 3:48:38 AM UTC-7, mw1 wrote: I can't find the Lenovo A2901 ADB interface USB driver? Any comment? Thank you 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: checking WI-FI
Judging from Harry's link, where neither the documentation nor the code sample say what it will do if there is the wi-fi is off, I would guess you get the return value for no connection. But nothing to differenetiate between wi-fi present and on but w/o connection and wi-fi not present, off, or broken. On Tuesday, September 25, 2012 3:15:07 AM UTC-7, Saurabh Khemka wrote: How to check programmatically whether a device's wi-fi is on or not using phonegap? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Offline Maps Won't Calculate Route Without a Data Connection
I a sure it does require a lot of data, but as the OP described, all that data should have still been in cache. It is not at all clear why you believe there is absolutely no way ... stored on a mobile device; not when the user can see the map data for the whole route. On Thursday, September 20, 2012 9:55:30 AM UTC-7, MagouyaWare wrote: Until Google looks at fixing this situation, In my mind there is nothing to fix... Do you have ANY idea how much data is required to calculate a route between two points? There is absolutely NO way that much information could be put into the maps application and stored on a mobile device. I think they did a great job of allowing you to use GPS once you've already gotten the route data with a data connection. That is awesome... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Sep 19, 2012 at 12:03 AM, David GESG drs...@gmail.comjavascript: wrote: Until Google looks at fixing this situation, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Getting started with Android. Love the overall system architecture and SDK except for one thing...
Google's approach to documentation has its frustrating points, and to be sure, finding the right XML name for the concept/class/value you find in the API documentation has always been a frustrating experience. But it should not be THAT frustrating. Also, some of the gaps in concept presentation you complain about in the online docs and tutorials are better addressed by the better books on Android. My favorite has long been the Manning Press Unlocking Android (with slightly different names in different editions), but there are other good books, too. Mark Murphy's is quite good too, as is anything by Reto Meier. If you are reluctant to spend $40 or more on a book you are not sure is the right one for your needs, Safari Bookshelf now offers many of them through your local public library. And Murphy's in older editions (dated, but still valuable) are available for free download. For that matter, if you have the patience to read undocumented code, most of these books have the code downloadable for free. You do not have to buy the book to find and download the code. But of course, the code is explained only in the text, with very sparse comments in the code itself. The suggestion about ApiDemo is also good, but those tend to demonstrate only the very basic elements of how to use the APIs, they leave out a lot of details only some of which are in the API documents. Not so long ago, people answered questions about such details in all seriousness with read the source code:( But really: how is all this any worse than in iOS? When I did a small iOS project, I had to learn iOS from scratch. At first, I was in awe of how the iOS documentation covered important aspects Google had left out of Android, but when I actually started trying to apply what I learned there, I found out that they too left out a lot of important info. A typical problem I found, for example, was that Apple still offers as their most uptodate sample code, code that was written under the 3.2 version of Xcode, using old APIs no longer recommended, workarounds no longer needed and not even using storyboards. Sure, you can let Xcode convert it to a 4.1 project, but then what are you learning from the sample code? Certainly not how to design the connections between storyboard and callbacks. So at this point in time, I am convinced that Apple's support of iOS and Google's of Android are about equally frustrating. It is just that the particular problems are different, such as not having to wait for approval before your app goes on the market in Android, but facing arbitrary delays with Apple. On Sunday, August 19, 2012 9:17:51 AM UTC-7, rmz76 wrote: ... I hate the way UI is handled. Perhaps I will love it once I get my head around it, but as of now, I really prefer the way iOS development handles this. My background is predominately Web so I'm no stranger to mockup languages. In general with the Android SDK I found everything to be well documented and to just makes sense until I got to the XML driven layout aspect of Android. I understand everything is a View. That concept is easy to grasp, but what's difficult is to find a really good reference for all my available controls with contextual (and visual) examples of their use. There are sites that demonstrate use patterns but these are missing code samples. This puts the the developer in a situation where they go on a goose chase. Don't tell me they are built into the visual design tool for Eclipse, it's crap and I refuse to use it. A reference should exist outside the visual editor and that's what I'm looking for. Also do not point me to the general SDK API documentation for views. I don't want to sort through hundreds of classes trying to extract TextView, Button, etc (what an incredible time sink that is). My process has been working like this. 1. See interesting UI pattern implemented in popular apps: x and y 2. Go to Internet trying to track down possible Android UI components to implement feature seen in apps x,y 3. Try to find source examples of implementing controls I am inferring are being used (this is usually a try and repeat cycle taking hours) 4. After much trial, frustration and anger finally retreat to something else. I'll give an example of such a feature: Horizontal view swiping. From the official Android Play store to the CNN App, this is probably the most common navigation we're seeing for dealing with menus on Android. It's beautiful, it's also a pain in ass to implement. After much searching I found an article on this on the official site http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html I can open the source example and understand what's going on but my question is why does it take pages and pages of foundation code to implement something that should be core? IMO this is where Android development is much more complex than it
[android-developers] Re: how to get reference to GLSurfaceView's rendering thread?
Well, I may have overstated my case: it is not THAT bad, like stop() or suspend(), which fully deserve their deprecation, since they are so broken. But neither is it that good. If you are using it a lot, it is a strong hint, though not a proof, that you are going about something the wrong way. For when following the safe-threading practices well established in the industry since Birrell, synchronization uses locks/monitors instead of directly affecting the scheduler as join() does. However, the prohibition is not absolute, like the prohibition against stop(), destroy() or suspend(), which are officially deprecated, and have been for a long time. It is more like a warning that you are probably following the wrong idiom, since its best uses are so rare. Code using join() to do synchronization may indeed work. If all your other threads really do refrain from accessing state in the waiting thread and you have verified with a wait-for-graph that deadlock is impossible, you are most likely quite safe -- until somebody modifies your code forgetting what made it safe. However, Birrell included join() in Topaz but then said it was rarely used, Berg described it as used very rarely, and as I already mentioned Goetz gave only one example of a concurrency pattern using it. Finally, there was a very good talk last week at the SF Android Meetup given by O'Reilly author Blake Meike on concurrency in Android: his basic thesis was that concurrent coding should use as first choice AsyncTask, as second choice, Looper/Handler; only when these fail to provide what is needed should one even resort to Java's new java.util.concurrent classes. Only when truly desperate should one consider going to even lower level code, such as Java 1.2 support for concurrency, including join(). Now of course he realizes (as do I) that there are exceptions, when you really do need to resort to java 1.2 support bypassing even such handy goodies as Executors and concurrent collections (e.g. BlockingQueue). But they are not common. Bugs in multithreading code are much more common, especially when low level code is used too often. On Saturday, August 4, 2012 1:21:49 AM UTC-7, Ecthelion wrote: Can you briefly explain why join() is supposed to be so bad to best almost never use it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to get reference to GLSurfaceView's rendering thread?
Of my two favorite books on concurrency in Java, one recommends never using join() in the first place, the other uses it only for a poison-pill in an implementation of producer-consumer when you know you want to shut it down if the queue ever empties completely. Now I realize it is not very helpful to say don't do that without offering a better alternative, but I see from the other responses that this is not a simple problem. The best I can do to help is say 1) as above, don't use 'join()', which is so rarely the right tool 2) don't wait until onDrawFrame() is called to load libraries. That is much too late in the process. Even waiting for onResume() might be too late. 3) the suggestion of using AsyncTask for loading libraries is good, but see Meike's talk about the 'gotchas' of using AsyncTask. It is at git://github.com/bmeike/OSCON.git. BTW: those two books are Multithread Programming with Java Technology by Berg et al, and Java Concurrency in Practice by Goetz. On Thursday, August 2, 2012 8:18:04 AM UTC-7, Latimerius wrote: I'd like to call join() on it to make sure the thread has exited. (Broader context for those interested: I have a crash in my GL-based app that happens like this: - device is put to sleep with my app in the foreground - an incoming call wakes the device up - I receive onResume() and I call onResume() on my GLSurfaceView - I receive onPause() almost immediately after onResume() since the phone app goes to the background due to the incoming call - the time between onResume() and onPause() is rather short but enough for GLSurfaceView to go through all of its setup up to and including the initial onDrawFrame() call - my onDrawFrame() goes into texture geometry loading routine which can take up to several seconds so it's still loading when onPause() is called as mentioned previously - like many people here I have a globally-accessible method of retrieving a reference to my main Activity to be used as the current Context. This is used while loading graphics data to read asset files. - this Context reference however gets nulled out in onPause() in an attempt not to leak main Activity instances. As the main thread running onPause() nulls it while the rendering thread is still needing it to finish loading the program crashes. The idea is to call GLSurfaceView.onPause() and then wait until the rendering thread actually exit. Then null the Context reference.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: adb devices is showing the device as offline.what is reason? How can i switch the device from online - offline viceversa?
You are right to be skeptical of the answers already give you. Clearly, adb is running. But what is not clear is whether or not adb has already got itself into a confused state. Although I have not had the exact same problem you report, I have been able to address similar problems by stopping and then restarting the adb server: that is what I do when I know the device is there, but adb devices does not report it. And although I cannot think of why it would make a difference, it seems to work more reliably if I do this as superuser (on my development system, which runs Linux) than if I do it as a regular user. Of course, that is not much help to you if you have to run a monkey over night. But it might at least help you narrow down what the problem is. On Wednesday, July 18, 2012 12:00:45 AM UTC-7, Sreedhar Reddy V wrote: Hi I connected My android ICS device to my windows PC using USB. I executed adb devices from my pc. The output --- List of devices attached id device --- After a long time of say 12 hours, i ran the same command adb devices from my pc. The output --- List of devices attached id offline --- I am not sure what went wrong. i did not even touch my pc, and my device. I made settings in my PC so that it will never sleep. I am running monkey scripts which wont make android device to lock as well. Many people said that ur device is offline because adbd deamon is not running on android device. But this is wrong, why because if adbd is not running then the device will not be listed at all. I came across adbd deamon process which will be running on my android device. For my device to get detected by adb(server on my pc) adbd must be running. I went to adb shell I stopped adbd using the command stop adbd This stopped my adbd deamon on android device.because adbd is stopped mt adb(server on my pc will not detect my device) Now adbd is not running, I execute the adb devices command the output is, list of devices with empty list. The output --- List of devices attached --- because the device it self is not detected i cannot log in to adb shell again to start adbd adbd deamon on my device. so I shutdown and rebooted my android device, this made my adbd deamon to run again. Now when i executed adb devices on my PC The output --- List of devices attached id device --- By seeing this output it is very clear that adbd deamon is running on device, because if adbd is not running then the device will not be listed at all. Now the question is? what is the reason for the device to go to offline? (i am very sure that adbd deamon not running is not at all a reason for this.) How can i switch the device from online - offline viceversa? I am very very thank full to any android expert who solve my confusion. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Error codes
A lot of wish we had that information! If it doesn't show up in Google searches (especially in Stack Overflow), then you can always search the source code at AOSP. If you can't find it even there, then it is likely proprietary, in which case we are just out of luck. On Wednesday, June 27, 2012 11:31:11 PM UTC-7, Butti wrote: I need no know some error codes. For example MediaRecorder : start failed -12. What is the meaning of -12?? And also setOutputFormat called in an invalid state: 4 Which state? 4 means what? Is there any documentations for these error codes' meanings? 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] which is best Handler or Timer ?
This answer is true and correct, but could have used a little more explanation. The Timer class is included because it is expected in Java. But it is not particularly suitable for the way tasks and processes should be handled on an Android phone. Handler is. The OP can define an arbitrary message and get the effect of a timer by posting the message to the pre-existing queue with sendMessageDelayed(arbitraryMessage, timerInterval). Or if more convenient, instead of a message, put the Runnable you want executed on the queue with postDelayed(Runnable). The choice of which is best depends on your application's individual circumstances, but I prefer the message approach, unless doing a splash screen (for which see http://stackoverflow.com/questions/5486789/how-do-i-make-a-splash-screen-in-android). Now for 'suitable', what I mean is: if you (the OP) use the Message approach, you do not have to define your own thread for the Timer, so you sidestep all the issues of thread management, letting the system handle it. See the class reference for Handler for details. On Friday, March 23, 2012 1:33:19 PM UTC-7, Dianne Hackborn wrote: Handler. Just don't use Timer, Handler is the Android-centric mechanism. On Thu, Mar 22, 2012 at 10:53 PM, Perumss Naren peru2...@gmail.comwrote: Hi , which way is best in performance is Handler or timer i need to update textview as timer every second need to update time so which one will be best please tell the reason. because i need the reason thanks in advance public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); timer = (TextView) findViewById(R.id.timer); // handler.post(mRunnable); task = new UpdateTimeTask(); handler.post(task); } private Runnable mRunnable = new Runnable() { @Override public void run() { timer.setText(dateFormat.format(new Date())); handler.postDelayed(mRunnable, 1000); } }; class UpdateTimeTask extends TimerTask { public void run() { timer.setText(dateFormat.format(new Date())); handler.postDelayed(task, 1000); } } -- Regards, Perumal.N -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.comandroid-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to keep activity running
I see the thread has progressed quite a bit from this original question, but I still feel the need to answer this original question clearly: you should certainly not override the onDestroy. If it gets called the need for you to release resources is genuine, you should just do it. Others have already mentioned using Service, this is certainly going to play a major part in your final solution, however you decide to factor your business logic between the Service and the Activity (or Activities). Providing a place in the background for things to go on for a long time even when the Activity goes away is the major purpose of having a Service. On Monday, March 19, 2012 6:39:41 AM UTC-7, RedBullet wrote: My application is a GPS nav type app. Needs to be running when I am doing a route. It appears that the system can decide to kill my process (I see onDestroy) get called for example. So, what's the right policy here, should I over-ride the onDestroy and just have it do nothing, but provide a way to manually kill the activity? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Suspend from market?
I would also expect that the email NOT come from a gmail.com address: it should come from google.com. On Sunday, March 11, 2012 8:24:21 PM UTC-7, James Black wrote: I have never got a suspension, but on this page they have an example of a message that would seem more likely to be legit, though I don't know anything about the merits of the issue on this page, just looking at the suspension email: http://omgdroid.com/well-known-app-dev-team-better-android-apps-suspended-from-android-market-no-reason-was-given/ If you were to be suspended I doubt they will give you two days, as that means someone has to do something two days from now (too much work), so if you aren't suspended now I would guess it is a fake. On Sun, Mar 11, 2012 at 7:15 AM, -Marcel- marcel.hifin...@gmail.comwrote: *Real or just a fake? * *Subject: Notification From Google Play From: Android Market Support androidmarketsp...@gmail.com* Hi, This is a notification that the application, *[APPNAME]*, with package * [PACKAGE-ID]* should be removed from Google Play in 2 business day due to a violation of the Developer Content Policy. For specific details regarding this particular violation, please see the Spam and Placement in the Store section of our Content Policy. In case the application is not removed, the Google Play publisher account will be suspended. *I'm not sure, but I think it is a fake...* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: draw texture in OpenGL Android from 0,0 coordinates
Use absolute screen coordinates in OpenGL? That defeats the purpose of much of OpenGL. The reason it takes you from world coordinates to object coordinates to camera coordinates to clip coordinates to device coordinates is (among other things) so that you never DO need to know the device (absolute screen) coordinates. Yes, all those coordinate transforms can be quite confusing, especially for a beginner, but please understand that they are there for good reasons instead of trying to bypass them all. http://www.opengl.org/resources/faq/technical/transformations.htm#tran0001 is one of the better explanations on the web of all these transformations. The post by Dark Photon at http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflatNumber=233764 is also very good. You might want to start with it. On Friday, March 2, 2012 12:44:03 AM UTC-8, Rikki wrote: Thanks for the reply. I did the same thing but its getting difficult to manage the coordinates in floating points. Is there a way out to use the absolute screen coordinates in OpenGL? if so can you provide with some example to do it. On Feb 10, 6:44 pm, niko20 nikolatesl...@yahoo.com wrote: No, you shouldn't change the vertices if you don't have to. To move an image just perform a glTranslate. So what you do is like this: glTranslate(0,0); DrawYourImage(); glTranslate(x,x); DrawYourImage(); glTranslate(x,x); DrawYourImage(); Etc. -niko On Feb 8, 12:58 am,Rikkitteam...@gmail.com wrote: I'm new to opengGL and excuse if the questions are too naive. I'm going through some tuturials for seeking help on learning this. I have a small program written where i'm drawing a texture on a GLSurfaceView. I want to draw a number of textures(bitmap images) in a sequential order starting from 0,0 coordinates. Also I need some gap in images on the screen. Please help. Do I need to change the positioning of vertices buffer. please suggest. For more code details, checkout hte below link: http://stackoverflow.com/questions/9188857/draw-texture-in-opengl-and...-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: reading pdf file in my android app
You are looking at the wrong part of the vogella tutorial. Look a little further down at section 5, titled, 5. Read an existing pdf On Wednesday, February 29, 2012 5:16:03 AM UTC-8, Jags wrote: hi all, i am trying to read a pdf file in my android app. i realised, unlike safari in iphone android webview does not render pdf file as a local url . hence i am exploring itextpdf. i followed following tutorial http://www.vogella.de/articles/JavaPDF/article.html#installation while reading file, the author is trying to create a file using PDFWriter. he also uses writer to get a page as in Image. My question is, is it essential to use a writer ? cant we use only reader to extract entire page as an image ? what i plan here, is get all pages as an image and put them in a scroll view. thanks in advance jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: reading pdf
Please do not post essentially the same question under slightly different titles. It tends to attract trolls. As for how to read a PDF file, please see the answer I gave in the other thread on that. Use the same tutorial, but look further down: you are looking at the part where he is teaching how to write files, look where he teaches how to read them. On Wednesday, February 29, 2012 5:14:24 AM UTC-8, Jags wrote: hi all, i am trying to read a pdf file in my android app. i realised, unlike safari in iphone android webview does not render pdf file as a local url . hence i am exploring itextpdf. i followed following tutorial http://www.vogella.de/articles/JavaPDF/article.html#installation while reading file, the author is trying to create a file using PDFWriter. he also uses writer to get a page as in Image. My question is, is it essential to use a writer ? cant we use only reader to extract entire page as an image ? what i plan here, is get all pages as an image and put them in a scroll view. thanks in advance jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Beginner Question
As you say, this structure is kind of messy, and even the name for it may strike you as a little 'messy';) It is called an anonymous class. You might want to look it up in the classic online tutorials originally created by Sun and now maintained by Oracle. I found it messy too, and I still find the standard indentation of the anonymous class annoying. But I decided to learn to live with it because 1) it is extremely common, and that not just in Android Java 2) there is one big, good thing it does for us: it spares the reader from having to track down all references to the class to verify that it really is instantiated only in that one place. This really does simplify debugging. It also explains why it is heavily used in Swing and JavaFX as well as Android. In fact, that is pretty much what the above-mentioned tutorials says at http://docs.oracle.com/javase/tutorial/uiswing/events/generalrules.html#innerClasses. On Feb 22, 8:58 am, rhaazy rha...@gmail.com wrote: Hi everyone. I'm not sure if this question belongs here but here goes.. I am a professional asp.net developer looking to get into android dev. I have been going through tutorials and having fun so far! I have a question related to how the tutorial is asking me to structure my code. The code is from a tutorial where I create a gridview and set up a click listener event: gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView? parent, View v, int position, long id) { Toast.makeText(HelloGridViewActivity.this, Position: + position, Toast.LENGTH_SHORT).show(); } }); To me this structure is kind of messy, what I would like to do is have the function, public void onItemClick be by itself, so that I can do something more along the lines of: (psudo code) gridview.setOnItemClickListener([somehow reference the function here]); Is what I'm asking possible? Does my question make sense? Is there a more appropriate group to ask this kind of question? Thanks very much for your 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] Re: Getting problem in adding GSON Jar library
Replace com.google.gson.Gson with com.google.gson.* and see if that does the trick: that is what I have in my working code using Gson. I should know Java well enough to know why one works and the other does not, but I keep forgetting;) You might want to check Order and Export tab under Java Build Path too: the jar for Gson should come after that for for your own code and for the version of Android you are building for. Again, that is what I have in my working code. On Feb 21, 10:07 pm, Passion Android passion4andr...@gmail.com wrote: I'm trying to use GSON in my project, but my application is crashing, with logcat saying that com.google.gson.Gson cannot be found. I've put import com.google.gson.Gson on my class files, I have gson in my package explorer, and added it by Right click - build path - add libraries. It also shows up in Project-properties-java build path-libraries tab-gson. What have I done wrong? Rickky San Jose -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hello Everybody, i am developing an android App with Bluetooth.
Correction: they are line numbers, just not in YOUR code: e.g., 461 is a line number in AdapterView.java, which doesn't help much. As for your original logcat listing, what you need to do here is notice that this is a Runtime exception thrown because you don't have a method for addView(View, LayoutParams) in the view you added, AdapterView. And indeed, if you look at the up to date javadoc for AdapterView, you will find that it throws an exception for most combination of addView, in particular, for the one you tried to do. AdapterViews are not supposed to get their views this way. So the REAL question is: why are you trying to call addView on an AdapterView? On Feb 13, 12:32 pm, Mohamed Gougam mblack...@gmail.com wrote: there is no more then 174 line in my code and this is in the .java file, while the XML files are twenties and 58... so those numbers are not line numbers... On Mon, Feb 13, 2012 at 10:56 PM, Kostya Vasilyev kmans...@gmail.comwrote: This has nothing to do with API level. As for line numbers, here they are: 02-13 13:02:11.538: E/AndroidRuntime(196): Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView 02-13 13:02:11.538: E/AndroidRuntime(196): at android.widget.AdapterView.addView(AdapterView.java:*461*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.view.LayoutInflater.rInflate(LayoutInflater.java:*622*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.view.LayoutInflater.rInflate(LayoutInflater.java:*621*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.view.LayoutInflater.inflate(LayoutInflater.java:*407*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.view.LayoutInflater.inflate(LayoutInflater.java:*320*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.view.LayoutInflater.inflate(LayoutInflater.java:*276*) 02-13 13:02:11.538: E/AndroidRuntime(196): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java: *198*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.app.Activity.setContentView(Activity.java:*1622*) 02-13 13:02:11.538: E/AndroidRuntime(196): at android.mgo.helloandroid.BTDdetecetwithV7Activity.onCreate(* BTDdetecetwithV7Activity.java: 44*) 13 февраля 2012 г. 22:33 пользователь Mohamed Gougam mblack...@gmail.com написал: isn't it related to being using Version 7 ? would it make sense if i try the code on a API Version8? PS: no there is nothing such as line number, everything was displayed on the LogCat screen is posted. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hello Everybody, i am developing an android App with Bluetooth.
Then it sounds like you just answered the question. Can we take this as a general rule, that a ListView should not have another ListView as a child view? What other restrictions are there on what it can have as child views? On Feb 13, 2:45 pm, Kostya Vasilyev kmans...@gmail.com wrote: 14 февраля 2012 г. 2:37 пользователь Indicator Veritatis mej1...@yahoo.comнаписал: So the REAL question is: why are you trying to call addView on an AdapterView? He's not, the framework is -- since the ListView in the XML has children (and one of those is another ListView, oh my). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: A proof for being Android developer
That is by far the best proof. Get an app on the Android Market. Even getting it up on one of its far less well known competitors is good, but the Android Market is so much better known, you may as well start there. On Feb 8, 10:22 am, Todd Grigsby tgrigsby...@gmail.com wrote: Have him download one of your apps. On Feb 8, 2012 10:20 AM, Ofir ofi...@gmail.com wrote: Hi all, I need to prove to a potential client that I'm an Android developer, registered at Google. How can I do this? Is there some kind of certificate I can send him? All I've got now is the receipt for the 25$ fee... Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Logcat is broken every time phone is unplugged
Although I dont' remember encountering exaclty the same problem, the unreliability of logcat display from inside Eclipse is the reason I long ago got into the habit of runnig logcat in a Terminal window (I run Eclipse under Linux, not Windows) instead. But even then, when I disconnect the USB cable for the phone, I find that often I have to restart adb. But this is a lot less drastic than restarting Eclipse. So that is what I suggest you try: stop and restart the server using the adb command from a terminal window (or a command shell) when you see that problem. It is a lot faster than restarting Eclipse. On Jan 14, 12:24 pm, Keith Wiley kbwi...@gmail.com wrote: Every time the phone is unplugged from USB, the logcat is permanently corrupted in that the when the phone is reconnected, logcat does not reestablish. Restarting an app, either in debug or run mode produces zero logcat output after that point. Closing the logcat window view and reopening it has no effect. The only solution is to quit and restart Eclipse. Therefore, I must quit and restart Eclipse every time I take my phone with me and then later return. I've been having this problem since day one with Android development, three years ago. In that time I have installed new versions of Eclipse and numerous updates to the Android SDK and Eclipse plugin. Nothing has ever improved the situation w.r.t. this bug. Anyone know anything about this? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to Printf in Android development ??
What 'Console'? Are you referring to DBMS output? In that case, as others have alreeady answered, use android.util.Log, either Log.d or Log.w methods. There is no 'console' on the device itself, output should instead go to a View. On Jan 13, 1:19 pm, Haider Ali haideralichoudh...@gmail.com wrote: Hello every one, Can any one help me how can I Print some line in Console ??? It is not working through printf(); ? Best Regards Haider Ali Ch. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: MVC Architecture
Why? Because the Wikipedia entry on the topic just is not that good. In fact, MOST of the sites that show up in a Google search for MVC are just not that good. The only sites I found on the topic that are good are: 1) apple developer sites on it and 2) IBM developer works. (in the developer works search field, enter model view controller java). 3) Ward Cunningham's Wiki on Patterns: http://c2.com/cgi-bin/wiki?ModelViewController So I suggest instead of just Googling mvc or model view controller he should narrow things down to the good stuff with apple developer mvc. The article in Cocoa Design Patterns is particularly good, though several others are also well worth reading. Everything I have read in the Apple Developer Library concerning MVC is quite applicable to Android -- and MUCH better written than anything in the Android documentation. Let me repeat that: MUCH better written. Once you have read a few of these sites, you will understand the pitfalls of the point of view that In most cases, I think, you are a mere user of MVC implemented by Android SDK. If you are a naive user of the SDK classes, and are not very aware of what the MVC pattern is, then you will make mistakes in applying it despite the design of the classes, and you will NOT benefit from the 'pattern-ness' of the MVC pattern. A classic example of how to fail to benefit from the pattern-ness is shown in Lecture 1.pdf of Stanford University's CS193 course on iPhone programming, which shows both how to do it and how NOT to do it. It is available from iTunes University, free. Again: everything in that lecture concerning MVC is just as applicable to the Android SDK. Even the name changes are slight. On Jan 13, 1:41 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: I am with TreKing on this one. The question is very vague. Does Sree want to know about MVC in general? His question certainly looks so. If so, then it's hardly Android SDK, and Wikipedia has an entry for it, so why wasting people time and bandwidth. This list seems to have a lot of noise like that (victim of Android's success) and one receives around 50 posts every hour, out of which maybe 3 are relevant, well formed and interesting. If it is about MVC in Android, then it is still quite generic and speculative, but interesting. I don't think that you implement MVC as such as long as you use Activity and View objects. You could, when taking full controll of the screen, like in a game with your custom UI. In most cases, I think, you are a mere user of MVC implemented by Android SDK. Activity hosts Views so it is a View + Controller, but can easily hold Model objects too, in case when model is small. Model could also be implemented separately by a Service or Content Provider. Daniel On 13 January 2012 08:20, Android2ee mathias.seguy...@gmail.com wrote: Ok, nice first answer. The question is not stupid, because an Activity mix life cycle and view, so implementing MVC is not so obvious. And to make simple, your activity manage lifeCycle and delegate GUI to your GUI package. In that package you do usual MVC. In fact you implement usual layers separation (Model, View, BuisnessService, Service (i mean android service), DAO (that contains usual DAO and your Content providers) and you also have the Communication layer and the transversal one), as usual in Java. You just need to manage your models' life cycle according to your activity life cycle. And it should work. On Jan 13, 6:21 am, TreKing treking...@gmail.com wrote: On Thu, Jan 12, 2012 at 10:46 PM, Sree sreelathapavul...@gmail.com wrote: I want some information about MVC Architecture http://www.justfuckinggoogleit.com/ --- -- 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 -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to convert morse sound to text???
It would if there were an Android API for it. I am not aware of one, and I doubt one exists. This is rather a fairly simple (audio) signal processing task. What does have to do with Android is the question: how can he use the phone's microphone to listen to the sound, what APIs should he use to generate an audio stream out of it (for that signal processing)? The answer to these questions is not obvious either. On Jan 12, 10:47 am, TreKing treking...@gmail.com wrote: On Thu, Jan 12, 2012 at 2:13 AM, ludy ludy...@gmail.com wrote: i use audiorecord to record morse sound ,and then need to convert morse sound to text,how to do that??? Write the code to do that or use a library. This has nothing to do with Android specifically. - 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
[android-developers] Re: OpenGLES Double Buffer malfunctions
Do you have to use 8 bits for each of RGB? Surfaces and textures on many Android devices only support 565, as has often been reported in this group. What has not been so clearly reported is what goes wrong if you specify the wrong (unsupported) values. Are you checking for EGL error codes after setting this configuration? On Dec 27, 4:15 pm, Bram Stolk b.st...@gmail.com wrote: Hi, I am experience flicker in the visuals, which after some investigation, turns out to be caused by drawing taking place in the FRONT buffer, instead of the BACK buffer. I've found this old thread on this issue:http://groups.google.com/group/android-developers/browse_thread/threa... I can see the flicker happening, even with absence of any touch events. Visuals that are overdrawn later in the frame are briefly visible none the less. The only way I can explain this behaviour is that the drawing occurs in the front buffer. Some details on my code: - I use OpenGL ES2 - NDK r7 - Device: Acer Iconia Tablet running Android2.3 - Using NativeActivity, with all-C code, no java code - Using this spec for choosing GL config: const EGLint attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_DEPTH_SIZE, 16, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_NONE }; - Only do glClear(), one glDrawArray with LINES, and one glDrawArray with TRIANGLES per frame. - Use eglSwapBuffers() at the end of my engine draw func. Any tips on how I could fix this? thx, Bram -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Found solutions
Well, Jim tnx fr the amusement, bt it is more fruitful to refer the OP to http://catb.org/~esr/faqs/smart-questions.html On Dec 27, 9:57 pm, Jim Graham spooky1...@gmail.com wrote: On Mon, Dec 26, 2011 at 03:02:32AM -0800, theinfor wrote: So, who anyone found solutions ? 42 I got the same problem, but i don't know how to fix it. Uh huh. Please help me if you got solution I told you...42. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W Do not look into laser with remaining eye. Android Apps Listing athttp://www.jstrack.org/barcodes.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenGL ES 2.0 for Android
I'll take your word on that one, since I haven't had time to look at at that thoroughly myself yet; but I do know that a genuine must read is The Orange Book, which is downloadable in an earlier edition from http://wiki.labomedia.org/images/1/10/Orange_Book_-_OpenGL_Shading_Language_2nd_Edition.pdf or you can buy the latest from Amazon. This book has the best explanation I have ever seen of the programmable pipeline in OpenGL 2.0. Unfortunately, it is all about OpenGL rather than OpenGL ES, but such is true of most of the reference this thread has shown to date. Then again, the basic concepts are best explained in books like this one, then you can rely on the difference specification from Khronos to learn to apply it to OpenGL ES. On Dec 26, 10:26 pm, bob b...@coolfone.comze.com wrote: On Dec 26, 8:52 am, the_edge123 theedge...@gmail.com wrote: On Dec 26, 11:05 am, bob b...@coolfone.comze.com wrote: What is the best way to learn OpenGL ES 2.0 for Android? What kind of tutorial are you looking for ? are you a beginner ? What did you already find ? This is really good too: http://en.wikibooks.org/wiki/GLSL_Programming/Vector_and_Matrix_Opera... Plus, I wrote my own shader: private final String mFragmentShader = precision mediump float;\n + varying vec2 vTextureCoord;\n + uniform sampler2D sTexture;\n + void main() {\n + vec2 center = vec2(0.5,0.5);\n + float intensity = 1.0 - distance(vTextureCoord,center);\n + gl_FragColor = texture2D(sTexture, vTextureCoord) * vec4(0.0, 1.0, 0.0, 1.0) * intensity;\n + }\n; Here's a pic of it: http://i1190.photobucket.com/albums/z449/m75214/122711002015.jpg -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL ES 2.0 for Android
The best way? Probably to use the Orange Book (see post below) and study the sample code in both Android and Apple iPhone online documentation, which is quite good on OpenGL ES. On Dec 26, 2:05 am, bob b...@coolfone.comze.com wrote: What is the best way to learn OpenGL ES 2.0 for 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] Re: how to block application installation
Yes, it really does sound like malware. I hope someone is tracking who asks these questions useful only for writing malware. On Dec 15, 11:58 pm, Anil Jagtap anil.so...@gmail.com wrote: Sounds more malware than an application. You cannot do it, installing and removing apps is users choice. -- anil jagtap Android Application Developer On Dec 16, 12:19 am, suganya lakshmanan suganyalakshmana...@gmail.com wrote: I want to block application installation in android..The user downloads the app from android market. If the user tries to install the application i should block the application installation. i want to create an app like that..If the user click the install button my application should block the installation.. How i can block the installation ...can anyone help..Thanks in advance.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to root Android 2.3.3
While your response may have been somewhat harsh, I think it is fair to say that the OP's command of English is nowhere near the level required to understand any of the lists of instructions for 'rooting' that he might find at any of the forums you so vaguely direct him to. He should focus on learning English instead. Otherwise he is just going to brick his phone. On Dec 15, 10:20 pm, Jim Graham spooky1...@gmail.com wrote: On Thu, Dec 15, 2011 at 04:04:38PM +0800, Teanor Soprano wrote: Dears, We aren't your dears. Hope you are great day, I am not a day. Days are merely a passage of time, consisting of 24 units of a smaller amount of time (which, in turn, consist of 60 even smaller units of time, which, . and so on). They can't respond to your questions. *1. How to root Android 2.3.3? I have many many android smartphones, and tablets. But i don't make this Action. * Step 1) Find the appropriate forum to ask how to root your device. Step 2) Read the instructions that are probably already posted as a sticky post. Step 3) If you don't already know what step 3 is, do NOT proceed to step 4. Step 4) Follow instructions and hope you get it right. If not, fall back to what you (hopefully) did in step three. *2. **Also android tablets can't access local network servers(hostname example:test). How can I access?* Really? Mine does. Start by reading the relevant sections in the Android Developers Guide. Work through some example apps. Then, if you have any specific questions about your code, post the relevant bits of code, relevant sections of the logcat output, and describe what is going wrong. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) | DMR: So fsck was originally called spooky1...@gmail.com | something else. Running FreeBSD 7.0 | Q: What was it called? ICBM / Hurricane: | DMR: Well, the second letter was different. 30.44406N 86.59909W | -- Dennis M. Ritchie, Usenix, June 1998. Android Apps Listing athttp://www.jstrack.org/barcodes.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android videoview fullscreen problem
You may not admit it, Pavan, but if the admins were to take any punitive/disciplinary action, you would be at least as worthy a target as Jim. For just as he said, everything he said about the difference between what you did and what you should have done is true. You do not have to take my word for it, you do not have to take his word for it. You can figure it out for yourself by reading any one of the several Internet etiquette FAQs with titles like How to ask an intelligent question e.g. http://catb.org/~esr/faqs/smart-questions.html People who actually get effective answers quickly follow the advice of such sites and do not waste their own time and ours on petty flame- wars. On Dec 16, 1:54 am, pavan kumar valluru pannipa...@gmail.com wrote: Mr. Jim, No thanks for your reply with unwanted and useless suggestions. I think it would be better if you can concentrate on your own shit other than smelling others. See Mr. a** ***e, I think this is not the place for amateur and impudent persons like you. It would be appreciated if you can unsubscribe from this group. In case you are an administrator, there are many people showing their middle fingers, as you have sent many unpleasant responses. If you think you are good enough with your English, start learning social behavior. PS: If any of the administrators reading this mail who started this group for a good cause, Please rethink about the membership of this person(Jim Graham) again. On Fri, Dec 16, 2011 at 7:02 AM, Jim Graham spooky1...@gmail.com wrote: On Wed, Dec 14, 2011 at 07:18:03AM -0800, pavan valluru wrote: Awaiting your suggestions. Thanks alot. Suggestion #1: Don't post the same sh*t a second time. Suggestion #2: You posted a second time after 25 minutes. Were you honestly expecting an answer within that time? Sometimes you'll get an answer that quickly. Sometimes it takes longer before someone decides to respond. Other times, nobody will respond. If you expect to get an immediate response (or even get a response at all---here, you rely on others to volunteer their time to help you, and you may or may not get the help you're expecting), find a PAID tech support site, PAY THEM, and get your answers. Oh, and, by the way, alot is not a word. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) | DMR: So fsck was originally called spooky1...@gmail.com | something else. Running FreeBSD 7.0 | Q: What was it called? ICBM / Hurricane: | DMR: Well, the second letter was different. 30.44406N 86.59909W | -- Dennis M. Ritchie, Usenix, June 1998. Android Apps Listing athttp://www.jstrack.org/barcodes.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 about passing intent between two activities
I would if I could, but you are the one who has to do it. On Dec 13, 3:01 am, Abhishek Chaudhari abhi...@yahoo.in wrote: unsubscribe my email id from this group please. From: SH sung...@identityhive.com To: Android Developers android-developers@googlegroups.com Sent: Monday, 12 December 2011 10:22 AM Subject: [android-developers] Problem about passing intent between two activities Hi all. I have an app and fixing errors/bugs. But I have problem when NewPictureNote.java calls PhotoTaker.java using startActivityForResult() to take a photo and save. My code uses callback and put binary data into Intent to return to previous activity. Here is the code: //PhotoTaker.java public class PhotoTaker extends BetterDefaultActivity implements SurfaceHolder.Callback{ //.. public void clickHandler(view v){ //. Intent returningIntent = new Intent(); returningIntent.putExtra(EXTRA_IMAGE_DATA, jpegPictureData); setResult(RESULT_OK,returningIntent); finish(); break; } } //NewPictureNote.java public class NewPictureNote extends BetterDefaultActivity { // protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); try { //If we are getting a response from our picture taking activity if(requestCode ==REQUEST_CODE_TAKE_IMAGE) { //If it was successful if(resultCode == Activity.RESULT_OK) { //do something } else { //The user cancelled or an error occured setResult(Activity.RESULT_CANCELED); finish(); } } else { //... } } catch (Throwable e) { //... } } When I debug code, clickHandler() method in PhotoTaker.java works well. It calls till the end of the clickHanlder() but the Activity won't close and onActivityResult() does not work. Please let me know what problem is? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Connecting to a server on a LAN
How else would you want to connect? There is no Ethernet connector on most Android phones. So your only other option would be some non- standard kludge using USB as your Layer 0. After all: your 3G or 4G connection is outside the LAN. On Dec 5, 4:21 am, Wernher dei14...@gmail.com wrote: Hi members! I'd like to connect my Android mobile device to a server on a LAN, as to contact a webserver. I simply need to establish a connection with this webserver as to get some data updates for my mobile application. I've almost prepared the java code, but i'd like to ask you a question. How do i connect the device to the lan server? Do i absolutely need a wireless router to connect the phone to, or is there another way i could connect the phone to the server and get the data via webservice? Thanks in advance for your help, Wernher -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Open Raw Socket in Android
The Java Sockets API does not support raw sockets for security reasons. On Nov 28, 6:30 pm, Sai louis.as...@gmail.com wrote: Does anybody know how to open raw socket s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW) in an Andriod device which is not rooted? I am going to develop some Apps which need to open raw socket but seems it does not work if the machine is not rooted. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: URGENT HELP : Bypassing Default Camera Viewfinder
I gave you an answer for doing something fairly close to what you are trying to do, but not identical. But now it seems that for whatever reason, you are determined to go beyond that to take over the Camera object's SurfaceView. That is not supported by the framework, nor is it clear that it should be. What is so wrong with letting the Camera object do its job? On Nov 17, 10:22 pm, s.rawat imsaurabhra...@gmail.com wrote: Hi Veritatis. I completely agree with you on the formatting part (I have the byte array which I can convert into any format and I am doing it via bitmap only) Here is the code : //initializing the compression and Byte Stream Part ByteArrayOutputStream bs = new ByteArrayOutputStream(); YuvImage yuv_image = new YuvImage(*buffer1*,20 , 640, 480, null); // Doing the Compression part Rect rect = new Rect(0, 0, 640, 480); yuv_image.compressToJpeg(rect, 70, bs); //Finalzing the image writing part as JPEG outStream = new FileOutputStream(String.format(/my/image/location)); outStream.write(bs.toByteArray()); jpgView= (ImageView)findViewById(R.id.jpgview1); //Bitmap Part BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 1; Bitmap bm = BitmapFactory.decodeFile(/my/image/location); bm = BitmapFactory.decodeByteArray(baos.toByteArray(),0,bs.toByteArray().length); *bs is of type -- ByteArrayOutputStream and jpgView -- ImageView* If I supply the continous frames buffer1 to I YuvImage will be able to see the video on the ImageView. So now instead of previewing it on Imageview I wanted to Utilize the existing camera Viewfinder(Surface Holder- Surface-Jsurface..) to preview image and videos but to do that I dont know whether I have to tweak Framework/base/* camera files or that can be done on the Application level only(the android application - and not Application framework) One neat hack will be to preview everything on some media player(not via using android media framework - that can be but not sure wether it will fit as it is tagged with the camera internally)so that it will give the user the impression that the viewfinder is turned ON though the media player will be ON displaying the continous frames and not the Camera Viewfinder. PS : Title of this post is about giving the frames(Dummy as for now) to the Camera ViewFinder.Just a summary :) ! Rgds, Saurabh What continuous jpeg frames? The only 'continuous' frames in the viewfinder are the preview frames, and those are not jpeg: they are YCrCb at 15 fps. Unless you make your own jpeg out of YCrBb, but why bother? You need a Bitmap for the Canvas for SurfaceView anyway: you may as well use RGB or ARGB instead of JPEG (see Bitmap.Config). Then no conversion is necessary. In fact, it is not useful with a Canvas, since it is not among the formats listed on Bitmap.Config. ..pain is temporary.quitting lasts forever.. On Fri, Nov 18, 2011 at 8:33 AM, Indicator Veritatis mej1...@yahoo.comwrote: What continuous jpeg frames? The only 'continuous' frames in the viewfinder are the preview frames, and those are not jpeg: they are YCrCb at 15 fps. Unless you make your own jpeg out of YCrBb, but why bother? You need a Bitmap for the Canvas for SurfaceView anyway: you may as well use RGB or ARGB instead of JPEG (see Bitmap.Config). Then no conversion is necessary. In fact, it is not useful with a Canvas, since it is not among the formats listed on Bitmap.Config. Now if you are willing to live with the Camera object's preview, you can let it display the frames, but capture the frames also for your own processing using the Camera.setPreviewCallback() method to register your own handler for each frame. I realize this does not do exactly what you asked for, but it is a lot less work than what you are proposing, and gives you much of what you probably really need. On Nov 17, 11:26 am, s.rawat imsaurabhra...@gmail.com wrote: Hi, I am trying to by-pass the default camera viewfinder and making an application which will give the Surfaceview some continuous jpeg frames (instead of getting it from Camera view finder)., but I have realized its quiet a gigantic task and I have to modify the files in the framework/core/jni(native calls), framework/core/java and services and client as well and even the CameraHardware.cpp for this as Surfaceview(Surfaceholder instance) connected with the mCamera instance (as the fully initialized SurfaceHolder is to be passed to the setPreviewDisplay()(which is connectd with the Camera Hardware code).So i wanted to ask these questions: (1) Is it possible to bypass the default camera view finder at the application (android application code) level. (2) I am able to generate the video by passing the continuous jpeg frames to * image view*(running in a thread being spawned form the main thread until i press stop), can I also in some way pass these frames
[android-developers] Re: URGENT HELP : Bypassing Default Camera Viewfinder
What continuous jpeg frames? The only 'continuous' frames in the viewfinder are the preview frames, and those are not jpeg: they are YCrCb at 15 fps. Unless you make your own jpeg out of YCrBb, but why bother? You need a Bitmap for the Canvas for SurfaceView anyway: you may as well use RGB or ARGB instead of JPEG (see Bitmap.Config). Then no conversion is necessary. In fact, it is not useful with a Canvas, since it is not among the formats listed on Bitmap.Config. Now if you are willing to live with the Camera object's preview, you can let it display the frames, but capture the frames also for your own processing using the Camera.setPreviewCallback() method to register your own handler for each frame. I realize this does not do exactly what you asked for, but it is a lot less work than what you are proposing, and gives you much of what you probably really need. On Nov 17, 11:26 am, s.rawat imsaurabhra...@gmail.com wrote: Hi, I am trying to by-pass the default camera viewfinder and making an application which will give the Surfaceview some continuous jpeg frames (instead of getting it from Camera view finder)., but I have realized its quiet a gigantic task and I have to modify the files in the framework/core/jni(native calls), framework/core/java and services and client as well and even the CameraHardware.cpp for this as Surfaceview(Surfaceholder instance) connected with the mCamera instance (as the fully initialized SurfaceHolder is to be passed to the setPreviewDisplay()(which is connectd with the Camera Hardware code).So i wanted to ask these questions: (1) Is it possible to bypass the default camera view finder at the application (android application code) level. (2) I am able to generate the video by passing the continuous jpeg frames to * image view*(running in a thread being spawned form the main thread until i press stop), can I also in some way pass these frames to Surface holder(surface view so that I can see the video in the viewfinder- my understanding is that Surface holder is responsible for the viewfinder on the camera) (3) Any other way to implement this without delving deep into the Android framework. Plz suggest . Rgds and Thanks for your reply Saurabh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is there Android RS232 sample code ?
Why would there be sample code for this when you can get a USB-RS232 converter for under $30 at Fry's Electronics? Just do it through USB, let the converter do the rest. On Nov 17, 2:54 am, mark2011 androidmark2...@gmail.com wrote: Dear All : I am a new learner of Android. My cell phone is android 2.1. I want to communicate with other computer(windows xp) through rs232. Is there any sample code? Thanks. BR, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Should I use the same certifcate for all my apps or a different one per app?
If you only release one app that will be available in both free and paid version, then I see no advantage. If you plan to release other apps, you could achieve the same effect by adding to your test checks on the package names as well as on the certificate. So I still see no need for multiple certificates, which makes your own key management more tricky. On Oct 28, 11:27 am, Ricardo Amaral mas...@ricardoamaral.net wrote: I suppose the documentation recommends one certificate per developer, so all apps belonging to someone, are, somehow, associated to that one developer. But I'm wondering if there is anyone out there using one different certificate per app and what are the advantages of doing so? If any... mm But that's not really the question I want to make. I'll be releasing a free and paid versions of my app and I'm opting for the method where the paid app simply unlocks full functionality. I'll be using the process described in a thread around these groups. Where you check for the certificates of both packages and see if they match. If they do, then the user has unlocked the pro version. My question is about this specific situation. Is there maybe any reason I should use a unique certificate for these 2 apps? And if I release another free/paid pair in the same unlock model, I would use another certificate for those 2. I could then have another different certificate from the previous 2 for all other apps that do not use this unlock method or that are simply free. Is there any advantage in doing so? Or there is none and I should just use a single certificate for everything? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: protected mode?
The ARM processor family has one unprivileged user mode and six privileged ones. In order for VIZIO's explanation to hold water, someone would have to have written bad code for one of these modes, almost certainly in the kernel. Did VIZIO do their own build of Android and its kernel for this tablet? On Oct 28, 11:13 am, bob b...@coolgroups.com wrote: On the recent x86 desktop processor, protected mode is used to ensure processes don't jack with other processes' memory. How does Android and the ARM processor typically handle this? One reason I'm wondering is because my VIZIO tablet got jacked up and required a factory reset. I called VIZIO trying to figure out how this happened. They claimed I probably downloaded a bad app. I don't see how the OS would permit a bad app to do that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android SDK is the must buggy SDK in the entire mobile ecosystem.
They really do not like Windows at Google. I remember a news item claiming that they were requiring all of their own developers to get off of Windows and use either Ubuntu Linux or Apple OS X for development. Of course, they were supposed to continue to test for Windows compatibility before release (and I am sure they do), but it is not only at Google where they are best at testing and catching bugs in the environment that they themselves use. Strange though: I had no such problem when I upgraded my Win7 system's Eclipse installation to use the latest Android SDK. But this is an often overlooked factor in testing. Though it may be worse on Windows, it is true on any platform: one user's installation will work just fine, but another's will fail, even though both are the same OS and very similar configuration. This is why test matrices have to be carefully designed -- and tend to be large when they are. As for 'alpha' level, yes, it is frustrating. But let's not forget: it was Netscape that started the lamentable habit of putting alpha level code out there and calling it 'beta'. On Oct 28, 7:52 am, Peter Sinnott psinn...@gmail.com wrote: There are a lot of tools for helping with issues like this. http://www.emptyloop.com/unlocker/ Kinda sad really. It makes it look like no one in the installer team bothers to test with the most popular platform. On Oct 28, 1:48 pm, sblantipodi perini.dav...@dpsoftware.org wrote: Obviously I closed everything before posting here, the problem is that the SDK Manager isn't able to rename the folder because it is using it itself -_- On Oct 28, 2:43 pm, Kostya Vasilyev kmans...@gmail.com wrote: Close any processes that may be using this folder: Explorer, any command line windows, Eclipse... To be fair, installers are usually able to deal with this (file used by application xxx, click here to close, or click here to retry, or click here to complete after reboot...) -- Kostya 28.10.2011 16:35, sblantipodi пишет: http://postimage.org/image/8nqmbfarj/ Clearly no software is using the tools directly except for the SDK Manager itself. I really can't belive that google is offering similar products to developers. I have no time to loose behing this. -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to calculate area of a polygon of points on the map?
Like Justin said, yes, there is a way. But you will have to write the code yourself. I suggest you do a little calculus using the formula INT(xdy-ydx) going around the curve traced by the polygon, where INT stand for integration along a path. On Oct 18, 10:40 am, Turim turim_thi...@hotmail.com wrote: is there any way or WebService to make this calculation? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: capture video
See the SimpleVideo example in the download files for Chapter 10 of Android In Action, which source files you can download from http://code.google.com/p/android-in-action/ On Oct 11, 10:28 pm, mohana priya gpriyara...@gmail.com wrote: I am created new instance of class for camera.I need to know how to capture video in android.Please tell me how to do so .Thanks in Advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: GL-related Crash on Xoom/Tab 10.1 requiring removal of battery or shell reboot?
When I read the bug description, it does not sound that severe, because it is easily reproducible only on Nexus. Other devices are described as either not having the problem at all or only after a long time of running OpenGL mixed with other apps. So if you have sound data that it is happening more often than described, you should add that to the bug. On Oct 10, 3:12 pm, Peter Sinnott psinn...@gmail.com wrote: Does anyone even pay attention to issues logged against the project? I imagine they are ignored like the public bug tracker. On Oct 10, 7:54 pm, Robert Green rbgrn@gmail.com wrote: Isn't this that really awful GL-related bug I've been talking about for nearly 2 years? I can't believe this still exists in honeycomb, worse yet that it's nearly unrecoverable to tablet users that can't remove their battery and don't have enough technical knowledge to use ADB. http://code.google.com/p/android/issues/detail?id=7432 IMO this should be upgraded to severe. It's been plaguing Android devices since 2.1 W/SharedBufferStack( 136): waitForCondition(LockCondition) timed out (identity=3, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 78): waitForCondition(ReallocateCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 78): waitForCondition(LockCondition) timed out (identity=5, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 381): waitForCondition(LockCondition) timed out (identity=7, status=0). CPU may be pegged. trying again. W/SharedBufferStack( 136): waitForCondition(LockCondition) timed out (identity=3, status=0). CPU may be pegged. trying again. ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the use of Handler object in the constructor of the ContentObserver class?
That is not the introductory article on the topic. You would have been far better off saving taht deoc for reference and starting with http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html, which has long been the classic tutorial for covering database usage and ContentProvider. Now I admit, it isw confusing that there is no separate tutorial for ContentProvider -- you are somehow supposed to magically glean that Notepad is the tutorial/sample code to study. And there are multiple version of Notepad in the sample code and tutorials, too. Really, a nodding familiarity with all of them and a thorough familiarity with one is the best preparation for understanding ContentProviders. It is also helpful to remember a key phrase from http://developer.android.com/guide/topics/providers/content-providers.html, which you should also read before and after doing the Notepad tutorial: Content providers store and retrieve data and make it accessible to all applications. That is the key difference between ContentProvider and any other way of storing and retrieving data: it is accessible to all applications. Now it also happens to be so that it is accessible by a UIR scheme, but this, interesting and useful though it is, is secondary in importance. On Oct 12, 10:07 am, Dinesh Bajaj dinesh.bajaj...@gmail.com wrote: Hi, I have read the Android doc on the ContentObserverhttp://developer.android.com/reference/android/database/ContentObserv...class, but am not able to understand what is its use? What will be the difference if null instead is passed to the constructor? My understanding is that a Handler object is used to pass a message to the thread on which it is created, but I can't understand its use in the context of passing it to the ContentObserver. I would be grateful if someone could throw light on this. Thanks, Dinesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the use of Handler object in the constructor of the ContentObserver class?
And now for a more direct answer to your immediate question: yes, you are right. The Handler is for passing a message to the thread on which it (the Handler) was created. But that is precisely what a ContentProvider needs for receiving a message telling it that the relevant database view has been updated. That is what the verbage at the link you gave means, when it says, This method [onChange] is called when a change occurs to the cursor that is being observed. Now just in case that was too brief and quick, let me connect all the dots: 1) as you observed, the constructor ContentProvider(Handler) takes a handler. The comment says, The handler to run onChange(boolean) on. 2) but this onChange is the one I mentioned above: ContentProvider has to know which handler to use, so it takes that info in the constructor argument 3) the mysterious 'cursor' is a database notion. It is roughly analogous to the cursor on your computer screen, keeping track not of LCD display but of the current read position in the database. So when they say, cursor that is being observed, they are referring to database changes. 4) Obviously if the ContentProvider is to work at all, it needs to know about database changes, even if it is just just the current read position (cursor) that has changed. This will all seem SO much more clear when you see it in the Notepad example code. On Oct 12, 10:07 am, Dinesh Bajaj dinesh.bajaj...@gmail.com wrote: Hi, I have read the Android doc on the ContentObserverhttp://developer.android.com/reference/android/database/ContentObserv...class, but am not able to understand what is its use? What will be the difference if null instead is passed to the constructor? My understanding is that a Handler object is used to pass a message to the thread on which it is created, but I can't understand its use in the context of passing it to the ContentObserver. I would be grateful if someone could throw light on this. Thanks, Dinesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Fwd: Compuetr Vision Applications on Android
If you spelled it 'compuetr', then that would explain why you were not able to answer your own question with a Google search. Simply googling computer vision tutorial comes up with a LOT of tutorials. The Robotics Society one should be pretty good. As for computer vision on Android, take a look at the code for 'zxing'. On Oct 2, 8:41 am, Rahul Ramesh msg4ra...@gmail.com wrote: Hi, Hope you are doing fine. I'm a beginner in the area of Andorid Development. I've developed some very simple apps in the recent weeks. I would like to try my luck on a project which utilizes Computer Vision techniques. I'm looking for nice tutorials or articles related to the topic. So I'd really appeciate if anyone could point me to some helpful resources on the web, related to computer vision in Android apps. Regards, Rahul, Student. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: suspend a Thread
But why would you want to suspend the thread? There is a good reason for the deprecation of the Thread.suspend() API: you make it too hard to avoid deadlock if you use it. Just let the scheduler do its job. On Oct 1, 8:42 pm, bob b...@coolgroups.com wrote: How do you suspend a Thread on Android? I have a background thread, and I need to write the onPause method. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to install APK programmatically without user prompt
I hope and assume that by 'nigher', you meant, 'neither'. For it is a security hole. Then again, every rooted device is like swiss cheese when it comes to security holes. Now that I know you are developing this for a rooted device (it would have helped had you mentioned this in your first post on this issue), I can see the general architecture of a solution: write your own installer, bypass the built-in installer completely. Since the user has root privileges, so does the custom installer; you can violate security in SO many ways! On Sep 27, 9:04 am, Pratik Prajapati pratik.prajap...@gmail.com wrote: Its in rooted device, but no option for user to do adb. Its nigher for phone nor for tablet market. -- Regards, Pratik Prajapati On Tue, Sep 27, 2011 at 8:55 AM, Kristopher Micinski krismicin...@gmail.com wrote: On a non rooted device? Well that's a nice security hole to hear about. Kris On Tue, Sep 27, 2011 at 11:28 AM, Pratik Prajapati pratik.prajap...@gmail.com wrote: Implemented and working fine now. -- Regards, Pratik Prajapati On Tue, Sep 27, 2011 at 12:10 AM, martypantsROK martyg...@gmail.com wrote: I truly hope you nor anyone else ever figures out how to do it. Windows is plagued with such junk. On Sep 17, 2:32 am, Pratik Prajapati pratik.prajap...@gmail.com wrote: I need to install some non market place APK programmatically *without *user prompt. I found some links on stackoverflow, but all those mechanism will prompt the user. Is there any way to do it with some APIs or I should use 'pm install apk name' command (doing with system() api)? -- Regards, Pratik Prajapati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: HTC and LG haven't implemented Android in the right way
Now that I know what you are doing with the point attentuation, I see that you are not using it for anti-aliasing, so that comment turned out to lead to a dead end. As for why it is not supported, yes, it is in the Open GL standard, but is it in ES? ES doesn't support everything. And what do you get on those phones when you query glGet(GL_POINT_SIZE_RANGE) and glGet(GL_POINT_SIZE_GRANULARITY) or GL_SMOOTH_POINT_SIZE_RANGE and GL_SMOOTH_POINT_SIZE_GRANULARITY? On Sep 27, 12:26 am, MobileVisuals eyv...@astralvisuals.com wrote: I need Point attenuation to produce space animations with shining particles, which look like stars. How can I achieve that effect without using Point attenuation? Do you mean that I should make small rectangular polygons with transparent textures instead? I have tried that before on M3G and it didn't look as good as Point attenuation. Anti-Aliasing is a method of fooling the eye that a jagged edge is really smooth.Will that really be enough to get the same effect as Point attenuation? Could you please be more specific in which OpenGL technique I should use to make it work on HTC and LG? Isn't Point attenuation a part of the Android OpenGL standard? Shouldn't HTC and LG support it in that case? On Sep 27, 3:34 am, Indicator Veritatis mej1...@yahoo.com wrote: Short answer: no. Longer: why do you need point attenuation? There are other ways to do anti-aliasing, and some really cool graphics have been done for Android phones using that instead of point attenuation. On Sep 26, 6:26 am, MobileVisuals eyv...@astralvisuals.com wrote: I have found that everything implemented with Point attenuation will look like a blurry mess on devices from HTC and LG. This happens on even the newest devices from HTC, like HTC Desire HD. Why is it like this? Haven't they implemented Android in the right way? Point attenuation works like it should on most Android devices, like those from Samsung. I have implemented Point attenuation according to the Android specification in two of my company's apps.I have worked with Point attenuation on Symbian and C++ before, so I am quite sure that I have implemented it the right way. It is about the same code implementation in all OpenGL. Shouldn't all new Android devices support Point attenuation? It works on IPhone, so I think Point attenuation should work on all new Android devices too. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Image processing
You should start with the chapter on running Sobel Edge Detection on Android using the NDK in Android in Action, 2nd or 3rd edition. The 3rd edition is really written for Honeycomb, so you might want to go ahead and buy the 2nd which is already available. Or go to the website for the book and download the code, though it will be hard to pick up much from it without the accompanying text. For heavy duty image processing you are likely to want to use the NDK rather than the SDK. Yet 'zxing' does surprisingly well without using the NDK. That too is a good project for you to look at, since it uses image processing for barcode decoding. The Java code is better documented than many other open source projects. On Sep 24, 9:26 am, Venki itzmesri...@gmail.com wrote: I know Image Processing. I don't know anything about android though. I know Java, J2EE so I think I know some basics.I have planned Y to do some android apps using image processing. Where should I start? Give me some tutorial related to image processing using android. If you have created any apps using image processing in android please tell me about it. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to install APK programmatically without user prompt
What you need to do is pick your customers/clients more carefully. Any client who asks you for such a feature either has completely failed to understand the Android ecosystem or is up to no good. As already explained, what you are asking for would break the security of Android. This is NOT tolerable. On Sep 16, 10:32 am, Pratik Prajapati pratik.prajap...@gmail.com wrote: I need to install some non market place APK programmatically *without *user prompt. I found some links on stackoverflow, but all those mechanism will prompt the user. Is there any way to do it with some APIs or I should use 'pm install apk name' command (doing with system() api)? -- Regards, Pratik Prajapati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to install APK programmatically without user prompt
More importantly, sometimes these business people who come up with special requirements in a business environment do not know what they are talking about. What you are asking for, as Dianne explained, is breaking the security model of Android. We will NOT help you do this. On Sep 26, 4:49 am, nyarlathotep davi...@gmail.com wrote: I honestly thing these are the most frustrating answers to get in a forum. People has not to explain what they're trying to achieve. If you know the answer good, if you don't, please don't say that there is no good reason for doing this or that. We are not all trying to hack code behind our desks at home. Sometimes there are special requirements in a business environment that you have to implement and which people is not due and even allowed to tell you. On Sep 19, 12:11 pm, Oli oli.wri...@gmail.com wrote: Pratik, I think you should explain what you're trying to achieve with this and maybe someone can suggest an alternative. There's no good reason why you should want to install an apk without user input as that would break security, so I think you just need an alternative approach here. Cheers, Oli On Sep 16, 6:32 pm, Pratik Prajapati pratik.prajap...@gmail.com wrote: I need to install some non market place APK programmatically *without *user prompt. I found some links on stackoverflow, but all those mechanism will prompt the user. Is there any way to do it with some APIs or I should use 'pm install apk name' command (doing with system() api)? -- Regards, Pratik Prajapati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to do a Thread that only executes itself one time? (but continues alive)
Also, while you are on the topic of Threads and Loopers, 99% of the time, if you think you need to create your own Looper instead of using one created by the system, your design has a mistake in it. Handler, HandlerThread and pre-existing Loopers should be enough. Even then AsyncTask is often easier and better. On Sep 26, 8:30 am, Kostya Vasilyev kmans...@gmail.com wrote: The exception is due to your thread not having a Looper, which a fundamental low-level mechanism used by Android to delivers events to an application. You can fix this, but You don't really need a thread for this - after you register a listener, the main thread will continue to run, receiving event callbacks as needed. If your app is having performance problems, take a look at what you do inside the listener callbacks and make it take less time. -- Kostya 26.09.2011 19:25, saex пишет: It is for Augmented Reality App, i really need to use Threads for this, or the camera doesn't works properly The code that i posted gives me an exception how can i avoid that exception? the Exception is posted in the question. Thanks On 26 sep, 16:52, TreKingtreking...@gmail.com wrote: On Mon, Sep 26, 2011 at 8:37 AM, saexelpablos...@gmail.com wrote: But i want to do it on a separate Thread, to optimize my app removing tasks from the main thread, because the main thread have a lot of tasks on it and it needs to use threads for such thinks Putting arbitrary functionality on another thread will not optimize your app unless you make really good use of multi-core processers. In fact, it will slow it down with the overhead of creating, switching to, running, and cleaning up the thread. please tell me how to make a thread that only executes itself one time The code you already have will do exactly that, as pointless as it is. - TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: HTC and LG haven't implemented Android in the right way
Short answer: no. Longer: why do you need point attenuation? There are other ways to do anti-aliasing, and some really cool graphics have been done for Android phones using that instead of point attenuation. On Sep 26, 6:26 am, MobileVisuals eyv...@astralvisuals.com wrote: I have found that everything implemented with Point attenuation will look like a blurry mess on devices from HTC and LG. This happens on even the newest devices from HTC, like HTC Desire HD. Why is it like this? Haven't they implemented Android in the right way? Point attenuation works like it should on most Android devices, like those from Samsung. I have implemented Point attenuation according to the Android specification in two of my company's apps.I have worked with Point attenuation on Symbian and C++ before, so I am quite sure that I have implemented it the right way. It is about the same code implementation in all OpenGL. Shouldn't all new Android devices support Point attenuation? It works on IPhone, so I think Point attenuation should work on all new Android devices too. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Determing Camera Capabilities BEFORE calling setParameters(Camera.Parameters)
The documentation at http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setPreviewSize%28int,%20int%29 is quite emphatic: we are supposed to check for a camera capability BEFORE calling setParameters(). But what it does not say is HOW to do this. It only gives one example(color effects), one that does not generalize to other capabilities. So how, for example, can we check for supported Preview sizes or ImageFormats? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android is worst os mobile is this true
Which is considered OK only when done with smart bombs and/or B-52s:( But at least Google can justly claim that Android kills babies only if you do not use as directed;) On Sep 20, 6:47 pm, Dianne Hackborn hack...@android.com wrote: Also, Android kills babies. On Tue, Sep 20, 2011 at 12:02 PM, wanyce ashoura wanyce...@gmail.comwrote: Yes i should say that Why because of more then one reason 1- not support Arabic language at all meaning you need long time to get Arabic support in any kind of android Mobile's 2- alot of futures not founded in android like what * redial . *voice mail . *gps navigator offline . * voice command offline . *proxy . * a lot of security issues . *suck in browsing web site's *crazy market request any program will some times downloaded and may will not or pause download . 3- is android real free software and open source i do not think so is near to windows mobile just android use linux kernel and java but is not cool at all 4-blue tooth is crazy to used in android 5-not support any thing we dream about it about me i am waiting for the best came from android from long time before and now i have no hope about this os because is just another low level mobile os like symbian or badi or windows low level meaning is not reach what we as user's wanted not is programing 5- release 1.5 and 2.0 2.1 2.2 2.3 and jump to 3.0 3.1 3.2 but what about other version's is them not deserve some of update's and improvement just jump like this .. == i hope this e-mail reach real developer behind android and them start moving up and give us some hope to we can have mobile's can do what almost we wanted -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android is worst os mobile is this true
Does that mean that the unclean offspring of an unholy union between RIM and WebOS might be better? On Sep 21, 8:49 am, Lew Bloch lewisbl...@google.com wrote: Android is the worst form of mobile OS except for all those other forms that have been tried from time to time ... -- Apologies to unknown source as cited by Winston Churchill. http://richardlangworth.com/democracy-is-the-worst-form-of-government -- Lew blake wrote: Oh man. This is such a bummer. I'd been thinking it was pretty cool... wanyce ashoura wrote: [Android is worst os mobile is this true] Yes i should say that Why because of more then one reason 1- not support Arabic language at all meaning you need long time to get Arabic support in any kind of android Mobile's 2- alot of futures not founded in android like what * redial . *voice mail . *gps navigator offline . * voice command offline . *proxy . * a lot of security issues . *suck in browsing web site's *crazy market request any program will some times downloaded and may will not or pause download . 3- is android real free software and open source i do not think so is near to windows mobile just android use linux kernel and java but is not cool at all 4-blue tooth is crazy to used in android 5-not support any thing we dream about it about me i am waiting for the best came from android from long time before and now i have no hope about this os because is just another low level mobile os like symbian or badi or windows low level meaning is not reach what we as user's wanted not is programing 5- release 1.5 and 2.0 2.1 2.2 2.3 and jump to 3.0 3.1 3.2 but what about other version's is them not deserve some of update's and improvement just jump like this .. == i hope this e-mail reach real developer behind android and them start moving up and give us some hope to we can have mobile's can do what almost we wanted -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android is worst os mobile is this true
I never understood the logic behind that decision: why isn't the 3.x code being open sourced just like the others? It leaves one doubting Google's word, when they say, We wanted to make sure that there was no central point of failure... why we created Android, and made its source code open. For if that were the real and full reason, then Honeycomb would be open too. On Sep 21, 4:26 pm, Rogério de Souza Moraes rogerio.so...@gmail.com wrote: I agree that the Android for me is the best choice for a phone OS and you can download the code from 1.x until 2.x, but I think we will never the 3.x codes. With some lucky they will release the 4.x codes without much delay. 2011/9/21 Richard Schilling coderroa...@gmail.com Sorry you feel this way. There are lots of Android developers on this list, so I'm sure someone heard you. In fact, you can be one! You're welcome to download the code and make changes that you feel should be there. Richard -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How to encode the integer(30digit in to 10 digit) and decode it
Is this a Java question or an Android question? In either case, please read and study: http://catb.org/~esr/faqs/smart-questions.html On Sep 14, 1:38 am, GopalaKrishnan D gopall...@gmail.com wrote: How to encode the integer(30digit in to 10 digit) and decode it -- ~* Regards* *GopalaKrishnan D* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Alarm application
If the data is not going to be searched on, nor shared with other applications, a database is overkill. Simply writing it out as a data file or a Preference is adequate. The sample code for chapter 5 of Android in Action has samples that do all three approaches. It is freely downloadable even if you did not buy the book. Download it from http://code.google.com/p/android-in-action/ On Sep 15, 9:27 am, Cristhian Flores cif...@gmail.com wrote: Hi Hassy, Don't worry, we are all to learn and teach what you know. Beginners, fans and professionals in order many kinds of people to share knowledge. Regarding your question. It depends on the use you want to give. To start with something basic and database management begins with SQLITE. Greetings. 2011/9/15 Hassy hasith@gmail.com hi Martin as I can't spend lot of time for this application I wanted to know what is the best way to save the alarm settings. sorry for the simple question. Thank you for the advice Hassy Hi, I want to create an android Alarm application but I don't know how to save alarm settings and get saved settings for the background service. que. 1. should I use sqlite database? or can I use text files? 2. can I create the alarm using the alarm manager? Please help me . Thank you Hassy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How make Bluetooth constantly discoverable
I gave up on bump a long time ago. It fails too often. There is a limit to how often I can ask the same person to bump again. After the third time, it is embarrassing how much easier it would have been to scan a physical business card. On Sep 14, 11:05 pm, Kristopher Micinski krismicin...@gmail.com wrote: On Thu, Sep 15, 2011 at 12:24 AM, Zsolt Vasvari zvasv...@gmail.com wrote: How does something like Bump work? Based on IP magic and a very good algorithm determining bump times and mapping them to locations, which they can prove gives a probabilistic bound on the number of errors they can make in identification, and keep it sufficiently low (you can ask people to rebump, this is what happens in the case where many people are using the system at a similar location.) It's funny, people always present this to me as a counterexample... 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] Re: Abrir URL desde android y no mostrar barra de direcciones o fuente del sitio
If you think that was 'bullying', see a psychiatrist. And remember: the language of this group is English. We should keep all our contributions to it in English so that other users can benefit when they search the group. The OP needs to state more clearly what it is he is really trying to do. Then he can rationally expect people to reply with links that help him out. On Sep 14, 8:35 pm, Francisco Dalla Rosa soares soa...@argo.bz wrote: Indicator Veritatis as you already bullied the spanish speaking people, how about providing the information he might be looking for? As you didn't bother to reply in spanish you could provide some english links to help solve his problem. what about that? scout-pistolero you'll probably have to show the content on a webview on your own app if you want to control what is displayed or not (address bar and so on) 2011/9/15 Indicator Veritatis mej1...@yahoo.com Also, the link you gave him is about integrating a Web UI into Eclipse itself. But that is not what he is asking for: he is talking about one application (he didn't say where, presumably on an Android phone) having a link to another, the latter being a web application. I don't see how integrating a Web UI into Eclipse is going to help him do that. On Sep 14, 4:00 pm, Cristhian Flores cif...@gmail.com wrote: Que tal. Te dejo este enlace para que lo mireshttp:// www.ibm.com/developerworks/opensource/library/os-eclipse-webui... Tambien busca en san google acerca de ExternalInterface.call Saludos. El 14 de septiembre de 2011 02:47, scout-pistolero scoutpistol...@gmail.com escribió: Hola buenas estoy armando una aplicación que en tendrá un link a una aplicación en web, hasta ahí todo bien , pero me interesaría que no se viera la dirección del servidor, hay alguna manera de ocultar la barra de direcciones .?? desde ya muchas gracias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- 株式会社アルゴ ARGO Inc. 〒130-0012 東京都墨田区太平3-11-10 NTKオオノビル8階 ソアレス フランシスコ ( Soares Francisco ) Mail : soa...@argo.bz HP :http://www.argo.bz/ TEL:03-5619-4511 FAX:03-5619-4512 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is my brother authorized to buy and review my app?
H-m-m. In general, that is good advice, but expensive. Especially when, as shown in this thread, the would-be lawyer's client is not very clear about what he is trying to do, and would have to pay for the lawyer's time while he explains it. So best if first he polishes his explanation by explaining yet again to the group, just what it really is he is trying to do. As it is, the variety of answers shows it is just not clear. BTW: speaking of that variety, here is one more: why not just pay his brother to download it the same way every intended customer does? If the OP chooses that route, then he neatly sidesteps all the technical issues of APK installers and LVL, and all the legal issues too. On Sep 14, 3:27 pm, TreKing treking...@gmail.com wrote: On Wed, Sep 14, 2011 at 3:42 PM, sblantipodi perini.dav...@dpsoftware.orgwrote: Is this illegal? That's a question for your lawyer. - 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
[android-developers] Re: Back button problem in android
Overriding the Back key is usually a bad idea. Even though most users are not technical enough to understand what it means to call 'finish()' on an Activity, they do get used to what it means in practice: the Activity is removed from the Activity stack and 'destroyed'. Be VERY careful about going against this expectation. On Sep 14, 2:58 pm, kaushik p kaushiks...@gmail.com wrote: its very simple , in back button only the finish(); is executed . It means that the existing activity is canceled . If that activity leads to the last GUI screen of you application then the application gets closed . Try to override it . On Wed, Sep 14, 2011 at 4:52 PM, Vance Turnewitsch betweenthehi...@gmail.com wrote: First, I think you are asking a user question. This is a developer forum. I would suggest looking for the android market help forum. http://www.google.com/support/forum/p/Android+Market/label?lid=1d9030... . Or contact the developer of the app. Also for the time being, developers design their apps in different ways. You may not be able to go back to your activity; but maybe should try accessing recent apps with your device and choose your app. Good luck Vance On Sep 14, 7:43 am, pramod shirsath shirsath.pra...@gmail.com wrote: when i click on androids back button it stops whole activitybut i want to come back to previous page..can anyone help me to solve this problem... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ThanksRegards Kaushik Pendurthi http://kaushikpendurthi.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How make Bluetooth constantly discoverable
All other devices? None of mine do. Nor do I want them to. As already pointed out, it is a drain on the battery. Nor is this the only problem. You can't do ANYTHING else with Bluetooth while your device is trying to do discovery. Twenty or thirty seconds should be enough. The user is doing something wrong if it takes longer than that. On Sep 14, 12:45 am, Luitas liuta...@gmail.com wrote: Then will come android update for making Bluetooth always discoverable? If all other devices can do it but for android it's to hard? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en