[android-developers] Re: outgoing sms
private void sendSMS(Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.combtnI=I%27m%20Feeling%20LuckyphoneNumber, Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.combtnI=I%27m%20Feeling%20Luckymessage ) { Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.combtnI=I%27m%20Feeling%20LuckySENT = SMS_SENT; Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.combtnI=I%27m%20Feeling%20LuckyDELIVERED = SMS_DELIVERED; PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0); PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, new Intent(DELIVERED), 0); //---when the SMS has been sent--- registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Contexthttp://www.google.com/search?hl=enq=allinurl%3AContext+java.sun.combtnI=I%27m%20Feeling%20Luckyarg0, Intent arg1 ) { switch (getResultCode()) { case Activity.RESULT_OK: Toast.makeText(getBaseContext(), SMS sent, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_GENERIC_FAILURE: Toast.makeText(getBaseContext(), Generic failure, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_NO_SERVICE: Toast.makeText(getBaseContext(), No service, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_NULL_PDU: Toast.makeText(getBaseContext(), Null PDU, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_RADIO_OFF: Toast.makeText(getBaseContext(), Radio off, Toast.LENGTH_SHORT).show(); break; } } }, new IntentFilter(SENT)); //---when the SMS has been delivered--- registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Contexthttp://www.google.com/search?hl=enq=allinurl%3AContext+java.sun.combtnI=I%27m%20Feeling%20Luckyarg0, Intent arg1 ) { switch (getResultCode()) { case Activity.RESULT_OK: Toast.makeText(getBaseContext(), SMS delivered, Toast.LENGTH_SHORT).show(); break; case Activity.RESULT_CANCELED: Toast.makeText(getBaseContext(), SMS not delivered, Toast.LENGTH_SHORT).show(); break; } } }, new IntentFilter(DELIVERED)); SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI) ; ... On Wed, Sep 30, 2009 at 3:45 PM, Mika mika.ristim...@tkk.fi wrote: Could you be a bit more specific?? I know you can register a broadcast receiver for incoming sms messages but to my knowledge there isn't a broadcast for outgoing sms messages. -Mika On Sep 30, 8:33 am, kapnk...@gmail.com wrote: yes you can add brodcast receiver to listen n show sms sent intent On Wed, Sep 30, 2009 at 10:33 AM, Nemat nemate...@gmail.com wrote: Hi, is it possibale to notify outgoing sms programmatically? Thanks Nemat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 would cause a DeadObjectException?
When the remote process gets killed by the OS,then you get a DeadObjectException. Any process might get killed by the OS depending on system requirements. On Thu, Oct 1, 2009 at 10:22 AM, yukinoba ckmagic...@gmail.com wrote: to dear all Android developers and fans, Does anyone ever meet a android.os.DeadObjectException thrown by a remote service in Android? The problem I met is, the transact method in the service binder interface threw this exception to me. I wrote a remote service, and called it through the service binder. However, in the line of the binder interface (which is generated automatically AIDL interface) mRemote.transact(Stub.TRANSACTION_open, _data, _reply, 0);, it threw a android.os.DeadObjectException to me. I have read the definition of DeadObjectException, it says this exception means The object you are calling has died, because its hosting process no longer exists.. However, I checked this with my DDMS, and it showed the process of the remote service still exists. So, is there any other possible reason to make this exception happened? or could someone here tell me how to avoid this exception? Thanks for all your kind. Best regards, Nicholas -- Thanks and Regards Gurudutt P.S. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?
I'm creating an application to backup contacts (and sms messages, files etc.) on the device and upload it to a server. It may take a long time. So I suppose I should use a service (without spawning any additional threads) in a different process id than the activity? And as a user may from time to time run activity to see the progress bar, I should use AIDL (or sth else?) to send progress from service to activity (progress bar)? On Sep 30, 6:16 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Depends. If premature interruption of the long running operation could cause data-corruption (e.g. uploading a large image on a remote server, for example), yes you should use a service. Note that Android can kill service-processes whenever it deems it necessary, or the user can power-off the phone... But Android kills hidden activities much much more aggressively than services. If the long running operation is just to show something on a screen, then i would just use a thread. The thread, along with the process, could be restarted and the operation should work fine again (just would take a little longer). On Sep 30, 5:49 am, Kacper86 cpph...@gmail.com wrote: If I have a long running operation should i spawn a new thread or create new service with different process id (without creating new thread)? Because I'm not sure I understand the difference, despite the fact I read a lot of information concerning the subject. On Sep 29, 4:32 pm, Streets Of Boston flyingdutc...@gmail.com wrote: If you want to keep your thread running after you press the home or back button, i'm afraid you'd have to use a service. When your activity is popped off the back-stack (e.g. pressing home), the OS could kill the process in which your activity is running and your thread will be terminated. As far as I know, there's no way around that. If you just want to keep the progress dialog up and running after keyboard changes and orientation changes, put the progress bar in a Dialog managed by the activity (showDialog(dialogID)). The activity then makes sure that the progress dialog is shown again after orientation change. On Sep 29, 3:11 am, Kacper86 cpph...@gmail.com wrote: hi! first of all, i have to admit that i was wrong. when you set Dialog#setCancelable(false), hit home button, rerun your app, then your progress dialog does not always work. so i'm still stuck :/ @Broc Seib: thank you for your response! you said that you terminate your thread when gui thread is dead. however i just want to do the opposite - i want my thread to be alive while gui is gone. and when gui is restarted, it should still be able to receive messages from running thread. do know if that can be achieved without creating service with thread and binding to it? On Sep 28, 4:43 am, Broc Seib broc.s...@gmail.com wrote: I have built progress bars where I hay d a background thread that updated my Activity via callbacks (to do GUI updates in the UI thread). I ended up using a WeakReference object to hold the callback pointer to my Activity. I have made the assumption (right or wrong) that my UI thread may be gone while my background thread still exists. I was experiencing some funky exceptions while testing my app -- I was rudely interrupting my application by pressing the back or home button in the middle of my background thread doing some non-GUI work. So when it is time for my background thread to report to my UI thread, if my WeakReference returns null, then I just silently exit my thread in the background, knowing my UI thread is gone. Below is a canonical example demonstrating what I am doing. There may be more suitable solutions that I have not learned yet. -broc package foo.example; import java.lang.ref.WeakReference; public class BackgroundThreadExample extends Thread { public interface Callback { public void onSomeBadEventUpdateGuiThread(Object stuff); public void onSomeGoodEventUpdateGuiThread(Object things); } private WeakReferenceCallback weakCallback; private Object stuffYouCareAbout; public BackgroundThreadExample(Callback callback, Object stuffYouCareAbout) { super(myThreadName); this.weakCallback = new WeakReferenceCallback(callback); this.stuffYouCareAbout = stuffYouCareAbout;} �...@override public void run() { // do background stuff boolean isGood = doStuff(this.stuffYouCareAbout); try { // inform our UI via callback. if ( isGood ) { getCallback().onSomeGoodEventUpdateGuiThread(was good);} else { getCallback().onSomeBadEventUpdateGuiThread(was bad);} } catch (MyWeakRefException e) { // our UI thread object is gone. bummer. // silently fall thru to exit this thread. } }
[android-developers] Re: Activity Closing, Task affinity
look at onResume() On Wed, Sep 30, 2009 at 4:59 PM, Siju siju.mat...@gmail.com wrote: How can I force an activity to close when user presses Home button or navigates out of the activity? Do I get a callback when focus goes out of the activity? I cannot see that in the Activity callback methods. My intention is to make sure that my activity is refreshed each time user starts the activity and lose all state. How can I start my Notification View (view after clicking on notification) to start in a new task instead of connecting to the existing task of my application (if it is open). For example if user clicks on notification from homescreen, I want the view to go back to main screen or whatever the user was doing before that when the Notification Window is closed. -- Thanks and Regards Gurudutt P.S. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Issue in broadcasting SMS through Android
On Wed, Sep 30, 2009 at 18:25, Nainos nainos.sm...@gmail.com wrote: Hi! There seems to be a limit to the number of SMS that can be sent programmatically. It seems to be hovering around 70 to 100 messages. After a batch of messages, when I try to resend a batch I get a warning message A large number of SMS are being sent. Press OK to continue or Cancel to stop sending This requires user intervention and impedes the program from sending SMS. Is there a way around this error message? Maybe a way to turn off the warnings? I guess cell phone providers would not want such a warning to be removed. Just like you cannot change the sms application behaviour which limits an sms message to 3 sms, and then converts to mms. (And also for example in my case (french SFR network), the contract specified illimited sms, but not automatically sent sms) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Telephony API
Hi out there, I need to execute a new Intent right after a call has ended. The code line for starting the call is: startActivityForResult(new Intent(Intent.ACTION_CALL, Uri.parse(tel: +4922031010424)), 1); which works fine. For starting the new Intend I have implemented: protected void onActivityResult(int requestCode, int resultCode, Intent data) {} The problem I am facing is, that pressing the END CALL button in the dailer menue does not end up in this method. I am getting the result on the ACTION_CALL only if I execute the BACK button on the phone or emulator. Does somebody know what I am doing wrong? Is there a tutorial for the Telephony API availiable? Thank you for your attention Konrad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] App upgrade (with zipalign) causes force closes/disappearing of app icon
Hi, Almost all our users complain that after upgrading to the newest version of our Camera Pro app, either the app crashes or the icon is not showing up anymore in the home screen. The problem seems to be gone after deinstalling and reinstalling the app. How can it be possible that the icon is gone? This is the first version we used zipalign on, can this have something to do with it? Thanks, Swiss Codemonkey team --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 force soft keyboard to be visible?
Dwass, This is tested on the standard emulator and an unbranded Hero, running the latest official HTC ROM update, 2.73. On Dianne's suggestions, I streamlined this a bit, removing the unnecessary hide flags. To show the keyboard on the dialog's OnCreate, I use: imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0); To hide it, I use: imm.hideSoftInputFromWindow(singleedittext.getWindowToken(), 0); As I only have a single edit in my dialog, this works fine. Note it works the same in the emulator and on the Hero, are you having different behaviour on your G1? What is currently working and what isn't? Are you using a dialog or an activity? On Oct 1, 2:03 am, dwass dw...@sharpmind.de wrote: Hello James, Thanks for the code snippet. I've actually tried this. What device did you test this on? My biggest problem is that when I find a combination that works on the G1, it doesn't work on the G2 (HTC Hero) or vice-versa. I'm expecting a nightmare when we have 12 devices out there instead of just 2. -DWass On Sep 25, 7:14 am, James W jpbwebs...@gmail.com wrote: Dwass, dont know if this helps, but I finally got it to work reliably for my particular needs. I have a dialog with a single edit, and I wanted to softkeyboard to automaticallyshowwhen the dialog was opened, and be closed when the dialog was closed. In other words, identical behaviour to the EditTextPreference when used in a PreferenceScreen. In my OnCreate() I have: InputMethodManager imm = (InputMethodManager) SingleEditDialog.this.getContext().getSystemService (Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput (InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY); Which shows thekeyboardwhen the dialog is opened. Like you, I had trouble getting the thing to hide when I close the dialog, I tried calling toggleSoftInput again but no amount of changing the settings seems to work. It is not entirely clear what is going on here, and I am not sure why there is not a .HIDE_FORCED option. It is my app, why can't I control when thekeyboardis shown? In the end, as I only had one edit field, I was able to use another method to hide it, imm.hideSoftInputFromWindow(singleedittext.getWindowToken(), 0); where singleedittext is my EditText view. Incidentally, there doesn't appear to be a corresponding showSoftInputForWindow() call, though, which is again odd. Anyway, it now works perfectly. Hope this helps someone else!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make adb of android's sdk recognizes HTC Hero on Mac OS?
On Linux, I have to click on the HTC Sync entry from the notifications. Only then adb recognizes the Hero. On Sep 30, 1:43 pm, eric bugbun...@gmail.com wrote: I have a way to recognize HTC Magic by adb from this groups,but HTC Hero? I need a adb that make HTC Hero recognized on Mac. I need help,please. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Crossword Puzzle in Android
Carl, that's brilliant. The XML can be adapted to use bars and blocks as I described earlier, then overlayed with text boxes and hey presto! On Sep 28, 4:39 pm, Carl Whalley carl.whal...@googlemail.com wrote: I just put a tutorial up on making tiles scale correctly. Its not exactly what you are doing but theres enough overlap to get you going.http://www.androidacademy.com/3-tutorials/43-hands-on/154-device-inde... --http://www.androidacademy.com On Sep 28, 1:05 pm, Kwan Toh Choong td00164...@gmail.com wrote: Hi All, Thanks for the advice from everyone. I've done a little bit of research, but I m not sure the idea of rendering the boxes with numbering is correct or not. Is it true that I can draw on a canvas? I m reading this tutorialhttp://www.anddev.org/the_pizza_timer_-_threading-drawing_on_canvas-t... It seems like after I draw a box, I can still draw on the same place, overlapping it. So I can do something like drawing the numbers on top of the boxes right? In face I'm not doing acrossword. It looks similar tocrosswordbut it is called CodeCracker instead. I did a google on CodeCracker but the result it returns are mostly something else. Here are a few link on the CodeCracker I m saying: http://www.codecracker.co.nz/samples/samples.htmhttp://www.puzzco.com.. Regards Kwan On Mon, Sep 28, 2009 at 2:00 PM, Seth Mould sethmo...@yahoo.com wrote: Hi Kwan, I have a project on SourceForge called xW which seeks to establish a standard XML format for word puzzles, so you might want to look at that for your input. Try looking for open Sudoku projects -- there is more interest in Sudoku than crosswords and the rendering of cells is the same except for numbering. Please remember that advanced UK crosswords use bars instead of black squares, so a typical bitwise enumeration for the cell's appearance will be 0 - Blank, 1 - Black, 2 - Left bar, 4 - Top bar. I haven't got round to writing a generic renderer for Android but when I do it will be Open. Regards Seth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to change an EditText focus rim color from orange to some other color or image...
how can I change the focus color (orange) on an edittext box. the focus color is a small rim around the entire control and is bright orange when the control has focus. how can I change the color of that focus either with a different color or using a drawable. tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Camera and Surface problems with 1.6
Hi all, My company has so far developed four different camera-based applications that all work by manipulating the viewfinder feed from the camera. The Android camera API expects a Surface to draw the viewfinder feed to, however in our apps we rely on sidestepping the direct drawing and grabbing the YUV_420_SP data for manipulation and rendering to a Surface. On 1.5, we achieved this by changing the Surface type from PUSH_BUFFERS to NORMAL, which would in one stroke disable the direct feed to the surface from the camera as well as giving us a Surface onto which we could render the manipulated feed. The problem arises when upgrading to 1.6, as it appears that this hole has been plugged. The Camera class now refuses to start the preview feed if its associated preview display surface is of the wrong type (such as NORMAL). I realize that this is probably correct as per design, unfortunately it also makes our type of app very difficult to implement... I have tried to work around it by creating a dummy surface view to set as preview display, and although I have managed to hide it, I haven't been able to stop the direct feed, which of course means that performance slows to a crawl as both the direct feed and manipulated feed are active and drawing at the same time. I would be most grateful for any suggestions on how to resolve this issue... best regards Anders Johansson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to run Gallrey by a common way?
Hey everybody! My question is how to run Gallrey by a common way? I fount that gallrey has different package name on different phone. Is there a way to run Gallrey without package name? By the way, I can run Camera by the intent action INTENT_ACTION_STILL_IMAGE_CAMERA,without pacake name. Best regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Center TextView between other two widgets
Hi, I have a horizontal LinearLayout in which I have a button, text1 and text2. I want the button to be on the left, text2 on the right and text1 centered between them, like in the following diagram ( | is edge of the screen, - is empty space): | BUTTON---TEXT1TEXT2 | text1 and text2 can have different length based on language settings, so unfortunaely I cant hardcode the positions in pixels. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Trying to get Javascript on Android
John, Fred, and Streets Of Boston, Sorry I stepped away from this conversation for a bit. Work has a nasty habit of getting in the way sometimes. Thank you for replying and explaining the situation to me a little more. I can now see how touch events might diverge from mouse events in certain circumstances. A mouse in and mouse out won't work with touch screens. I guess the art is in determining when you want similar behaviours, and when you don't. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 on ADP1 Force close
Thanks for the reply! I have checked the group you provided, seems that htc placed wrong files for download. Hopefully it will be resolved in short period of time! zz, Sava On Oct 1, 5:28 am, Chad Fawcett chadfawc...@gmail.com wrote: See:http://groups.google.com/group/Android-DevPhone-Updating The images on HTC's site are invalid, using test keys, apparently they (JBQ, HTC) are on it, and new images coming soon. On Wed, Sep 30, 2009 at 11:05 PM, otiasj julien.sa...@gmail.com wrote: I had the same problem with my Ion, I had to make a fastboot erase userdata to make it work correctly On Oct 1, 11:27 am, 20cents vincent.barthel...@gmail.com wrote: Same problem here... Plus the android Market GTalk apps don't work anymore Thanks for any help or info On Sep 30, 8:16 pm, babaroga_srb mikalac...@gmail.com wrote: Hello everyone! I have just updated my ADP1 to the latest 1.6 version. During installation everything went ok. But every time when my phone boots i receive Force Close error regardin Google Partner Setup (process com.google.android.partnersetup). Could someon please tell me what is this about? Best regards, Sava --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can a library uses import in the Android.mk ?
Hi, I am trying to import android.graphics.Bitmap inside an aidl file intended to be used as part of a library (i.e., the Android.mk calls include $(BUILD_JAVA_LIBRARY)). However, the aidl tool always return the error could not find import for android.graphics.Bitmap. When building the same project as an APK project (i.e., using include $(BUILD_PACKAGE)) it works like a charm. Of course, android.graphics.Bitmap is parcelable and it has its own Bitmap.aidl in the package android.graphics Any clue? Thanks in advance. Mauricio Porto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to create TextView with a link that opens in browser
I would like to create a TextView that would contain a single link, e.g. google.com. After click it would open google.com in browser. I found a way how to do it, but it's a bit slow, can this be done more efficiently? Now I use this code: TextView link = (TextView) findViewById(R.id.link); link.setText(Html.fromHtml(a href=\http://www.google.com\;google/ a)); link.setMovementMethod(LinkMovementMethod.getInstance()); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: outgoing sms
Yeah sure.. but I understood that the question was about notifications when the sms is not sent form within your own app. For example when the user uses the default messaging app to send an sms. -Mika On Oct 1, 9:13 am, kapnk...@gmail.com wrote: private void sendSMS(Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.comb...phoneNumber, Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.comb...message ) { Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.comb...SENT = SMS_SENT; Stringhttp://www.google.com/search?hl=enq=allinurl%3AString+java.sun.comb...DELIVERED = SMS_DELIVERED; PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0); PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, new Intent(DELIVERED), 0); //---when the SMS has been sent--- registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Contexthttp://www.google.com/search?hl=enq=allinurl%3AContext+java.sun.com;...arg0, Intent arg1 ) { switch (getResultCode()) { case Activity.RESULT_OK: Toast.makeText(getBaseContext(), SMS sent, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_GENERIC_FAILURE: Toast.makeText(getBaseContext(), Generic failure, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_NO_SERVICE: Toast.makeText(getBaseContext(), No service, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_NULL_PDU: Toast.makeText(getBaseContext(), Null PDU, Toast.LENGTH_SHORT).show(); break; case SmsManager.RESULT_ERROR_RADIO_OFF: Toast.makeText(getBaseContext(), Radio off, Toast.LENGTH_SHORT).show(); break; } } }, new IntentFilter(SENT)); //---when the SMS has been delivered--- registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Contexthttp://www.google.com/search?hl=enq=allinurl%3AContext+java.sun.com;...arg0, Intent arg1 ) { switch (getResultCode()) { case Activity.RESULT_OK: Toast.makeText(getBaseContext(), SMS delivered, Toast.LENGTH_SHORT).show(); break; case Activity.RESULT_CANCELED: Toast.makeText(getBaseContext(), SMS not delivered, Toast.LENGTH_SHORT).show(); break; } } }, new IntentFilter(DELIVERED)); SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI) ; ... ... . On Wed, Sep 30, 2009 at 3:45 PM, Mika mika.ristim...@tkk.fi wrote: Could you be a bit more specific?? I know you can register a broadcast receiver for incoming sms messages but to my knowledge there isn't a broadcast for outgoing sms messages. -Mika On Sep 30, 8:33 am, kapnk...@gmail.com wrote: yes you can add brodcast receiver to listen n show sms sent intent On Wed, Sep 30, 2009 at 10:33 AM, Nemat nemate...@gmail.com wrote: Hi, is it possibale to notify outgoing sms programmatically? Thanks Nemat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Camera and Surface problems with 1.6
If I understand correctly, you're doing something very similar to what I'm doing in my Moseycode application. In my case I render the camera YUV data via a GLSurfaceView. I can't say whether this will work for certain on all/any 1.6 devices, but my approach since 1.5 has been to make the PUSH_BUFFERS surface very small and to position it off-screen (a nasty hack that works in the emulator at least). I think the smallest supported dimensions that preserve the aspect ratio are 20px x 15px. That said, I'm just waiting for this circuitous implementation to blow-up on me. Why the camera demands a surface in order to provide preview data is a mystery to me (as is so much of the Camera API's operation). Tom 2009/10/1 Anders Johansson svi...@gmail.com Hi all, My company has so far developed four different camera-based applications that all work by manipulating the viewfinder feed from the camera. The Android camera API expects a Surface to draw the viewfinder feed to, however in our apps we rely on sidestepping the direct drawing and grabbing the YUV_420_SP data for manipulation and rendering to a Surface. On 1.5, we achieved this by changing the Surface type from PUSH_BUFFERS to NORMAL, which would in one stroke disable the direct feed to the surface from the camera as well as giving us a Surface onto which we could render the manipulated feed. The problem arises when upgrading to 1.6, as it appears that this hole has been plugged. The Camera class now refuses to start the preview feed if its associated preview display surface is of the wrong type (such as NORMAL). I realize that this is probably correct as per design, unfortunately it also makes our type of app very difficult to implement... I have tried to work around it by creating a dummy surface view to set as preview display, and although I have managed to hide it, I haven't been able to stop the direct feed, which of course means that performance slows to a crawl as both the direct feed and manipulated feed are active and drawing at the same time. I would be most grateful for any suggestions on how to resolve this issue... best regards Anders Johansson -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] on focus color change
Hi, I have a list of layouts with many views within it. When the trackball is moved and layout gets focused i want each layout showing that it has focus - with some color. What are the ways to do that? Thanks in advance. Sundar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] problem in inserting record into database
Hello, I got following Exception while inserting data into database. The Exception is as follow. no such table: inbox : , while compiling: INSERT INTO inbox(from_num, content, date1, time1) VALUES(? , ?, ?, ?); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to create TextView with a link that opens in browser
I would like to create a TextView that would contain a single link, e.g. google.com. After click it would open google.com in browser. I found a way how to do it, but it's a bit slow, can this be done more efficiently? Now I use this code: TextView link = (TextView) findViewById(R.id.link); link.setText(Html.fromHtml(a href=\http://www.google.com\;google/ a)); link.setMovementMethod(LinkMovementMethod.getInstance()); You can try Linkify: http://developer.android.com/reference/android/text/util/Linkify.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] RecognizerIntent available languages ?
Does anyone have an inkling how I could find out the available languages for speech recognition (relating to the LANGUAGES extra on the ACTION_RECOGNIZE_SPEECH action). (so that I can offer them to the user) Thanks, Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: problem in inserting record into database
I got following Exception while inserting data into database. The Exception is as follow. no such table: inbox : , while compiling: INSERT INTO inbox(from_num, content, date1, time1) VALUES(? , ?, ?, ?); Presumably, you have no table named inbox in your database. Double-check your code that creates the database, or pull the database off your device and inspect it with a SQLite program (e.g., SQLite Manager extension for Firefox), or use adb shell and the built-in console sqlite3 program to inspect the database. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Maximum size of Image attachment?
Anybody knows the maximum size of a image which can be attached in a email sent through Android??? Thanks Isuru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Activate network on debug device
Hello, I developer a android app. Today I get the HTC hero for testing. I installed the driver and can start the app on the device. The problem is that I need a network connection. I am connect via usb to my desktop computer. Can the device that is on usb connect use my i-net connection to send a request? Thanks for help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Clickable URLs in EditText when using ArrowKeyMovementMethod
*bump* On Sep 25, 9:13 am, Abhilash abhilash.ramakris...@gmail.com wrote: Is there a way to make URLs in a EditText clickable when the MovementMethod is set to ArrowKeyMovementMethod? ~Abhilash --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] android:launchMode=singleInstance pros AND cons
What are advantage and disadvantage of applying android:launchMode=singleInstance in the android.manifest file. Will it hamper the services in the application? And how is it related to the performance of the application? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Center TextView between other two widgets
Hi, I have a horizontal LinearLayout in which I have a button, text1 and text2. I want the button to be on the left, text2 on the right and text1 centered between them, like in the following diagram ( | is edge of the screen, - is empty space): | BUTTON---TEXT1TEXT2 | text1 and text2 can have different length based on language settings, so unfortunaely I cant hardcode the positions in pixels. You would not want to hardcode the positions in pixels, anyway. Do not use a LinearLayout for this. Use a RelativeLayout, something like this: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; Button android:id=@+id/prev android:layout_width=wrap_content android:layout_height=wrap_content android:layout_centerVertical=true android:layout_alignParentLeft=true / TextView android:id=@+id/next android:layout_width=wrap_content android:layout_height=wrap_content android:layout_centerVertical=true android:layout_alignParentRight=true / TextView android:id=@+id/title android:layout_width=wrap_content android:layout_height=wrap_content android:layout_centerInParent=true android:layout_toLeftOf=@id/next android:layout_toRightOf=@id/prev / /RelativeLayout -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Custom Views Timerview
Hi everyone, I've made a simple countdown timer and I would like to use it as a custom view in my xml layout. The view works perfectly well if i add it manually like this: this.myTimerView = new TimerView(this); layout.addView(myTimerView); However when I use it in the xml file, the program crashes. This is what i've done: XML: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/imgv / TextView android:id=@+id/txtv / com.myproject.TimerView android:id=@+id/timer android:layout_width=wrap_content android:layout_height=wrap_content / /RelativeLayout TimerView class: public class TimerView extends View { // Constructors public TimerView(Context context) { super(context); init(); } public TimerView(Context context, AttributeSet attrs) { super(context, attrs); init(); } @Override protected void onDraw(Canvas canvas) { //code } } What am I doing wrong ? 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] java.lang.OutOfMemoryError after orientation changed
Hello, i get an OutOfMemoryError in my app after changing the orientation. I have read, that if have to use Context.getApplicationContext() instead of a normal activity context?? My java file looks like: class . { private MapView mapView; onCreate() { ... mapView = findViewById(R.id.map); ... } Must i use mapView = new MapView(Context.getApplicationContext()) or something like that to avoid the OutOfMemoryError?? I will post the logcat in a reply message. Thanks, Stefan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: java.lang.OutOfMemoryError after orientation changed
Here my logcat: E/dalvikvm-heap( 961): Out of memory on a 167772196-byte allocation. I/dalvikvm( 961): main prio=5 tid=3 RUNNABLE I/dalvikvm( 961): | group=main sCount=0 dsCount=0 s=N obj=0x4001ab08 self=0xbc60 I/dalvikvm( 961): | sysTid=961 nice=0 sched=0/0 handle=-1343996920 I/dalvikvm( 961): at com.google.googlenav.map.Map.resize ((null):~-1) I/dalvikvm( 961): at com.google.android.maps.MapView.onMeasure (MapView.java:536) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.RelativeLayout.measureChildHorizontal (RelativeLayout.java:569) I/dalvikvm( 961): at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:361) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.RelativeLayout.measureChild (RelativeLayout.java:554) I/dalvikvm( 961): at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:377) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:2989) I/dalvikvm( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.LinearLayout.measureVertical (LinearLayout.java:464) I/dalvikvm( 961): at android.widget.LinearLayout.onMeasure (LinearLayout.java:278) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:2989) I/dalvikvm( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewRoot.performTraversals (ViewRoot.java:747) I/dalvikvm( 961): at android.view.ViewRoot.handleMessage (ViewRoot.java:1613) I/dalvikvm( 961): at android.os.Handler.dispatchMessage (Handler.java:99) I/dalvikvm( 961): at android.os.Looper.loop(Looper.java:123) I/dalvikvm( 961): at android.app.ActivityThread.main (ActivityThread.java:4203) I/dalvikvm( 961): at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm( 961): at java.lang.reflect.Method.invoke(Method.java: 521) I/dalvikvm( 961): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) I/dalvikvm( 961): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:549) I/dalvikvm( 961): at dalvik.system.NativeStart.main(Native Method) I/dalvikvm( 961): D/AndroidRuntime( 961): Shutting down VM W/dalvikvm( 961): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) E/AndroidRuntime( 961): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 961): java.lang.OutOfMemoryError E/AndroidRuntime( 961):at com.google.googlenav.map.Map.resize (Unknown Source) E/AndroidRuntime( 961):at com.google.android.maps.MapView.onMeasure(MapView.java:536) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.widget.RelativeLayout.measureChildHorizontal (RelativeLayout.java:569) E/AndroidRuntime( 961):at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:361) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.widget.RelativeLayout.measureChild(RelativeLayout.java:554) E/AndroidRuntime( 961):at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:377) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) E/AndroidRuntime( 961):at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.widget.LinearLayout.measureVertical(LinearLayout.java:464) E/AndroidRuntime( 961):at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) E/AndroidRuntime( 961):at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) E/AndroidRuntime( 961):at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961):at android.view.ViewRoot.performTraversals(ViewRoot.java:747) E/AndroidRuntime( 961):at android.view.ViewRoot.handleMessage (ViewRoot.java:1613) E/AndroidRuntime( 961):at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 961):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 961):at android.app.ActivityThread.main (ActivityThread.java:4203) E/AndroidRuntime( 961):at
[android-developers] Re: MapView Overlays
Not had any response, but my solution is to add a bit of intelligence to my activity to only add the overlays that would be displayed on the map currently visible by the map view. I have no idea about how the mapView goes about doing this, but it appears to be really slow at doing so. So i am going to let my activity take the strain and see if it makes it any better. Any thoughts on this issue are still greatly received. Liam On Sep 28, 2:51 pm, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Gestures and ListView (as seen in a keynote of Google I/O)
Hi there! I have seen a small scene from http://www.youtube.com/watch?v=S5aJAaGZIvk at timecode 1:23:30 - letters are recognized by being drawn on the screen. Does anybody know how this works, or where I can find an easy example? Great thanks in advance regards Marc Reichelt || http://www.marcreichelt.de/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Capture large image
Hi All, I want to capture much larger image than the current small image captured by the android g1 phone camera.Any clue??? Thanks Isuru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Camera and Surface problems with 1.6
Hi Tom, It does indeed seem like we're in the same situation. I'm going to play around some more with the position, size and visibility of my PUSH_BUFFERS surface to see what works best. All in all though, I completely agree with your conclusion...this is a hack, and there's no telling how long it will work. I also agree with your point about the mysterious Camera API, here are my main gripes: 1. There's a callback for receiving viewfinder data, but it never occurred to the designer that 3rd parties might want to use that _instead_ of letting the framework draw it directly to a surface. 2. The callback for viewfinder data only let's you receive YUV data. This is good from a performance perspective as it comes directly from the camera, but IMHO causes the following issues: a) The YUV format is dependent on the sensor/vendor hardware. Yes, there is an API to query the format, but considering the not so stellar qualcomm driver implementation for HTC, this may not be trustworthy. b) 3rd parties wishing to use viewfinder data will have to be able to decode all forms of YUV data in order to be safe on future devices, assuming that the API mentioned in the point above is trustworthy. c) The requirement to decode the YUV raises the bar quite a bit for 3rd party developers who might have ideas in this field. Thus, it would seem reasonable to provide an option to receive the data in either YUV or RGB format. Unfortunately, even if the API's are modified in a future release we will be stuck with maintaining different code for different releases and/or OEMs... regards Anders On Oct 1, 1:51 pm, Tom Gibara m...@tomgibara.com wrote: If I understand correctly, you're doing something very similar to what I'm doing in my Moseycode application. In my case I render the camera YUV data via a GLSurfaceView. I can't say whether this will work for certain on all/any 1.6 devices, but my approach since 1.5 has been to make the PUSH_BUFFERS surface very small and to position it off-screen (a nasty hack that works in the emulator at least). I think the smallest supported dimensions that preserve the aspect ratio are 20px x 15px. That said, I'm just waiting for this circuitous implementation to blow-up on me. Why the camera demands a surface in order to provide preview data is a mystery to me (as is so much of the Camera API's operation). Tom 2009/10/1 Anders Johansson svi...@gmail.com Hi all, My company has so far developed four different camera-based applications that all work by manipulating the viewfinder feed from the camera. The Android camera API expects a Surface to draw the viewfinder feed to, however in our apps we rely on sidestepping the direct drawing and grabbing the YUV_420_SP data for manipulation and rendering to a Surface. On 1.5, we achieved this by changing the Surface type from PUSH_BUFFERS to NORMAL, which would in one stroke disable the direct feed to the surface from the camera as well as giving us a Surface onto which we could render the manipulated feed. The problem arises when upgrading to 1.6, as it appears that this hole has been plugged. The Camera class now refuses to start the preview feed if its associated preview display surface is of the wrong type (such as NORMAL). I realize that this is probably correct as per design, unfortunately it also makes our type of app very difficult to implement... I have tried to work around it by creating a dummy surface view to set as preview display, and although I have managed to hide it, I haven't been able to stop the direct feed, which of course means that performance slows to a crawl as both the direct feed and manipulated feed are active and drawing at the same time. I would be most grateful for any suggestions on how to resolve this issue... best regards Anders Johansson -- Tom Gibara email: m...@tomgibara.com web:http://www.tomgibara.com blog:http://blog.tomgibara.com twitter: tomgibara --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ADC2 submissions and Android 1.6 (Donut)
Which it does. On Sep 30, 6:44 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: The only fair solution would be to make sure the judging app doesn't function on 1.6 -John Coryat What Zip Code? Radar Now! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Custom Views Timerview
If you can send the exact exception from log cat, then it will be easy to find error. On Thu, Oct 1, 2009 at 8:42 AM, andr0id sgrang...@gmail.com wrote: Hi everyone, I've made a simple countdown timer and I would like to use it as a custom view in my xml layout. The view works perfectly well if i add it manually like this: this.myTimerView = new TimerView(this); layout.addView(myTimerView); However when I use it in the xml file, the program crashes. This is what i've done: XML: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/imgv / TextView android:id=@+id/txtv / com.myproject.TimerView android:id=@+id/timer android:layout_width=wrap_content android:layout_height=wrap_content / /RelativeLayout TimerView class: public class TimerView extends View { // Constructors public TimerView(Context context) { super(context); init(); } public TimerView(Context context, AttributeSet attrs) { super(context, attrs); init(); } @Override protected void onDraw(Canvas canvas) { //code } } What am I doing wrong ? 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: MapView Overlays
What you could try is to use just one instance of your Overlay subclass that includes all the 60 icons that you want to show on the map. -Mika On Oct 1, 4:08 pm, Ne0 liamjamesalf...@googlemail.com wrote: Not had any response, but my solution is to add a bit of intelligence to my activity to only add the overlays that would be displayed on the map currently visible by the map view. I have no idea about how the mapView goes about doing this, but it appears to be really slow at doing so. So i am going to let my activity take the strain and see if it makes it any better. Any thoughts on this issue are still greatly received. Liam On Sep 28, 2:51 pm, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ADC2 submissions and Android 1.6 (Donut)
On Sep 30, 11:00 am, ander...@phdgaming.com ander...@phdgaming.com wrote: The second round of judging also includes user judging - 40% of the outcome if I remember correctly. I believe you are incorrect on this. This first round of judging is user judging, and makes up 40% of an apps final rating. The second round is all expert judging by Google that counts for the remaining 60% and has no user judging. The applications final rating and placement is determined by both rounds. From http://code.google.com/android/adc/adc2_terms.html b. JUDGING: All Qualifying Entries for the Second Round Judging will be judged by (1) end users of Android-powered handsets who choose to participate in judging, whether or not they participated in First Round Judging (Community Judges), and (2) a panel of experts in the fields of mobile devices, cellular telecommunications, software development, and/or technology innovation (Expert Judges). Google will select the Expert Judges from the member organizations of the Open Handset Alliance, from Google, or from other organizations. Clearly, second round judging will include end users. -John Coryat What Zip Code? Radar Now! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.lang.OutOfMemoryError after orientation changed
From the stack trace it seems that your trying to allocate 160 MB of memory. And for one app the max heap size in Android is 16 Mb (if i remember correctly). That's why the outofmemoryerror. Don't know why are you allocating that much memory though?? -Mika On Oct 1, 3:43 pm, Stefan ebay-dah...@web.de wrote: Here my logcat: E/dalvikvm-heap( 961): Out of memory on a 167772196-byte allocation. I/dalvikvm( 961): main prio=5 tid=3 RUNNABLE I/dalvikvm( 961): | group=main sCount=0 dsCount=0 s=N obj=0x4001ab08 self=0xbc60 I/dalvikvm( 961): | sysTid=961 nice=0 sched=0/0 handle=-1343996920 I/dalvikvm( 961): at com.google.googlenav.map.Map.resize ((null):~-1) I/dalvikvm( 961): at com.google.android.maps.MapView.onMeasure (MapView.java:536) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.RelativeLayout.measureChildHorizontal (RelativeLayout.java:569) I/dalvikvm( 961): at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:361) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.RelativeLayout.measureChild (RelativeLayout.java:554) I/dalvikvm( 961): at android.widget.RelativeLayout.onMeasure (RelativeLayout.java:377) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:2989) I/dalvikvm( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.widget.LinearLayout.measureVertical (LinearLayout.java:464) I/dalvikvm( 961): at android.widget.LinearLayout.onMeasure (LinearLayout.java:278) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:2989) I/dalvikvm( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) I/dalvikvm( 961): at android.view.View.measure(View.java:7703) I/dalvikvm( 961): at android.view.ViewRoot.performTraversals (ViewRoot.java:747) I/dalvikvm( 961): at android.view.ViewRoot.handleMessage (ViewRoot.java:1613) I/dalvikvm( 961): at android.os.Handler.dispatchMessage (Handler.java:99) I/dalvikvm( 961): at android.os.Looper.loop(Looper.java:123) I/dalvikvm( 961): at android.app.ActivityThread.main (ActivityThread.java:4203) I/dalvikvm( 961): at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm( 961): at java.lang.reflect.Method.invoke(Method.java: 521) I/dalvikvm( 961): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) I/dalvikvm( 961): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:549) I/dalvikvm( 961): at dalvik.system.NativeStart.main(Native Method) I/dalvikvm( 961): D/AndroidRuntime( 961): Shutting down VM W/dalvikvm( 961): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) E/AndroidRuntime( 961): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 961): java.lang.OutOfMemoryError E/AndroidRuntime( 961): at com.google.googlenav.map.Map.resize (Unknown Source) E/AndroidRuntime( 961): at com.google.android.maps.MapView.onMeasure(MapView.java:536) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at android.widget.RelativeLayout.measureChildHorizontal (RelativeLayout.java:569) E/AndroidRuntime( 961): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:361) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at android.widget.RelativeLayout.measureChild(RelativeLayout.java:554) E/AndroidRuntime( 961): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:377) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) E/AndroidRuntime( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at android.widget.LinearLayout.measureVertical(LinearLayout.java:464) E/AndroidRuntime( 961): at android.widget.LinearLayout.onMeasure(LinearLayout.java:278) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2989) E/AndroidRuntime( 961): at android.widget.FrameLayout.onMeasure (FrameLayout.java:245) E/AndroidRuntime( 961): at android.view.View.measure(View.java: 7703) E/AndroidRuntime( 961): at
[android-developers] Repairing the 1.6 install
I understand that the system images made available wqere the wrong ones, but what about the recovery image I used to update? Mine reads Build Number dream_devphone-userdebug 1.6 DRC83 14271 test- keys I reckon test keys means it's the wrong damn one. I say damn as I don't relish the idea of putting all that data back in... But do I have to really? Why couldn't I just redo the 1.6 recovery image, using the right one now? Why do I need to factroy reset the phone first? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Camera and Surface problems with 1.6
1. There's a callback for receiving viewfinder data, but it never occurred to the designer that 3rd parties might want to use that _instead_ of letting the framework draw it directly to a surface. I agree, it seems like an obvious use-case. Given the high quality of many of the Android APIs I always have the suspicion that there are good reasons why the API is this way, but I simply don't know them. 2. The callback for viewfinder data only let's you receive YUV data. This is good from a performance perspective as it comes directly from the camera, but IMHO causes the following issues: This one bothers me less. I'm happy to get the data in its rawest form because it allows for the best performance. For example, with Moseycode, I only use the luminance data to do the image processing - YUV is good for this. And because I support scanning still images, I need to support RGB anyway. Library functions for performing these conversions might be useful though. There are lots of other gripes - like the lack of a way to select the preview frame size, or even to interrogate the api for the available sizes. But my biggest annoyance is the garbage collection problem. I did post a thread to the now defunct android-framework group with a proposed solution, but it didn't solicit any response, and realistically I don't have the time to tackle it right now. My suggestion can be found here: http://groups.google.com/group/android-framework/browse_thread/thread/4e9a968660ec6885# Tom. 2009/10/1 Anders Johansson svi...@gmail.com Hi Tom, It does indeed seem like we're in the same situation. I'm going to play around some more with the position, size and visibility of my PUSH_BUFFERS surface to see what works best. All in all though, I completely agree with your conclusion...this is a hack, and there's no telling how long it will work. I also agree with your point about the mysterious Camera API, here are my main gripes: 1. There's a callback for receiving viewfinder data, but it never occurred to the designer that 3rd parties might want to use that _instead_ of letting the framework draw it directly to a surface. 2. The callback for viewfinder data only let's you receive YUV data. This is good from a performance perspective as it comes directly from the camera, but IMHO causes the following issues: a) The YUV format is dependent on the sensor/vendor hardware. Yes, there is an API to query the format, but considering the not so stellar qualcomm driver implementation for HTC, this may not be trustworthy. b) 3rd parties wishing to use viewfinder data will have to be able to decode all forms of YUV data in order to be safe on future devices, assuming that the API mentioned in the point above is trustworthy. c) The requirement to decode the YUV raises the bar quite a bit for 3rd party developers who might have ideas in this field. Thus, it would seem reasonable to provide an option to receive the data in either YUV or RGB format. Unfortunately, even if the API's are modified in a future release we will be stuck with maintaining different code for different releases and/or OEMs... regards Anders On Oct 1, 1:51 pm, Tom Gibara m...@tomgibara.com wrote: If I understand correctly, you're doing something very similar to what I'm doing in my Moseycode application. In my case I render the camera YUV data via a GLSurfaceView. I can't say whether this will work for certain on all/any 1.6 devices, but my approach since 1.5 has been to make the PUSH_BUFFERS surface very small and to position it off-screen (a nasty hack that works in the emulator at least). I think the smallest supported dimensions that preserve the aspect ratio are 20px x 15px. That said, I'm just waiting for this circuitous implementation to blow-up on me. Why the camera demands a surface in order to provide preview data is a mystery to me (as is so much of the Camera API's operation). Tom 2009/10/1 Anders Johansson svi...@gmail.com Hi all, My company has so far developed four different camera-based applications that all work by manipulating the viewfinder feed from the camera. The Android camera API expects a Surface to draw the viewfinder feed to, however in our apps we rely on sidestepping the direct drawing and grabbing the YUV_420_SP data for manipulation and rendering to a Surface. On 1.5, we achieved this by changing the Surface type from PUSH_BUFFERS to NORMAL, which would in one stroke disable the direct feed to the surface from the camera as well as giving us a Surface onto which we could render the manipulated feed. The problem arises when upgrading to 1.6, as it appears that this hole has been plugged. The Camera class now refuses to start the preview feed if its associated preview display surface is of the wrong type (such as NORMAL). I realize that this is probably correct as per design, unfortunately
[android-developers] Re: java.lang.OutOfMemoryError after orientation changed
Hi, On Oct 1, 4:07 pm, Mika mika.ristim...@tkk.fi wrote: From the stack trace it seems that your trying to allocate 160 MB of memory. And for one app the max heap size in Android is 16 Mb (if i remember correctly). That's why the outofmemoryerror. Don't know why are you allocating that much memory though?? i don't know it, too. Perhaps it helped, if i show you my xml file: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/ak android:text=Streckenlänge: 0 km android:layout_width=wrap_content android:layout_height=wrap_content android:paddingTop=15px android:layout_marginLeft=5px / View android:id=@+id/view1 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/ak android:layout_marginTop=5px/ TextView android:id=@+id/ab android:text=Abbiegepunkt hinzufügen: android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/view1 android:layout_marginLeft=5px android:layout_marginTop=10px / Button android:id=@+id/left android:layout_width=wrap_content android:layout_height=wrap_content android:background=@drawable/left android:layout_below=@id/ab android:layout_alignLeft=@id/ab android:layout_marginLeft=5px android:layout_marginTop=5px/ Button android:id=@+id/right android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginLeft=5px android:layout_toRightOf=@id/left android:layout_alignTop=@id/left android:background=@drawable/right / View android:id=@+id/view2 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/left android:layout_marginTop=5px/ TextView android:id=@+id/gefahr android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/view2 android:text=Gefahrenpunkt: android:layout_marginLeft=5px android:layout_marginTop=10px/ Button android:id=@+id/gefahrbild android:layout_width=wrap_content android:layout_height=wrap_content android:text=mit Bild speichern android:layout_below=@id/gefahr android:layout_marginLeft=5px android:layout_marginTop=5px / Button android:id=@+id/gefahrtext android:layout_width=wrap_content android:layout_height=wrap_content android:text=mit Text speichern android:layout_toRightOf=@id/gefahrbild android:layout_alignTop=@id/gefahrbild android:layout_marginLeft=5px / View android:id=@+id/view3 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/gefahrbild android:layout_marginTop=5px/ Button android:id=@+id/end android:layout_width=fill_parent android:layout_height=wrap_content android:text=Erfassung stoppen android:layout_below=@id/view3 android:layout_marginLeft=5px android:layout_marginTop=10px / RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/end com.google.android.maps.MapView android:id=@+id/mapview android:layout_width=wrap_content android:layout_height=wrap_content android:enabled=false android:clickable=true android:apiKey=api key / /RelativeLayout /RelativeLayout The picture on my buttons are very small and so i thought, the MapView is the problem?? I dont have an Overlay or
[android-developers] Re: MapView Overlays
Thanks for your response Mika, but unless i am misunderstanding what you are saying, it is doing just that, that causes the laggy result. When i let the Overlay (super class) and map view handle which overlays should be visible in the mapView, it becomes so slow it is unusable. Liam On Oct 1, 3:01 pm, Mika mika.ristim...@tkk.fi wrote: What you could try is to use just one instance of your Overlay subclass that includes all the 60 icons that you want to show on the map. -Mika On Oct 1, 4:08 pm, Ne0 liamjamesalf...@googlemail.com wrote: Not had any response, but my solution is to add a bit of intelligence to my activity to only add the overlays that would be displayed on the map currently visible by the map view. I have no idea about how the mapView goes about doing this, but it appears to be really slow at doing so. So i am going to let my activity take the strain and see if it makes it any better. Any thoughts on this issue are still greatly received. Liam On Sep 28, 2:51 pm, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to create new APN setting
a week passed by, still no response guys?? Or maybe it is not possible at all? Thx On Sep 23, 7:50 pm, muhammad.rayhan saviour...@gmail.com wrote: Hello All! This is my first post . I'd like to know how to add newAPNconfiguration programmatically in my android program. Is it possible or not? I already searched the forum but failed to find one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: MapView Overlays
Do you mind sharing what type of app it is? Why are you rendering 60 overlays at a time? Could the problem simply be solved by showing 10 overlays at a time and just prompting the user to search for more if those 10 do not meet their needs? On Sep 28, 8:51 am, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Dynamic Image loading from Resources in ImageView
Hi Dear, i need a similar solution like R.drawable.+myVairable for my stateDrawable. i have 2 stateButtons defined in res/Drawable/statebutton1.xml and res/Drawable/statebutton2.xml now i need to use a variable for Button image like Button.setBackgroundResource(R.drawable.variablename) i have considered Alexey's solution of putting images in assets folder and using getResources().getAssets().open(path to file); but i can place stateDrawable only in Drawable. please suggest any solution On Aug 3, 11:02 am, Faisal T faisalvatak...@gmail.com wrote: Hi Dude, There is a simple method. From your activity you can directly call below code getResources().getDrawable(R.drawable.rID) it will return you the drawable object. regards, Faisal T On Aug 1, 5:55 am, DroidDude bhavy...@gmail.com wrote: Hi, I am very new to Android Development and I have a doubt regarding Image Loading in ImageView from R.drawable. Just to brief What I am trying to accomplish is :Showing a ListView with ImageView and TextView using ViewWrapper pattern. I get the Text Value for TextView from one http service and I store all the values in String Array. I have implemented my own Adapter with my own implementation of getView(). Now the issue: I have put all the images i want to show in res/drawable folder. now based on the value of text I want to pick that image from the folder and show it in the Imageview. For Example: if i get aaa as the value of TextView. I already have aaa.jpg in res/ drawable folder and I want to set that image in ImageView. I don't know how to get the handle for aaa.jpg in androind. I have tried follwoing with no luck: ImageView.setImageResource() - But it takes the rID as argument which is of type int. I cant generate R.drawable.+myVairable. ImageView.setImageDrawable(Drawable.createFromPath(PATHVariable))-But I don't know how to give the path to the image. I tried ./res/ drawable/+variable+.jpg BitmapFactory takes the similar argument for all its method. I really don't want to write any Async Image Loader based on any server based URIs as I dont have any hosting server available. Kindly help. 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: ADC2 submissions and Android 1.6 (Donut)
From http://code.google.com/android/adc/adc2_terms.html Ooops, looks like I had it wrong. Thanks for the correction - had missed that previously. :) This does present a bit of an interesting situation. The HTC Tatoo coming out in October has a 240X320 screen the smallest of any mainstream Android device yet, I believe and uses a different type of touch screen. I wonder how many developers of non-standard button UIs (such as games) have code that adjusts the clickable area appropriately for such a device in their original submission? Not to mention my personal application is only really useful on a ~320X~480 screen size or greater due to font size. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 question about rtsp Streaming
I also think that this is a wireless problem, although Google does not think so: http://code.google.com/p/android/issues/detail?id=2302can=1q=rtsp%20wlancolspec=ID%20Type%20Status%20Owner%20Summary%20Stars On 19 Sep., 18:25, yjshi shiyaju...@gmail.com wrote: Hi,all. I met a very strange problem.And I can not understand the reason of this happening.Recently I just create an app(that is using mediaplayer ) to play the rtsp Streaming.At the beginning,I use the sim card to connect to the internet.I try to let the app play for many times .But it was only success once.Many times the app could not play and the buffer always shows 0%.While I use the WIFI to connect the internet ,the rtsp could be played,but when I use the another WIFI to connect to the internet,to my surprise it failed.Both the sim card and WIFI ,it all could play the http Streaming.The rtsp Streaming is very strange, I can not understand.I guess there is maybe something wrong withWireless. 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: Android 1.6 on ADP1 Force close
Everything work as expected for me including GTalk and Market. Maybe because I performed a factory reset after upgrade. On Oct 1, 12:30 pm, babaroga_srb mikalac...@gmail.com wrote: Thanks for the reply! I have checked the group you provided, seems that htc placed wrong files for download. Hopefully it will be resolved in short period of time! zz, Sava On Oct 1, 5:28 am, Chad Fawcett chadfawc...@gmail.com wrote: See:http://groups.google.com/group/Android-DevPhone-Updating The images on HTC's site are invalid, using test keys, apparently they (JBQ, HTC) are on it, and new images coming soon. On Wed, Sep 30, 2009 at 11:05 PM, otiasj julien.sa...@gmail.com wrote: I had the same problem with my Ion, I had to make a fastboot erase userdata to make it work correctly On Oct 1, 11:27 am, 20cents vincent.barthel...@gmail.com wrote: Same problem here... Plus the android Market GTalk apps don't work anymore Thanks for any help or info On Sep 30, 8:16 pm, babaroga_srb mikalac...@gmail.com wrote: Hello everyone! I have just updated my ADP1 to the latest 1.6 version. During installation everything went ok. But every time when my phone boots i receive Force Close error regardin Google Partner Setup (process com.google.android.partnersetup). Could someon please tell me what is this about? Best regards, Sava --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapView Overlays
Essentially its a tracker, one part of the app tracks gps location and logs it to a file, the other part loads the file into a mapView with the readings (taken every 10 or however many seconds you like), essentially loading the route you took. This is for using when going off road, i am into trail bike riding, i thought it would be cheaper to write an app for my phone then buy a tracker! Then when a guide takes me out in places i have never been, i'll then have the route for another time, so no need for a guide!! But as described when loading the full track (60 being a very small log), the mapView becomes unusable. Regards, Liam On Oct 1, 3:29 pm, polyclefsoftware dja...@gmail.com wrote: Do you mind sharing what type of app it is? Why are you rendering 60 overlays at a time? Could the problem simply be solved by showing 10 overlays at a time and just prompting the user to search for more if those 10 do not meet their needs? On Sep 28, 8:51 am, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Views - Orientation Change
Do Views know changes in orientation? In my case, I create popups from TextView and need to know when the orientation changes(porttrait-- landscape). I cannot depend on activity's onOrientationChange. 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: java.lang.OutOfMemoryError after orientation changed
From the stack trace it looks like the memory allocation is done inside the Map.resize function. So you most likely set a enormous size after the orientation change to your mapview. Adding some Log.i functions might narrow it down to the source of the problem. On 1 Okt., 16:18, Stefan ebay-dah...@web.de wrote: Hi, On Oct 1, 4:07 pm, Mika mika.ristim...@tkk.fi wrote: From the stack trace it seems that your trying to allocate 160 MB of memory. And for one app the max heap size in Android is 16 Mb (if i remember correctly). That's why the outofmemoryerror. Don't know why are you allocating that much memory though?? i don't know it, too. Perhaps it helped, if i show you my xml file: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/ak android:text=Streckenlänge: 0 km android:layout_width=wrap_content android:layout_height=wrap_content android:paddingTop=15px android:layout_marginLeft=5px / View android:id=@+id/view1 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/ak android:layout_marginTop=5px/ TextView android:id=@+id/ab android:text=Abbiegepunkt hinzufügen: android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/view1 android:layout_marginLeft=5px android:layout_marginTop=10px / Button android:id=@+id/left android:layout_width=wrap_content android:layout_height=wrap_content android:background=@drawable/left android:layout_below=@id/ab android:layout_alignLeft=@id/ab android:layout_marginLeft=5px android:layout_marginTop=5px/ Button android:id=@+id/right android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginLeft=5px android:layout_toRightOf=@id/left android:layout_alignTop=@id/left android:background=@drawable/right / View android:id=@+id/view2 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/left android:layout_marginTop=5px/ TextView android:id=@+id/gefahr android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/view2 android:text=Gefahrenpunkt: android:layout_marginLeft=5px android:layout_marginTop=10px/ Button android:id=@+id/gefahrbild android:layout_width=wrap_content android:layout_height=wrap_content android:text=mit Bild speichern android:layout_below=@id/gefahr android:layout_marginLeft=5px android:layout_marginTop=5px / Button android:id=@+id/gefahrtext android:layout_width=wrap_content android:layout_height=wrap_content android:text=mit Text speichern android:layout_toRightOf=@id/gefahrbild android:layout_alignTop=@id/gefahrbild android:layout_marginLeft=5px / View android:id=@+id/view3 android:layout_width=fill_parent android:layout_height=2dip android:background=#FF00FF00 android:layout_below=@id/gefahrbild android:layout_marginTop=5px/ Button android:id=@+id/end android:layout_width=fill_parent android:layout_height=wrap_content android:text=Erfassung stoppen android:layout_below=@id/view3 android:layout_marginLeft=5px android:layout_marginTop=10px / RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@id/end
[android-developers] Re: NumberFormat and comma as decimal separator
Thanks for the comments, I check with my user in Germany and he confirmed that he cannot type the comma into a decimal field in Android. The issue is arising for me because when I copy the text into the edit field I convert it into a localized String which has the comma in it. Once this gets into the edit field it makes my current usage of Double.valueOf fail for the reasons discussed above. I'll probably just change my code to enforce using the period everywhere for consistency until this issue gets fixed in a later version of Android. On Sep 30, 1:30 pm, Streets Of Boston flyingdutc...@gmail.com wrote: I meant 'valueOf' method of the various Number subclasses... :-) You're right. I just took a look at the code that is executed by Double.valueOf(...). It is hard-coded for using periods asdecimalseperators. On Sep 30, 12:55 pm, Gerald gerald.b.n...@gmail.com wrote: There is no valueOf method in the Number class. If I use the Double.valueOf method it fails to work according to my users. The Android docs on Double.valueOf are pretty thin, however the JDK docs are pretty clear that this accepts a string with a number formatted according to the Java Language Specifications and thus does not accept a localized number string. Gerald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Views - Orientation Change
Just want to destroy popups when the orientation changes. On Oct 1, 10:01 am, Vijay vijay.meenakshisunda...@gmail.com wrote: Do Views know changes in orientation? In my case, I create popups from TextView and need to know when the orientation changes(porttrait-- landscape). I cannot depend on activity's onOrientationChange. 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] Unswapped raw sensor orientation values?
Does this still work? I don't see event value array lengths larger than 3 ever. From: http://developer.android.com/reference/android/hardware/SensorListener.html#onSensorChanged(int,%20float[]) IMPORTANT NOTE: The axis are swapped when the device's screen orientation changes. To access the unswapped values, use indices 3, 4 and 5 in values[]. Thanks, R.S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Contact Photo in LiveFolder
Arg! So, I found the bug. Kind of. Somehow, all get calls (getLong (), getBlob(), and of course getString()) on my Cursor are being treated as getString(). This makes no sense to me at all. Why are they not getting directed to the correct functions? On Sep 30, 12:14 pm, nEx.Software email.nex.softw...@gmail.com wrote: I found the source of my problem. MatrixCursor is dropping my byte array for some reason. Now, to find out why. Yay bug hunting... On Sep 30, 10:46 am, Romain Guy romain...@google.com wrote: I checked the history and the contacts live folder used to simply put People.DATA in the cursor as the data for ICON_BITMAP. Try that. On Wed, Sep 30, 2009 at 10:37 AM, nEx.Software email.nex.softw...@gmail.com wrote: I am beginning to wonder whether this is an issue with LiveFolders, or with the ContentProvider not passing the blob properly. I know for a fact that the data getting put into the MatrixCursor is able to be decoded when it goes in, but I don't think it is coming out the other side in the same way that it went in, thus causing the decodeByteArray call to fail and return null. On Sep 30, 10:20 am, nEx.Software email.nex.softw...@gmail.com wrote: I've done it that way too. Are you saying that I need to include those columns and explicitly set them to null? On Sep 30, 10:16 am, Romain Guy romain...@google.com wrote: I'm finally at the office and I just read the live folders code. The constraints are: - If you use ICON_BITMAP, ICON_RESOURCE and ICON_PACKAGE *must* be null - The ICON_BITMAP has to be a Bitmap instance Somehow the generated javadoc in the documentation does not show everything. If you look at the source code of LiveFolders.java you will see a lot more information about the columns and extras. On Wed, Sep 30, 2009 at 10:09 AM, Romain Guy romain...@google.com wrote: Oops, my bad I was thinking of something else. On Wed, Sep 30, 2009 at 9:51 AM, nEx.Software email.nex.softw...@gmail.com wrote: Well, I actually started off with just using the ICON_PACKAGE / ICON_RESOURCE method and wanted to use Photo instead. I have tried this without ICON_PACKAGE / ICON_RESOURCE to no avail. How do I specify the Icon type? On Sep 30, 9:48 am, Romain Guy romain...@google.com wrote: Why are you setting a bitmap and a resource for the icon? You are also not specifying the icon type. On Sep 30, 2009 9:44 AM, nEx.Software email.nex.softw...@gmail.com wrote: I knew I should have included that... This is a bit messy at the moment. private static final String[] CURSOR_COLUMNS = new String[] { BaseColumns._ID, LiveFolders.NAME, LiveFolders.DESCRIPTION, LiveFolders.INTENT, LiveFolders.ICON_PACKAGE, LiveFolders.ICON_RESOURCE, LiveFolders.ICON_BITMAP }; public static MatrixCursor loadNewData(ContentProvider cp, Uri uri) { MatrixCursor mc = new MatrixCursor(CURSOR_COLUMNS); Cursor groupContacts = null; try { groupContacts = cp.getContext().getContentResolver().query (Uri.parse(content://contacts/groups/name/ + uri.getLastPathSegment () + /members), CONTACTS_COLUMN_NAMES, null, null, null); while(groupContacts.moveToNext()) { String timesContacted = Times contacted: + groupContacts.getInt(2); Bitmap Icon = People.loadContactPhoto(cp.getContext(), ContentUris.withAppendedId(People.CONTENT_URI, groupContacts.getLong (0)), R.drawable.icon, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Icon.compress(CompressFormat.PNG, 0, baos); Object[] rowObject = new Object[] { groupContacts.getLong(0), groupContacts.getString(1), timesContacted, ContentUris.withAppendedId(People.CONTENT_URI, groupContacts.getLong(0)), cp.getContext().getPackageName(), R.drawable.icon, baos.toByteArray() }; mc.addRow(rowObject); } return mc; } finally { if (groupContacts != null groupContacts.isClosed() != true) { groupContacts.close(); } } } On Sep 30, 9:35 am, Romain Guy romain...@google.com wrote: Oh yeah, ... email.nex.softw...@gmail.com wrote:The default contacts live folders don't pass photos fr... -- Romain Guy Android framework engineer romain...@android.com Note: please don't send
[android-developers] Re: Application object life cycle.
Thanks Dianne for your answers. My problem regarding the database is that I need it during the lifetime of the application. Now when you say that Application.onTerminate() is not normally called, I have no place to close it, other then open_and_close every time I need it. Would that be a standard way of doing things? How costly is open_and_close? Thanks. On Sep 30, 7:06 pm, Dianne Hackborn hack...@android.com wrote: onTerminate is -not- called under normal operation -- the process is just killed. You are getting that message because you no longer have any references on the database but nobody has closed it, and now the garbage collector is eventually get around to it. You should close the database when you are done with it. And yes, when returning to your app, the process is restarted, and only the visible activity is created at that point. On Wed, Sep 30, 2009 at 3:58 PM, gnugu rho...@gmail.com wrote: Oh, also, when my process is killed while being in the background does coming back from gallery restart the process jumping directly to activity B? It's not in the documentation, that's why I need to ask here. Thanks. On Sep 30, 3:52 pm, Dianne Hackborn hack...@android.com wrote: Yes your process can be killed at any time when it is in the background (and onTerminate is NOT called). On Wed, Sep 30, 2009 at 3:47 PM, gnugu rho...@gmail.com wrote: Hi, When I start my application I prompt the user for the password and use it to instantiate my data adapter object that I will need throughout the application. So I store it in Application object. My activity A prompts user for pwd, instantiates data adapter, sticks it to Application object and later starts activity B which in turn starts the built int gallery activity. When fooling around with gallery and capturing pictures for some time coming back to activity B I discover that Application.myDataAdapter is null. I found out that during me playing with camera the Application.onTerminate() method was called. So it seems like Android killed my process and when B was supposed to become visible it started a process again jumping directly to activity B bypassing A? Is that how it works? Should I then never assume that Application.myField will survive? and init it not only when A is started but whenever I discover it is null? Thanks. -- 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. -- 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: DATE_FORMAT (System.Settings) returns null since 1.6 (Donut)
I think (hope) it's an emulator bug. I filled a bug btw : http://code.google.com/p/android/issues/detail?id=3973 Simon On Oct 1, 7:44 am, EboMike ebom...@gmail.com wrote: Settings.System.getString(resolver, Settings.System.DATE_FORMAT) returns null if the user never made a selection. If the user does choose a date format and then switches back to default format, getString() will return . That was not the case before (and is breaking apps that relied on a valid string). What should an app assume if the return value is null or ? Just MM-dd-? -Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: DATE_FORMAT (System.Settings) returns null since 1.6 (Donut)
Unlikely, since I suddenly got a bunch of one-star uh appilcatoin doesnt run under 1.6 lame ratings. Well, if I could reply, I'd say that there is no official 1.6 out yet, but still. Assuming MM-dd- if the result is either null or an empty string fixed the problem. -Mike On Oct 1, 9:13 am, Max_well maxouw...@gmail.com wrote: I think (hope) it's an emulator bug. I filled a bug btw :http://code.google.com/p/android/issues/detail?id=3973 Simon On Oct 1, 7:44 am, EboMike ebom...@gmail.com wrote: Settings.System.getString(resolver, Settings.System.DATE_FORMAT) returns null if the user never made a selection. If the user does choose a date format and then switches back to default format, getString() will return . That was not the case before (and is breaking apps that relied on a valid string). What should an app assume if the return value is null or ? Just MM-dd-? -Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Contact Photo in LiveFolder
Finally got it to work. I needed to override fillWindow in my MatrixCursor and tell it to not get String values for every column. On Oct 1, 8:35 am, nEx.Software email.nex.softw...@gmail.com wrote: Arg! So, I found the bug. Kind of. Somehow, all get calls (getLong (), getBlob(), and of course getString()) on my Cursor are being treated as getString(). This makes no sense to me at all. Why are they not getting directed to the correct functions? On Sep 30, 12:14 pm, nEx.Software email.nex.softw...@gmail.com wrote: I found the source of my problem. MatrixCursor is dropping my byte array for some reason. Now, to find out why. Yay bug hunting... On Sep 30, 10:46 am, Romain Guy romain...@google.com wrote: I checked the history and the contacts live folder used to simply put People.DATA in the cursor as the data for ICON_BITMAP. Try that. On Wed, Sep 30, 2009 at 10:37 AM, nEx.Software email.nex.softw...@gmail.com wrote: I am beginning to wonder whether this is an issue with LiveFolders, or with the ContentProvider not passing the blob properly. I know for a fact that the data getting put into the MatrixCursor is able to be decoded when it goes in, but I don't think it is coming out the other side in the same way that it went in, thus causing the decodeByteArray call to fail and return null. On Sep 30, 10:20 am, nEx.Software email.nex.softw...@gmail.com wrote: I've done it that way too. Are you saying that I need to include those columns and explicitly set them to null? On Sep 30, 10:16 am, Romain Guy romain...@google.com wrote: I'm finally at the office and I just read the live folders code. The constraints are: - If you use ICON_BITMAP, ICON_RESOURCE and ICON_PACKAGE *must* be null - The ICON_BITMAP has to be a Bitmap instance Somehow the generated javadoc in the documentation does not show everything. If you look at the source code of LiveFolders.java you will see a lot more information about the columns and extras. On Wed, Sep 30, 2009 at 10:09 AM, Romain Guy romain...@google.com wrote: Oops, my bad I was thinking of something else. On Wed, Sep 30, 2009 at 9:51 AM, nEx.Software email.nex.softw...@gmail.com wrote: Well, I actually started off with just using the ICON_PACKAGE / ICON_RESOURCE method and wanted to use Photo instead. I have tried this without ICON_PACKAGE / ICON_RESOURCE to no avail. How do I specify the Icon type? On Sep 30, 9:48 am, Romain Guy romain...@google.com wrote: Why are you setting a bitmap and a resource for the icon? You are also not specifying the icon type. On Sep 30, 2009 9:44 AM, nEx.Software email.nex.softw...@gmail.com wrote: I knew I should have included that... This is a bit messy at the moment. private static final String[] CURSOR_COLUMNS = new String[] { BaseColumns._ID, LiveFolders.NAME, LiveFolders.DESCRIPTION, LiveFolders.INTENT, LiveFolders.ICON_PACKAGE, LiveFolders.ICON_RESOURCE, LiveFolders.ICON_BITMAP }; public static MatrixCursor loadNewData(ContentProvider cp, Uri uri) { MatrixCursor mc = new MatrixCursor(CURSOR_COLUMNS); Cursor groupContacts = null; try { groupContacts = cp.getContext().getContentResolver().query (Uri.parse(content://contacts/groups/name/ + uri.getLastPathSegment () + /members), CONTACTS_COLUMN_NAMES, null, null, null); while(groupContacts.moveToNext()) { String timesContacted = Times contacted: + groupContacts.getInt(2); Bitmap Icon = People.loadContactPhoto(cp.getContext(), ContentUris.withAppendedId(People.CONTENT_URI, groupContacts.getLong (0)), R.drawable.icon, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Icon.compress(CompressFormat.PNG, 0, baos); Object[] rowObject = new Object[] { groupContacts.getLong(0), groupContacts.getString(1), timesContacted, ContentUris.withAppendedId(People.CONTENT_URI, groupContacts.getLong(0)), cp.getContext().getPackageName(), R.drawable.icon, baos.toByteArray() }; mc.addRow(rowObject); } return mc; } finally { if (groupContacts != null groupContacts.isClosed() != true) { groupContacts.close(); } } } On Sep 30,
[android-developers] Re: Application object life cycle.
onTerminate is not called because your process is killed. At that point, it doesn't matter, the kernel is going to clean up all your stuff. Like I said, if you are getting a message about it not being closed, this is because you created and use the object and released all references on it before closing it and now the garbage collector is cleaning it out. This has NOTHING to do with onTerminate or whenever in the future your process may be killed. On Thu, Oct 1, 2009 at 8:50 AM, gnugu rho...@gmail.com wrote: Thanks Dianne for your answers. My problem regarding the database is that I need it during the lifetime of the application. Now when you say that Application.onTerminate() is not normally called, I have no place to close it, other then open_and_close every time I need it. Would that be a standard way of doing things? How costly is open_and_close? Thanks. On Sep 30, 7:06 pm, Dianne Hackborn hack...@android.com wrote: onTerminate is -not- called under normal operation -- the process is just killed. You are getting that message because you no longer have any references on the database but nobody has closed it, and now the garbage collector is eventually get around to it. You should close the database when you are done with it. And yes, when returning to your app, the process is restarted, and only the visible activity is created at that point. On Wed, Sep 30, 2009 at 3:58 PM, gnugu rho...@gmail.com wrote: Oh, also, when my process is killed while being in the background does coming back from gallery restart the process jumping directly to activity B? It's not in the documentation, that's why I need to ask here. Thanks. On Sep 30, 3:52 pm, Dianne Hackborn hack...@android.com wrote: Yes your process can be killed at any time when it is in the background (and onTerminate is NOT called). On Wed, Sep 30, 2009 at 3:47 PM, gnugu rho...@gmail.com wrote: Hi, When I start my application I prompt the user for the password and use it to instantiate my data adapter object that I will need throughout the application. So I store it in Application object. My activity A prompts user for pwd, instantiates data adapter, sticks it to Application object and later starts activity B which in turn starts the built int gallery activity. When fooling around with gallery and capturing pictures for some time coming back to activity B I discover that Application.myDataAdapter is null. I found out that during me playing with camera the Application.onTerminate() method was called. So it seems like Android killed my process and when B was supposed to become visible it started a process again jumping directly to activity B bypassing A? Is that how it works? Should I then never assume that Application.myField will survive? and init it not only when A is started but whenever I discover it is null? Thanks. -- 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. -- 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. -- 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:launchMode=singleInstance pros AND cons
Don't use it. If you are asking these questions, you don't need to use it. The only two launch modes apps should use are multiple and singleTop. The others are for very unusual special cases and require great care and understanding in using them correctly. On Thu, Oct 1, 2009 at 5:38 AM, Chris narendrasingh.bi...@gmail.com wrote: What are advantage and disadvantage of applying android:launchMode=singleInstance in the android.manifest file. Will it hamper the services in the application? And how is it related to the performance of the application? -- 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: App upgrade (with zipalign) causes force closes/disappearing of app icon
zipalign should have no impact on the running of your app at all, except for making some ways the system accesses it faster and lighter since it doesn't need to copy data out of your app. All applications built in to the system have always had zipalign run on them. On Thu, Oct 1, 2009 at 12:52 AM, SCMSoft scms...@gmail.com wrote: Hi, Almost all our users complain that after upgrading to the newest version of our Camera Pro app, either the app crashes or the icon is not showing up anymore in the home screen. The problem seems to be gone after deinstalling and reinstalling the app. How can it be possible that the icon is gone? This is the first version we used zipalign on, can this have something to do with it? Thanks, Swiss Codemonkey team -- 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] how to turn a color into a resource.
i want to change the background image of a button either into a resource drawable or a solid color. findViewById(R.id.myView).setBackgroundResource( xyz == 0 ? R.drawable.myBackground : 0); instead of zero, i want some solid color... tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapView Overlays
Are you aware of My Tracks? It's a free tracker and probably does exactly what you want. If you still wanted to develop your own, there's no need to mark every reading with a separate overlay. Just use a single image for the entire route and update the image every time you update the route. That way you only have 1 overlay. On Oct 1, 9:58 am, Ne0 liamjamesalf...@googlemail.com wrote: Essentially its a tracker, one part of the app tracks gps location and logs it to a file, the other part loads the file into a mapView with the readings (taken every 10 or however many seconds you like), essentially loading the route you took. This is for using when going off road, i am into trail bike riding, i thought it would be cheaper to write an app for my phone then buy a tracker! Then when a guide takes me out in places i have never been, i'll then have the route for another time, so no need for a guide!! But as described when loading the full track (60 being a very small log), the mapView becomes unusable. Regards, Liam On Oct 1, 3:29 pm, polyclefsoftware dja...@gmail.com wrote: Do you mind sharing what type of app it is? Why are you rendering 60 overlays at a time? Could the problem simply be solved by showing 10 overlays at a time and just prompting the user to search for more if those 10 do not meet their needs? On Sep 28, 8:51 am, Ne0 liamjamesalf...@googlemail.com wrote: My problem is my MapView becoming very laggy and so non-responsive at times, that Android thinks its hit deadlock and tries to close it. I am adding 60 overlays to the map view and i originally thought that the icon size may be causing the problem by using up all the memory. When i decreased the overlay icon size, it did improve things, though it is still to slow to be usable. Has anyone experienced anything similar and have a workaround? There may be a better way of doing it other then extending the Hello MapView example. Any thoughts welcomed. Thanks, Liam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 question about rtsp Streaming
Have you tried to find out whether any traffic is successfully sent out the the device using tcpdump or wireshark? Also run a tcpdump on your device to see whether you receive any rtsp streaming. Only from reading about the problem, my first guess is that whatever is causing the problem, it should be independent from your wireless connection. Here are some basic things I would try to find out? 1. Do you have data connectivity on Wifi/cellular? (get a valid IP address and can do data connectivity) 2. If yes, can you intercept the rtsp stream before passing the stream to the media player (I assume here that tcpdump tells you that you received the stream) 3. what APIs are you using for the rtsp streaming (openCore?) -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 1, 7:39 am, ParanoidAndroid bestpriv...@googlemail.com wrote: I also think that this is a wireless problem, although Google does not think so:http://code.google.com/p/android/issues/detail?id=2302can=1q=rtsp%2... On 19 Sep., 18:25, yjshi shiyaju...@gmail.com wrote: Hi,all. I met a very strange problem.And I can not understand the reason of this happening.Recently I just create an app(that is using mediaplayer ) to play the rtsp Streaming.At the beginning,I use the sim card to connect to the internet.I try to let the app play for many times .But it was only success once.Many times the app could not play and the buffer always shows 0%.While I use the WIFI to connect the internet ,the rtsp could be played,but when I use the another WIFI to connect to the internet,to my surprise it failed.Both the sim card and WIFI ,it all could play the http Streaming.The rtsp Streaming is very strange, I can not understand.I guess there is maybe something wrong withWireless. 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: MediaPlayer PVMVErrTimeout error
In an attempt to get more info on the leading ERROR/PlayerDriver (26027): HandleInformationalEvent: type=28 UNHANDLED log event, I added a MediaPlayer onInfo() handler. Unfortunately, the MediaPlayer onInfo() event doesn't fire when this error occurs. Does anyone know what this PlayerDriver Error indicates? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Custom Views Timerview
I figured it out, the problem wasn't coming from this piece of code, my bad.. On 1 oct, 15:53, Gopal Biyani gopalbiy...@gmail.com wrote: If you can send the exact exception from log cat, then it will be easy to find error. On Thu, Oct 1, 2009 at 8:42 AM, andr0id sgrang...@gmail.com wrote: Hi everyone, I've made a simple countdown timer and I would like to use it as a custom view in my xml layout. The view works perfectly well if i add it manually like this: this.myTimerView = new TimerView(this); layout.addView(myTimerView); However when I use it in the xml file, the program crashes. This is what i've done: XML: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/imgv / TextView android:id=@+id/txtv / com.myproject.TimerView android:id=@+id/timer android:layout_width=wrap_content android:layout_height=wrap_content / /RelativeLayout TimerView class: public class TimerView extends View { // Constructors public TimerView(Context context) { super(context); init(); } public TimerView(Context context, AttributeSet attrs) { super(context, attrs); init(); } @Override protected void onDraw(Canvas canvas) { //code } } What am I doing wrong ? 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: Android 1.6 SDK is here!
I'm having trouble getting rid of the permission warning for the new WRITE_EXTERNAL_STORAGE permission. Here are the instructions from the release notes: WRITE_EXTERNAL_STORAGE: Allows an application to write to external storage. Applications using API Level 3 and lower will be implicitly granted this permission (and this will be visible to the user); Applications using API Level 4 or higher must explicitly request this permission. I tried setting the following parameters: * target=android-4 in default.properties * targetSdkVersion=4 in AndroidManifest.xml * minSdkVersion=4 in AndroidManifest.xml ...but the permission prompt would not disappear, even though I do not have the WRITE_EXTERNAL_STORAGE permission listed in my manifest. Has anyone managed to get this working? If so, what steps did you take? Thanks, Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Wake Locks and the Cellular antenna...
Yes - this is true, which makes my dilemma more surprising and perplexing. When I have a PhoneStateListener object registered with the TelephonyManager, PhoneStateListener.onSignalStrengthChanged(int) is not called when the CPU goes to sleep, AND when I have a partial wake lock. The only way I can keep getting updates from the phone is to use a dim wake lock. I verified this is the case by logging signal strength over a very long drive. Thoughts and Ideas? Richard Schilling Mobile Operating Systems Engineer Root Wireless On Sep 30, 6:27 pm, Dianne Hackborn hack...@android.com wrote: I must be missing something here... the antenna stays on even if no wake locks are held, so the radio CPU can wake up the main CPU when there is an incoming phone call or data traffic. On Wed, Sep 30, 2009 at 3:54 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: This is not documented or discussed that I can find, so I post the question here. When the application has a PARTIAL_WAKE_LOCK, the CPU stays turned on, but what about the cellular antenna? Does the PhoneStateListener not receive any change in state from the antenna when the PARTIAL_WAKE_LOCK is acquired? I have an application that needs to continuously read the signal strength while the user isn't using the phone. I suspect I need a FULL_WAKE_LOCK to do that. Is that true? Thanks. Richard Schilling Mobile Operating Systems Engineer -- 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: New Activity from MapActivity
I think you want to be able to zoom. Call setBuiltInZoomControls. MapView mapView = (MapView) findViewById(R.id.myMapViewId); mapView.setBuiltInZoomControls(true); On Sep 30, 2:35 pm, ssun shadowatthe...@gmail.com wrote: Hijotobjects, Thanks for your reply, I just realize there is an example from MapsDemo. After several time I tried, at last I got what I what. It was same with other activity. Intent i = new Intent(this, Details.class); startActivity(i); But I still looking how can I use that after user double tap the map, so it will go to more detail page. Anyway, I found new website with many maps exampleshttp://code.google.com/apis/maps/documentation/demogallery.html Hope it can help you 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: Adding a JAR to my Android project?
Thanks - That saves me trying it out in an AVD target that does not include the maps API shared library. I do not get the rationale for Google not making the library available so the API could be used without the device dependency. Is there a way to find out which devices have the Maps API add-on library? If it is not widely deployed then I guess you have to drop back to using the regular Google Maps API and essentially creating your own MapsActivity (probably no small task). On a related subject, is there a way to find out which devices have which versions of the SDK? On Sep 30, 1:20 pm, Xavier Ducrohet x...@android.com wrote: maps.jar is only the api (and there isn't even any code, it's only stubbed classes/methods). There is extra code present on the devices that is required to run a MapView. Adding maps.jar to your application is not going to work. Xav On Wed, Sep 30, 2009 at 12:19 PM,jotobjectsjotobje...@gmail.com wrote: Does this work for maps.jar (Android Maps API) if you are on a device that doesn't have it in a shared library? I'm asking because the docs say The Maps external library is not part of the standard Android library, so it may not be present on some compliant Android-powered devices. http://code.google.com/android/add-ons/google-apis/maps-overview.html Why does that matter if you can include the library with your application package? On Sep 30, 10:59 am, Xavier Ducrohet x...@android.com wrote: I'm guessing you use the Ant script if you don't use eclipse then. Create a libs folder in your root directly (same level as res, the manifest, etc...), and just drop your jar file in there. It'll be automatically picked up by the build script. Xav On Tue, Sep 29, 2009 at 10:31 PM, JavaNut i...@chiralsoftware.net wrote: Is there a way to add external JARs to an Android project? I have some code in an external JAR file that I want to use. I saw many references to doing this within Eclipse, but I don't have Eclipse. I assume there's some way to do it by editing AndroidManifest.xml? I couldn't find any description of how to do this other than using Eclipse. -- Xavier Ducrohet Android SDK Tech Lead Google Inc. -- Xavier Ducrohet Android SDK Tech Lead Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Issue in broadcasting SMS through Android
Right, I don't want my phone to be sending thousands of sms without letting me know either. On Oct 1, 3:27 am, Cédric Berger cedric.berge...@gmail.com wrote: On Wed, Sep 30, 2009 at 18:25, Nainos nainos.sm...@gmail.com wrote: Hi! There seems to be a limit to the number of SMS that can be sent programmatically. It seems to be hovering around 70 to 100 messages. After a batch of messages, when I try to resend a batch I get a warning message A large number of SMS are being sent. Press OK to continue or Cancel to stop sending This requires user intervention and impedes the program from sending SMS. Is there a way around this error message? Maybe a way to turn off the warnings? I guess cell phone providers would not want such a warning to be removed. Just like you cannot change the sms application behaviour which limits an sms message to 3 sms, and then converts to mms. (And also for example in my case (french SFR network), the contract specified illimited sms, but not automatically sent sms) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
Are you using android:targetSdkVersion=4? The namespace prefix is important. As long as your manifest has a uses-sdk android:targetSdkVersion=4/ under the manifest tag, you won't be forced to have the permissions. On Thu, Oct 1, 2009 at 10:52 AM, Peter mr.bald...@gmail.com wrote: I'm having trouble getting rid of the permission warning for the new WRITE_EXTERNAL_STORAGE permission. Here are the instructions from the release notes: WRITE_EXTERNAL_STORAGE: Allows an application to write to external storage. Applications using API Level 3 and lower will be implicitly granted this permission (and this will be visible to the user); Applications using API Level 4 or higher must explicitly request this permission. I tried setting the following parameters: * target=android-4 in default.properties * targetSdkVersion=4 in AndroidManifest.xml * minSdkVersion=4 in AndroidManifest.xml ...but the permission prompt would not disappear, even though I do not have the WRITE_EXTERNAL_STORAGE permission listed in my manifest. Has anyone managed to get this working? If so, what steps did you take? Thanks, Peter -- 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 turn a color into a resource.
Use setBackgroundColor() On Thu, Oct 1, 2009 at 10:00 AM, sdphil phil.pellouch...@gmail.com wrote: i want to change the background image of a button either into a resource drawable or a solid color. findViewById(R.id.myView).setBackgroundResource( xyz == 0 ? R.drawable.myBackground : 0); instead of zero, i want some solid color... tia. -- 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: java.lang.OutOfMemoryError after orientation changed
Actually I thought you set the size by your self, didn't notice that you posted the xml file. So you could have wrote the size to logcat with Log. So in this I don't know whats causing the view to consume memory that way it does. On 1 Okt., 17:25, Stefan ebay-dah...@web.de wrote: Hi On Oct 1, 5:09 pm, Beowolve beowo...@gmail.com wrote: From the stack trace it looks like the memory allocation is done inside the Map.resize function. So you most likely set a enormous size after the orientation change to your mapview. hmmm, i never set any size in my source code. Adding some Log.i functions might narrow it down to the source of the problem. can you please show me an example. What tag i must set in the Log.i function?? Log.i(TAG,MSG) I try to use the onConfigurationChanged() functtion. If i set another xml file with less content/widgets (only 1 TextView, 1 EditText and 1 button) it works: if(config.orientation==Configuration.ORIENTATION_LANDSCAPE) { setContentView(R.layout.ANOTHER_XML_FILE); } But i've read, that the onConfigurationChanged - method isn't the best choice. So if there is a solution without that, i will prefer that. Thanks, Stefan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse crashing after update to ADT 0.9.3 and SDK 1.6
After trying the revert option of Eclipse it seems it does not working correctly. I selected the latest version with the XML editor 3.04, then Eclipse restarts and the versions of all my plugins are the same. XML editor stays to 3.1. Anyone with the same problem? On Sep 30, 10:20 am, JMichel jmbouff...@gmail.com wrote: It seems that some of the latest updates in Ganymede didn't find the XUL interpreter from my system so I needed to add this line at the end of eclipse.ini file: -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.1.3/ xulrunner Now Eclipse is launching but I still have the problem explained in this thread:http://groups.google.ca/group/android-developers/browse_thread/thread... After rolling back to a previous version of the Eclipse XML editor everything should work. On Sep 29, 3:09 pm, JMichel jmbouff...@gmail.com wrote: Here is the log file content:http://pastebin.ca/1584740 On Sep 29, 1:19 pm, Xavier Ducrohet x...@android.com wrote: can you post (or send me) the content of the Eclipse log file? It's located inside your eclipse workspace (.metadata/.log) thanks Xav On Tue, Sep 29, 2009 at 8:48 AM, JMichel jmbouff...@gmail.com wrote: Hi, I'm running Eclipse Ganymede on Ubuntu 9.04. I wanted to update to the newest Android SDK 1.6r1 from 1.5r3. The procedure that I followed is: - Run Eclipse - Update every Eclipse components from the update manager (this updated ADT to version 0.9.3) - Restart Eclipse (Everything works fine) - Untar the Android SDK 1.6r1 - In Eclipse preference-Android, I selected the newly uncompressed folder containing Android SDK 1.6r1 - Click on OK - Eclipse runs some tasks and crashes After this, whenever I try to run Eclipse again it brings an empty windows on screen and does nothing else. Is there a way to come back to the old SDK without starting Eclipse, with config files for instance? Other suggestions? Thanks -- Xavier Ducrohet Android SDK Tech Lead Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] DDMS doesn't show wake locks.
I can't get DDMS to show the wake locks on a device when it's tethered. Does anyone else have this problem? Thanks. 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 -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 on ADP1 Force close
On Oct 1, 4:44 pm, Guillaume Perrot guillaume.p...@gmail.com wrote: Everything work as expected for me including GTalk and Market. Maybe because I performed a factory reset after upgrade. The problem is that your device is still using the (wrong) test keys instead of the release keys, so you have to wipe flash your device once more when the correct version is released. :-) /Andrew On Oct 1, 12:30 pm, babaroga_srb mikalac...@gmail.com wrote: Thanks for the reply! I have checked the group you provided, seems that htc placed wrong files for download. Hopefully it will be resolved in short period of time! zz, Sava On Oct 1, 5:28 am, Chad Fawcett chadfawc...@gmail.com wrote: See:http://groups.google.com/group/Android-DevPhone-Updating The images on HTC's site are invalid, using test keys, apparently they (JBQ, HTC) are on it, and new images coming soon. On Wed, Sep 30, 2009 at 11:05 PM, otiasj julien.sa...@gmail.com wrote: I had the same problem with my Ion, I had to make a fastboot erase userdata to make it work correctly On Oct 1, 11:27 am, 20cents vincent.barthel...@gmail.com wrote: Same problem here... Plus the android Market GTalk apps don't work anymore Thanks for any help or info On Sep 30, 8:16 pm, babaroga_srb mikalac...@gmail.com wrote: Hello everyone! I have just updated my ADP1 to the latest 1.6 version. During installation everything went ok. But every time when my phone boots i receive Force Close error regardin Google Partner Setup (process com.google.android.partnersetup). Could someon please tell me what is this about? Best regards, Sava --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: lock_layer() Warnings
Upon further testing, it seems to have been my use of the android.os.SystemClock time methods instead of using System.currentTimeMillis() in my game loop thread timing, which is what I had originally used (read somewhere to use the android ones instead). At any rate, having reverted back, I am no longer having this issue. Hope this helps anyone else experiencing a similar problem! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADC2 submissions and Android 1.6 (Donut)
It would appear 1.6 is now being rolled out to all T-mobile users ( http://forums.t-mobile.com/tmbl/board/message?board.id=AndroidGeneralthread.id=6733 and most android news sites). Ouch for those who happen to have application problems under the new release. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
On Sep 15, 5:22 pm, Xavier Ducrohet x...@android.com wrote: http://android-developers.blogspot.com/2009/09/android-16-sdk-is-here... And today T-Mobile is starting to roll it out to customers. Does anyone else think 2 weeks is a bit short of a time for developers to ensure that their app works with a new OS level? Frankly I'm a bit stunned. -- Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse crashing after update to ADT 0.9.3 and SDK 1.6
I had something similar, the procedures adopted: 1 - made sure that the version he was using was a 1.6 jdk 2 - I downloaded the ADT 0.9.3, did not update via the site, I place the installation process. Ai ran smoothly. The eclipse has a lot of it, sometimes it takes the jdk that exist in the machine ... window preference java Installed JRS 2009/10/1 JMichel jmbouff...@gmail.com After trying the revert option of Eclipse it seems it does not working correctly. I selected the latest version with the XML editor 3.04, then Eclipse restarts and the versions of all my plugins are the same. XML editor stays to 3.1. Anyone with the same problem? On Sep 30, 10:20 am, JMichel jmbouff...@gmail.com wrote: It seems that some of the latest updates in Ganymede didn't find the XUL interpreter from my system so I needed to add this line at the end of eclipse.ini file: -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.1.3/ xulrunner Now Eclipse is launching but I still have the problem explained in this thread: http://groups.google.ca/group/android-developers/browse_thread/thread... After rolling back to a previous version of the Eclipse XML editor everything should work. On Sep 29, 3:09 pm, JMichel jmbouff...@gmail.com wrote: Here is the log file content:http://pastebin.ca/1584740 On Sep 29, 1:19 pm, Xavier Ducrohet x...@android.com wrote: can you post (or send me) the content of the Eclipse log file? It's located inside your eclipse workspace (.metadata/.log) thanks Xav On Tue, Sep 29, 2009 at 8:48 AM, JMichel jmbouff...@gmail.com wrote: Hi, I'm running Eclipse Ganymede on Ubuntu 9.04. I wanted to update to the newest Android SDK 1.6r1 from 1.5r3. The procedure that I followed is: - Run Eclipse - Update every Eclipse components from the update manager (this updated ADT to version 0.9.3) - Restart Eclipse (Everything works fine) - Untar the Android SDK 1.6r1 - In Eclipse preference-Android, I selected the newly uncompressed folder containing Android SDK 1.6r1 - Click on OK - Eclipse runs some tasks and crashes After this, whenever I try to run Eclipse again it brings an empty windows on screen and does nothing else. Is there a way to come back to the old SDK without starting Eclipse, with config files for instance? Other suggestions? Thanks -- Xavier Ducrohet Android SDK Tech Lead Google Inc. -- Ray da Costa The best way to predict the future is to invent it. Alan Kay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] where is sleep/screen behavior documented?
I'm looking around and trying to find out where sleep behavior is documented - and I mean in the general sense. When the phone is left alone: * Sometimes the phone screen dims and doesn't shut off. * Sometimes the phone screen goes dark in five seconds * Sometimes the menu lock happens. * Sometimes the menu lock doesn't happen. * Sometimes the only way to darken the screen is to push the power button. What's not clear is what triggers these different states. I'm looking for a complete list I can use in testing and application validation. Can anyone point me in the right direction? Thanks. Richard Schilling Mobile Operating Systems Engineer Root Wireless, Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ActivityNotFoundException on explicit class declared in manifest on G1, emulator OK
Found the problem due to problem with release build scripts. Diagnosis: pilot error. DOH! On Sep 30, 6:33 pm, David Bernstein dbb.post...@gmail.com wrote: I have some code that starts another activity based on a menu item selection: public boolean onOptionsItemSelected( MenuItem item ) { Log.d( TAG, onOptionsItemSelected(): entering... ); //... switch ( item.getItemId() ) { //... case MENU_REINIT: Log.d( TAG, onOptionsItemSelected(): MENU_REINIT ); startActivity( new Intent( this, InitWebAct.class ) ); break; case MENU_ACCT: Log.d( TAG, onOptionsItemSelected(): MENU_ACCT ); startActivity( new Intent( this, AcctAct.class ) ); break; //.. The MENU_REINIT and MENU_ACCT cases are coded identically. The REINIT case works everywhere. The MENU_ACCT case works in the emulator, but crashes on my real T-Mobile G1 running Android 1.5. Both activities are similarly declared in the Android manifest file: activity android:name=.AcctAct android:label=@string/c_acct /activity ... activity android:name=.InitWebAct android:label=@string/t_init /activity Trying to get that AcctAct activity started on the physical device crashes with an ActivityNotFoundException: ... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): entering... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): MENU_ACCT 09-30 15:18:03.697 I/ActivityManager( 56): Starting activity: Intent { comp={com.orgmob/com.orgmob.AcctAct} } 09-30 15:18:03.697 D/AndroidRuntime( 3448): Shutting down VM 09-30 15:18:03.697 W/dalvikvm( 3448): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-30 15:18:03.697 E/AndroidRuntime( 3448): Uncaught handler: thread main exiting due to uncaught exception 09-30 15:18:03.897 E/AndroidRuntime( 3448): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.orgmob/com.orgmob.AcctAct}; have you declared this activity in your AndroidManifest.xml? 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1480) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1454) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivityForResult(Activity.java:2656) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivity(Activity.java:2700) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubsAct.onOptionsItemSelected(ClubsAct.java:344) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onOptionsItemSelected(Activity.java:2197) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubAct.onOptionsItemSelected(ClubAct.java:966) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onMenuItemSelected(Activity.java:2085) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java:820) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:813) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.invokeItem (ExpandedMenuView.java:89) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.onItemClick (ExpandedMenuView.java:93) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.ListView.performItemClick(ListView.java:3132) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1620) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.handleCallback(Handler.java:587) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.dispatchMessage(Handler.java:92) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Looper.loop(Looper.java:123) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.ActivityThread.main(ActivityThread.java:3948) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at java.lang.reflect.Method.invokeNative(Native Method) 09-30 15:18:03.897 E/AndroidRuntime( 3448):
[android-developers] Re: ActivityNotFoundException on explicit class declared in manifest on G1, emulator OK
Found the problem due to problem with release build scripts. Diagnosis: pilot error. DOH! On Sep 30, 6:33 pm, David Bernstein dbb.post...@gmail.com wrote: I have some code that starts another activity based on a menu item selection: public boolean onOptionsItemSelected( MenuItem item ) { Log.d( TAG, onOptionsItemSelected(): entering... ); //... switch ( item.getItemId() ) { //... case MENU_REINIT: Log.d( TAG, onOptionsItemSelected(): MENU_REINIT ); startActivity( new Intent( this, InitWebAct.class ) ); break; case MENU_ACCT: Log.d( TAG, onOptionsItemSelected(): MENU_ACCT ); startActivity( new Intent( this, AcctAct.class ) ); break; //.. The MENU_REINIT and MENU_ACCT cases are coded identically. The REINIT case works everywhere. The MENU_ACCT case works in the emulator, but crashes on my real T-Mobile G1 running Android 1.5. Both activities are similarly declared in the Android manifest file: activity android:name=.AcctAct android:label=@string/c_acct /activity ... activity android:name=.InitWebAct android:label=@string/t_init /activity Trying to get that AcctAct activity started on the physical device crashes with an ActivityNotFoundException: ... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): entering... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): MENU_ACCT 09-30 15:18:03.697 I/ActivityManager( 56): Starting activity: Intent { comp={com.orgmob/com.orgmob.AcctAct} } 09-30 15:18:03.697 D/AndroidRuntime( 3448): Shutting down VM 09-30 15:18:03.697 W/dalvikvm( 3448): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-30 15:18:03.697 E/AndroidRuntime( 3448): Uncaught handler: thread main exiting due to uncaught exception 09-30 15:18:03.897 E/AndroidRuntime( 3448): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.orgmob/com.orgmob.AcctAct}; have you declared this activity in your AndroidManifest.xml? 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1480) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1454) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivityForResult(Activity.java:2656) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivity(Activity.java:2700) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubsAct.onOptionsItemSelected(ClubsAct.java:344) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onOptionsItemSelected(Activity.java:2197) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubAct.onOptionsItemSelected(ClubAct.java:966) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onMenuItemSelected(Activity.java:2085) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java:820) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:813) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.invokeItem (ExpandedMenuView.java:89) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.onItemClick (ExpandedMenuView.java:93) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.ListView.performItemClick(ListView.java:3132) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1620) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.handleCallback(Handler.java:587) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.dispatchMessage(Handler.java:92) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Looper.loop(Looper.java:123) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.ActivityThread.main(ActivityThread.java:3948) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at java.lang.reflect.Method.invokeNative(Native Method) 09-30 15:18:03.897 E/AndroidRuntime( 3448):
[android-developers] Re: lock_layer() Warnings
My bad, the above mentioned solution did not correct my issue after all, I just happened to have a lucky run, or perhaps I didn't wait long enough. Continuing to check for a solution. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 is sleep/screen behavior documented?
One place to start is to learn about the PowerManager: http://developer.android.com/reference/android/os/PowerManager.html Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 1, 12:24 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: I'm looking around and trying to find out where sleep behavior is documented - and I mean in the general sense. When the phone is left alone: * Sometimes the phone screen dims and doesn't shut off. * Sometimes the phone screen goes dark in five seconds * Sometimes the menu lock happens. * Sometimes the menu lock doesn't happen. * Sometimes the only way to darken the screen is to push the power button. What's not clear is what triggers these different states. I'm looking for a complete list I can use in testing and application validation. Can anyone point me in the right direction? Thanks. Richard Schilling Mobile Operating Systems Engineer Root Wireless, Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 is sleep/screen behavior documented?
Unless there is a third party app messing with you, there is something broken with your software. The typical behavior is: - Screen dims after the screen-off timeout sets in preferences, and then turns off (and locks) a few seconds later. - Screen turns off and locks with you press them end call / power button. This can be changed by applications -- for example most apps that play videos turn on the option to keep the screen on while the video is playing, so then you will need to manually press the power key to make it turn off. Apps can also hold wake locks to impact how the device goes to sleep, though they need to be granted the power permission to do so. (No permission is needed to simply keep the screen on while your window is in the foreground.) On Thu, Oct 1, 2009 at 12:24 PM, Richard Schilling richard.rootwirel...@gmail.com wrote: I'm looking around and trying to find out where sleep behavior is documented - and I mean in the general sense. When the phone is left alone: * Sometimes the phone screen dims and doesn't shut off. * Sometimes the phone screen goes dark in five seconds * Sometimes the menu lock happens. * Sometimes the menu lock doesn't happen. * Sometimes the only way to darken the screen is to push the power button. What's not clear is what triggers these different states. I'm looking for a complete list I can use in testing and application validation. Can anyone point me in the right direction? Thanks. Richard Schilling Mobile Operating Systems Engineer Root Wireless, Inc. -- 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: java.lang.OutOfMemoryError after orientation changed
hi, i have test it without the mapView and my app work fine after i rotate the emulator. so the problem is the mapView. Can the display size a problem?? Because the button, which is over the MapView (if it will be activated), is positionated at the button of the display. But than i think, the MapView will be rendered, but is not visible for the user, because the display size in landscape is to small??? Is the only way to write a new layout xml file for landscape mode? Thanks, Stefan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ActivityNotFoundException on explicit class declared in manifest on G1, emulator OK
Found the problem due to problem with release build scripts. Diagnosis: pilot error. DOH! On Sep 30, 6:33 pm, David Bernstein dbb.post...@gmail.com wrote: I have some code that starts another activity based on a menu item selection: public boolean onOptionsItemSelected( MenuItem item ) { Log.d( TAG, onOptionsItemSelected(): entering... ); //... switch ( item.getItemId() ) { //... case MENU_REINIT: Log.d( TAG, onOptionsItemSelected(): MENU_REINIT ); startActivity( new Intent( this, InitWebAct.class ) ); break; case MENU_ACCT: Log.d( TAG, onOptionsItemSelected(): MENU_ACCT ); startActivity( new Intent( this, AcctAct.class ) ); break; //.. The MENU_REINIT and MENU_ACCT cases are coded identically. The REINIT case works everywhere. The MENU_ACCT case works in the emulator, but crashes on my real T-Mobile G1 running Android 1.5. Both activities are similarly declared in the Android manifest file: activity android:name=.AcctAct android:label=@string/c_acct /activity ... activity android:name=.InitWebAct android:label=@string/t_init /activity Trying to get that AcctAct activity started on the physical device crashes with an ActivityNotFoundException: ... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): entering... 09-30 15:18:03.697 D/oma.ClubsAct( 3448): onOptionsItemSelected(): MENU_ACCT 09-30 15:18:03.697 I/ActivityManager( 56): Starting activity: Intent { comp={com.orgmob/com.orgmob.AcctAct} } 09-30 15:18:03.697 D/AndroidRuntime( 3448): Shutting down VM 09-30 15:18:03.697 W/dalvikvm( 3448): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 09-30 15:18:03.697 E/AndroidRuntime( 3448): Uncaught handler: thread main exiting due to uncaught exception 09-30 15:18:03.897 E/AndroidRuntime( 3448): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.orgmob/com.orgmob.AcctAct}; have you declared this activity in your AndroidManifest.xml? 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1480) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1454) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivityForResult(Activity.java:2656) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.startActivity(Activity.java:2700) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubsAct.onOptionsItemSelected(ClubsAct.java:344) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onOptionsItemSelected(Activity.java:2197) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.orgmob.ClubAct.onOptionsItemSelected(ClubAct.java:966) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.Activity.onMenuItemSelected(Activity.java:2085) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java:820) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:813) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.invokeItem (ExpandedMenuView.java:89) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at com.android.internal.view.menu.ExpandedMenuView.onItemClick (ExpandedMenuView.java:93) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.ListView.performItemClick(ListView.java:3132) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1620) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.handleCallback(Handler.java:587) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Handler.dispatchMessage(Handler.java:92) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.os.Looper.loop(Looper.java:123) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at android.app.ActivityThread.main(ActivityThread.java:3948) 09-30 15:18:03.897 E/AndroidRuntime( 3448): at java.lang.reflect.Method.invokeNative(Native Method) 09-30 15:18:03.897 E/AndroidRuntime( 3448):
[android-developers] Re: App upgrade (with zipalign) causes force closes/disappearing of app icon
On Oct 1, 12:52 am, SCMSoft scms...@gmail.com wrote: Almost all our users complain that after upgrading to the newest version of our Camera Pro app, either the app crashes or the icon is not showing up anymore in the home screen. The problem seems to be gone after deinstalling and reinstalling the app. How can it be possible that the icon is gone? This is the first version we used zipalign on, can this have something to do with it? How is it crashing? Exception? Native crash? What does logcat show? This happens on an upgrade-install but not uninstall/reinstall? Is it 100% reproducible? (You say your users are seeing it; are *you* seeing 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] does Android support displaying HTML, javascript, etc. within an application?
We have an Android application. Now I need to conduct a user survey for this application. Our app will display a list of selections, etc. This view and it's control will be data driven by (a) document(s) downloaded from a server. What Android utilities I can use to displaying HTML, javascript, etc. within an application? 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: does Android support displaying HTML, javascript, etc. within an application?
We have an Android application. Now I need to conduct a user survey for this application. Our app will display a list of selections, etc. This view and it's control will be data driven by (a) document(s) downloaded from a server. What Android utilities I can use to displaying HTML, javascript, etc. within an application? Use android.webkit.WebView to embed a browser within your application. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: EditText`s hint disappeared when Input Type is set.
Ok I think I`ve found the cause of bug, at least, you can reproduce it on your SDK. Just set EditText`s Input Type attribute to, for example, textPassword and then set Gravity attribute to center or center_horizontal - these steps will make EditText`s hint disappear. If you switch Gravity to any other option (left,right...) hint will appear again.(After you restart emulator). I suggest this is a bug of SDK 1.5. Where can I describe it (Jira or some other ticket system) to make android developers notice it? It`s really annoing. Does anybody have a workaround? How to place hint in the center of EditText? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Application Manager Force Close
Hello Everybody, I´m having the following issue. The ApplicationManager is killing the process of my application when the user presses on FORCE STOP on the Aplication Manager. MENU- SETTINGS - APPLICATIONS - MANAGE APPLICATIONS - My APP . FORCE STOP. According to the documentation a broadcast action is sent: Intent.ACTION_PACKAGE_RESTARTED Broadcast Action: The user has restarted a package, and all of its processes have been killed. All runtime state associated with it (processes, alarms, notifications, etc) should be removed. *Note that the restarted package does not receive this broadcast.* The data contains the name of the package. How can I listen that action in my application; I have tried creating a BroadcastReceiver on my package, but the onReceive() is not called. I added the following to my receiver on the manifest, but nothing changed. receiver android:name=.MyReceiver intent-filter action android:name=android.intent.action.PACKAGE_RESTARTED/ /intent-filter /receiver Emy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Application Manager Force Close
So you want to restart your app when the user just explicitly said he didn't want to run your app anymore?? Don't do that. On Thu, Oct 1, 2009 at 2:13 PM, Emiliano Schiano emylya...@gmail.com wrote: Hello Everybody, I´m having the following issue. The ApplicationManager is killing the process of my application when the user presses on FORCE STOP on the Aplication Manager. MENU- SETTINGS - APPLICATIONS - MANAGE APPLICATIONS - My APP . FORCE STOP. According to the documentation a broadcast action is sent: Intent.ACTION_PACKAGE_RESTARTED Broadcast Action: The user has restarted a package, and all of its processes have been killed. All runtime state associated with it (processes, alarms, notifications, etc) should be removed. Note that the restarted package does not receive this broadcast. The data contains the name of the package. How can I listen that action in my application; I have tried creating a BroadcastReceiver on my package, but the onReceive() is not called. I added the following to my receiver on the manifest, but nothing changed. receiver android:name=.MyReceiver intent-filter action android:name=android.intent.action.PACKAGE_RESTARTED/ /intent-filter /receiver Emy -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---