Re: [android-developers] Application Priority
Hi Dianne, Thanks for your reply.I got answer.In third question Can I set the priority for the application ? I m trying to say that suppose I m playing one game (or any app) suddenly one call come and my app will stop.So is call high priority process ? Thanks regards Arindam Ghosh On Mon, Jul 5, 2010 at 12:16 PM, Dianne Hackborn hack...@android.com wrote: On Sun, Jul 4, 2010 at 8:39 PM, arindam arindam2gh...@gmail.com wrote: 1. Can LMK (Low Memory Killer) kill service ? Yes. 2. Can I open multiple instance of same applications ? You can launch multiple activity stacks; they will be running in the same process. 3. Can I set the priority for the application ? What do you mean by priority? Most likely, no. 4. LMK kills application(process) or one activity(suppose in application 4 activity)..If it can kill activity then how activity stack handling this. The low memory killer only kills processes. By default all components (activities, services, etc) of an application run in the same process. -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Copy protection invisible app
I have an app with Copy Protection on. Since a number of users have reported being unable to find the app on Market since upgrading to 2.1, I have researched the issue and copy protection seems to be the culprit. Turning off copy protection is the answer, but it seems that it leads to file access problems and can require a reinstall, which is not a very good user experience. However, this ought to have been fixed in 1.6 http://code.google.com/p/android/issues/detail?id=2047 which means I should be able to turn off copy protection and everything is ok. But some people have still encountered this issue and their users had to reinstall. So, my question is this, if I turn off copy protection, will all users have to reinstall the app? Will only 1.5 users have to reinstall (30%)? 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: notification/broadcast for sent sms
Issue 2261 requests this feature: http://code.google.com/p/android/issues/detail?id=2261 Given that the provider is accessible (if permissions are granted), and there is already a change notification and broadcast on reception, I wonder why there isn't a change notification or broadcast when a message is sent. On Jul 4, 10:09 am, Saurav to.saurav.mukher...@gmail.com wrote: Thank you for ur reply! Indeed. Point is i'm not sending the sms. the sms is sent by the user using some other app or the default messaging app. So, basically, my hands are tied. Like the sms_receive broadcast, is there something for sms sent? i just need to know when a sms is sent. On Jul 4, 1:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 4, 2010 at 3:28 AM, Saurav to.saurav.mukher...@gmail.com wrote: Could anyone enlighten me on this subject? Please! Send theSMSwith SmsManager, and then you can register a PendingIntent to be notified when it issent. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Modify Browser Default Search Functionality on Pressing ENTER Key!!
Hi All, I want to modify default Search Functionality of Browser on Pressing Enter Key. I want that on Pressing Enter Key on the Browser Application(different views), it will enter a New Line instead of loading a new view and go into the Search Mode. Can anyone give directions to do the same. Thanks Regards, Pranjal -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Remove an inputtype once set
Using setInputType() on a text view works great for making it editable but there does not seem to be a way to remove this once set. I tried setting it to null but still the same issue. Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Send MMS without any GUI
Hello, I wan't to send a MMS without any interface. I know I can send with the Intent android.intent.action.SEND_MSG, but this action launch the defaut GUI for compose message. Is there other action / intent for send a MMS ? tks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Set current tab from a dialog box?
Hi all, I have a main TabActivity contains 2 tabs, each tab is an activity. By default the TabActivity will display the content of the first tab. From the second tab, a edit form will be pop up as dialog box. Now in this dialog box, once i click the save button, i would like to 1. close the dialog 2. navigate back to the TabActivity 3. set current tab to the second tab My problem is i can't get the reference of TabActivity to call setCurrentTab function from the pop up dialog. I spent a lot of time to google but don't have an answer till now, can someone kindly help me on this? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Default shared preferences consistency check
I am facing now a strange issue. What I have done is to perform the consistency checks in the onSharedPreferenceChanged, and if something is wrong, to reedit the value that is being changed to the default value (if the user is trying to enable the mail sending but no mail address is set, I edit back the check option to false) and then I show up an error dialog. What is happening is that the dialog shows up correctly, but the value is not changed back to false. I suspect that I can't change preference values in onSharedPreferenceChanged, or that the value that is being changed is stored after the framework fires my onSharedPreferenceChanged method (I will try to take a look at the source code this evening), or that the commi()t on the preference editor is something like a nested tx. However, is there another way to do this? Am I missing something? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problems while working with Android 2.2 Froyo - Need help - Thanks very much!
*Hi,* * * *I have a problem while trying to run my app in new Android 2.2 Froyo emulator and real device Nexus One.* *The problem is that when I try to call java.nio.channels.Selector.wakeup() method, it will throw a runtime exception NullPointerException. But this code works very well on all previous releases of Android platform.* * * *Does anybody know why in Froyo this method doesn't work as expected?* * * *thanks very much* * * *Alex* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is it possible to disable scroling in a ListView (GridView)?
thanks, that link is interesting. Just as behind that link I have to implement a design that contains of GridViews inside a ScrollView. At least I thought I could leverage from GridView. I think that disabling scrolling in gridview / listview is something most developers expect - as to be seen here. And since there is no section in the dev guide or reference explaining why this is not possible (prove me wrong) this question will come up again and again. On 5 Jul., 04:40, Peter Teoh htmldevelo...@gmail.com wrote: On Sat, Apr 3, 2010 at 11:24 AM, oviroa ovi...@gmail.com wrote: I need to add a drawable background to aGridViewthat scrolls with the grid, instead of having the grid scroll on top of the background. I figured the easiest way is to disable thescrollingand nest the grid inside a ScrollView. Is that possible? How about this: http://code.google.com/p/android/issues/detail?id=4051 It is implementing aGridViewinside the ScrollView, and highlighted the problem with it. It also gave a length explanation on why this is NOT recommended. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- Regards, Peter Teoh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Default Android Applications
: Hi all, I am new to Android Developement. I am going to start writing applications in Android OS? I would like to know what are all the basic features and apps available when Android OS is installed in Mobile? I would like to implement following Apps Dialer,Contacts,Messaging Browser,Gallery,Camera Music,Media Player,Google Mail Market,Youtube,Alarm Clock Calculator,Calendar,Email Favorite contacts,FM radio,Google Maps Google Talk,Homescreen selector,Java Downloads Moxier Calendar,Moxier Contacts,Moxier Mail Moxier Sync,Moxier Tasks,My e-mail Quickoffice,Settings,SIM Toolkit Video editor,Voice recorder Out of these how many applications are available in Android OS and will be loaded when Android OS is installed in a mobile? Please do help me on this... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Andorid OS on Mobile Chipset?
Hi, I would like to know how to install the Android OS on mobile device? Is there any procedure? Can any one guide me on that please? Srini -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 force App Widget in portrait mode???
Hi all, I want to force App Widget in portrait mode, as we force our activity in portrait mode by adding this attribute in Menifest file android:screenOrientation = portrait. is there any way to force App Widget in portrait mode?? Thanks in advance. Gulfam Hassan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 anyone have j2me project plz send to me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Set current tab from a dialog box?
I just found my own solution: passing a parameter into intent to specify which tab screen to display. On Jul 5, 3:45 pm, Jeruliu jeru@gmail.com wrote: Hi all, I have a main TabActivity contains 2 tabs, each tab is an activity. By default the TabActivity will display the content of the first tab. From the second tab, a edit form will be pop up as dialog box. Now in this dialog box, once i click the save button, i would like to 1. close the dialog 2. navigate back to the TabActivity 3. set current tab to the second tab My problem is i can't get the reference of TabActivity to call setCurrentTab function from the pop up dialog. I spent a lot of time to google but don't have an answer till now, can someone kindly help me on this? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Oriented Overlay
Hello, I'm trying to make my USER POSITION overlay to rotate according to the orientation. Here is the method that calls for the overlay: protected void createAndShowUserOverlay(Location newLocation) { ListOverlay useroverlays = mapView.getOverlays(); // first remove old overlay if (useroverlays.size() 0) { for (Iterator iterator = useroverlays.iterator(); iterator.hasNext();) { iterator.next(); iterator.remove(); } } // transform the location to a geoPoint GeoPoint geopoint = new GeoPoint((int) (newLocation.getLatitude() * 1E6), (int) (newLocation.getLongitude() * 1E6)); float bear = newLocation.getBearing(); // initialize icon Drawable icon = getResources().getDrawable(R.drawable.user2); icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); // create my overlay and show it userOverlay useroverlay = new userOverlay(icon); OverlayItem item = new OverlayItem(geopoint, I'm here, null); useroverlay.addItem(item); mapView.getOverlays().add(useroverlay); mc.animateTo(geopoint); mapView.postInvalidate(); } And here is the draw method on the userOverlay class: @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { super.draw(canvas, mapView, false); boundCenter(marker); } I want to implement this matrix to make the marker rotate, but I don't know where or how to place it, in order to make the marker rotate depending on the ''ori'' value, which I'll implement after: Paint paint = new Paint(); Point pt = new Point(); mapView.getProjection().toPixels(p, pt); Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.pointer); Matrix matrix = new Matrix(); matrix.postTranslate(-25, -25); matrix.postRotate(ori); matrix.postTranslate(pt.x, pt.y); paint.setAntiAlias(true); paint.setFilterBitmap(true); canvas.drawBitmap(bmp, matrix, paint); Any suggestions ? Should I override the draw method on the userOverlay class? Or I have to put this on the main class? I'm mixing 2 or 3 tutorials and I'm not quite sure how to merge them together.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Login form implementation options
Hello, I am trying to implement a login form for an Android application and I am wondering what options are there. So far I've tried this: 1. add non-visible input controls to the main layout, and, when the login form is supposed to appear, I hide the other views and show the login form controls and I handle the events in the main activity class and on submit I switch back 2. show a popup window that coves 90% of the screen and have it load a separate layout file with all the input controls needed. I am having problems getting the onclick events to work and also the soft keyboard goes above a text control and one cannot see what he/she types. So, what other options are there for the implementation of a screen such as a login form? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to set the default download files location
Hi Priyanka, Thanks for the information.. Now i can able to create and write into the files.. in the same way can i use this iText to copy the documents like (.doc,.docx,.ppt)also?? On Jul 4, 11:06 am, priyanka 2priya...@gmail.com wrote: Hello, There is a library called iText which helps create pdf docs in Java. I read old posts from the author of iText regarding compiling this library for Android - not sure what the current status is. You can find some info about iText here :http://viralpatel.net/blogs/2009/04/generate-pdf-file-in-java-using-i... If your requirement for PDF in Android is urgent, you may think of compiling iText for Android yourself - depending on whether the license terms allow it. Hope this helps. Regards, Priyanka On Jul 4, 9:45 am, uday uday.pic...@gmail.com wrote: Files downloaded from browser by default they are stored under sdcard/ downloads folder.. 1) Is it possible to create the .pdf files using client program in android device and how to write the .pdf file content from server into the local files 2) is it the better way to store any pdf files into the device's internal memory if the internal memory is high??? On Jul 2, 9:35 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jul 2, 2010 at 8:50 AM, uday uday.pic...@gmail.com wrote: From my application i can able to download the files from the internet. but the files are downloaded to sdcard/downloads directory by default. Is it possible to change this location so that user can give the path to save the file?? Is it possible to save the files in internal memory??? Don't use the Browser for the download. Handle the download yourself, and you can store it wherever you can write to. If you use the Browser for the download, it will download where the Browser wants to, not where you want it to. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 set the default download files location
Hi Priyanka, Thanks for the information.. Now i can able to create and write into the files.. in the same way can i use this iText to copy the documents like (.doc,.docx,.ppt)also?? On Jul 4, 11:06 am, priyanka 2priya...@gmail.com wrote: Hello, There is a library called iText which helps create pdf docs in Java. I read old posts from the author of iText regarding compiling this library for Android - not sure what the current status is. You can find some info about iText here :http://viralpatel.net/blogs/2009/04/generate-pdf-file-in-java-using-i... If your requirement for PDF in Android is urgent, you may think of compiling iText for Android yourself - depending on whether the license terms allow it. Hope this helps. Regards, Priyanka On Jul 4, 9:45 am, uday uday.pic...@gmail.com wrote: Files downloaded from browser by default they are stored under sdcard/ downloads folder.. 1) Is it possible to create the .pdf files using client program in android device and how to write the .pdf file content from server into the local files 2) is it the better way to store any pdf files into the device's internal memory if the internal memory is high??? On Jul 2, 9:35 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jul 2, 2010 at 8:50 AM, uday uday.pic...@gmail.com wrote: From my application i can able to download the files from the internet. but the files are downloaded to sdcard/downloads directory by default. Is it possible to change this location so that user can give the path to save the file?? Is it possible to save the files in internal memory??? Don't use the Browser for the download. Handle the download yourself, and you can store it wherever you can write to. If you use the Browser for the download, it will download where the Browser wants to, not where you want it to. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 set the default download files location
Hi Priyanka, Thanks for the information.. Now i can able to create and write into the files.. in the same way can i use this iText to copy the documents like (.doc,.docx,.ppt)also?? On Jul 4, 11:06 am, priyanka 2priya...@gmail.com wrote: Hello, There is a library called iText which helps create pdf docs in Java. I read old posts from the author of iText regarding compiling this library for Android - not sure what the current status is. You can find some info about iText here :http://viralpatel.net/blogs/2009/04/generate-pdf-file-in-java-using-i... If your requirement for PDF in Android is urgent, you may think of compiling iText for Android yourself - depending on whether the license terms allow it. Hope this helps. Regards, Priyanka On Jul 4, 9:45 am, uday uday.pic...@gmail.com wrote: Files downloaded from browser by default they are stored under sdcard/ downloads folder.. 1) Is it possible to create the .pdf files using client program in android device and how to write the .pdf file content from server into the local files 2) is it the better way to store any pdf files into the device's internal memory if the internal memory is high??? On Jul 2, 9:35 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jul 2, 2010 at 8:50 AM, uday uday.pic...@gmail.com wrote: From my application i can able to download the files from the internet. but the files are downloaded to sdcard/downloads directory by default. Is it possible to change this location so that user can give the path to save the file?? Is it possible to save the files in internal memory??? Don't use the Browser for the download. Handle the download yourself, and you can store it wherever you can write to. If you use the Browser for the download, it will download where the Browser wants to, not where you want it to. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Not Visible On Donut
BTW, I'm not specifying screen size or features in the manifest. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Help on Audio Flinger
Hello , I have following task to do in platform . Can you help me out which layer to look and how to proceed ? 1. Adding a new audio source or way to input audio . 2 . How to enable audio stack to redirect output to multiple way like , moving audio output to speakers as well as headset ? Does anyone have PDF for that ? Thanks : Uander -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Login form implementation options
Have you considered a custom dialog? http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog On Mon, Jul 5, 2010 at 7:53 PM, Tudor Tihan tudorti...@gmail.com wrote: Hello, I am trying to implement a login form for an Android application and I am wondering what options are there. So far I've tried this: 1. add non-visible input controls to the main layout, and, when the login form is supposed to appear, I hide the other views and show the login form controls and I handle the events in the main activity class and on submit I switch back 2. show a popup window that coves 90% of the screen and have it load a separate layout file with all the input controls needed. I am having problems getting the onclick events to work and also the soft keyboard goes above a text control and one cannot see what he/she types. So, what other options are there for the implementation of a screen such as a login form? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Default shared preferences consistency check
On Mon, Jul 5, 2010 at 4:04 AM, Federico Paolinelli fedep...@gmail.com wrote: However, is there another way to do this? Am I missing something? You can create a custom preference, perhaps subclassing an existing one, and implement your business logic there. See here for a custom View that I wrapped into a ColorPreference: http://github.com/commonsguy/cwac-colormixer -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to force App Widget in portrait mode???
On Mon, Jul 5, 2010 at 5:13 AM, Gulfam gulfa...@gmail.com wrote: I want to force App Widget in portrait mode, as we force our activity in portrait mode by adding this attribute in Menifest file android:screenOrientation = portrait. is there any way to force App Widget in portrait mode?? Not that I am aware of, sorry. Bear in mind that not all home screen implementations change orientation. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Default shared preferences consistency check
Thanks. Federico On Mon, Jul 5, 2010 at 12:55 PM, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 4:04 AM, Federico Paolinelli fedep...@gmail.com wrote: However, is there another way to do this? Am I missing something? You can create a custom preference, perhaps subclassing an existing one, and implement your business logic there. See here for a custom View that I wrapped into a ColorPreference: http://github.com/commonsguy/cwac-colormixer -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Federico -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Using contacts
I have an issue regarding the use of contacts in my Android application. I currently do the following: Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT); which allows me to pick a contact. 2 Questions: - How do I limit this to only contacts with a mobile number - Why does the intent not honour the way I have set up my contacts on the phone itself? I have set up the contacts so it will not use gmail and facebook ones, just phone ones however using the Intent I see them all Lieuwe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: User comments available in the developer console!
In my experience, when a user has left a negative comment AND emailed me, then after a (polite :) ) response from me, they have usually updated their original comment to be positive. Ok, you could argue that the fact they have followed up their comment with an email means they are different from those Doesn't work. Uninstalled users, but still I think it would result in a significant number of comment corrections. On Jul 3, 9:12 am, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: I'm of the opinion that those users who leave negative and incorrect feedback are a lost cause. What the comments we as developers leave are there for new users so they aren't confused by those incorrect negative words. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: User comments available in the developer console!
In my experience, when a user has left a negative comment AND emailed me, Unfortunately, that and is a big if ... -- Kostya 05.07.2010 15:36, Mark Carter пишет: In my experience, when a user has left a negative comment AND emailed me, then after a (polite :) ) response from me, they have usually updated their original comment to be positive. Ok, you could argue that the fact they have followed up their comment with an email means they are different from those Doesn't work. Uninstalled users, but still I think it would result in a significant number of comment corrections. On Jul 3, 9:12 am, Maps.Huge.Info (Maps API Guru)cor...@gmail.com wrote: I'm of the opinion that those users who leave negative and incorrect feedback are a lost cause. What the comments we as developers leave are there for new users so they aren't confused by those incorrect negative words. -John Coryat -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: User comments available in the developer console!
Precisely, but it indicates that if the user did receive feedback from the dev, there is a reasonable chance they may change their comment. On 5 July 2010 13:45, Kostya Vasilyev kmans...@gmail.com wrote: In my experience, when a user has left a negative comment AND emailed me, Unfortunately, that and is a big if ... -- Kostya 05.07.2010 15:36, Mark Carter пишет: In my experience, when a user has left a negative comment AND emailed me, then after a (polite :) ) response from me, they have usually updated their original comment to be positive. Ok, you could argue that the fact they have followed up their comment with an email means they are different from those Doesn't work. Uninstalled users, but still I think it would result in a significant number of comment corrections. On Jul 3, 9:12 am, Maps.Huge.Info (Maps API Guru)cor...@gmail.com wrote: I'm of the opinion that those users who leave negative and incorrect feedback are a lost cause. What the comments we as developers leave are there for new users so they aren't confused by those incorrect negative words. -John Coryat -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: User comments available in the developer console!
Mark, Exactly. I believe this shows that a way to reply to user comments is needed. -- Kostya 05.07.2010 15:58, Mark Carter пишет: Precisely, but it indicates that if the user did receive feedback from the dev, there is a reasonable chance they may change their comment. On 5 July 2010 13:45, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: In my experience, when a user has left a negative comment AND emailed me, Unfortunately, that and is a big if ... -- Kostya 05.07.2010 15:36, Mark Carter пишет: In my experience, when a user has left a negative comment AND emailed me, then after a (polite :) ) response from me, they have usually updated their original comment to be positive. Ok, you could argue that the fact they have followed up their comment with an email means they are different from those Doesn't work. Uninstalled users, but still I think it would result in a significant number of comment corrections. On Jul 3, 9:12 am, Maps.Huge.Info http://Maps.Huge.Info (Maps API Guru)cor...@gmail.com mailto:cor...@gmail.com wrote: I'm of the opinion that those users who leave negative and incorrect feedback are a lost cause. What the comments we as developers leave are there for new users so they aren't confused by those incorrect negative words. -John Coryat -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Login form implementation options
Yes, but I forgot to add it on the list. The problem that I had with this was that I couldn't get the editable controls to focus (text entry didn't work for some reason). On Jul 5, 1:42 pm, paulb pbizan...@gmail.com wrote: Have you considered a custom dialog? http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog On Mon, Jul 5, 2010 at 7:53 PM, Tudor Tihan tudorti...@gmail.com wrote: Hello, I am trying to implement a login form for an Android application and I am wondering what options are there. So far I've tried this: 1. add non-visible input controls to the main layout, and, when the login form is supposed to appear, I hide the other views and show the login form controls and I handle the events in the main activity class and on submit I switch back 2. show a popup window that coves 90% of the screen and have it load a separate layout file with all the input controls needed. I am having problems getting the onclick events to work and also the soft keyboard goes above a text control and one cannot see what he/she types. So, what other options are there for the implementation of a screen such as a login form? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Deploy App on Google Android G1 Phone
Actually i use the IP used by the LAN to identify my machine. Still have the same issue 2010/7/5 Indicator Veritatis mej1...@yahoo.com Real IP? Which one? The one used by the LAN for identifying your machine, or the one NAT translates it to for the outside world to see the same machine? 10.0.2.2 is in the block reserved for the former, i.e., it is for internal use only: if you are trying to access it from the WiFi on your phone, also inside the LAN, that should work fine, unless your firewall is on super-paranoid settings; but if you are trying to access it over GSM/GPRS/Edge, you need the latter, a public address, AND you need to sure your server is accessible from outside your NAT and firewall. Can you access your server from another machine outside your LAN? I assume you can access it from inside, but thanks to NAT, you should not expect that to work with the same IP address: it is common not to be able to see external addresses from inside. http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch01_:_Why_Host_Your_Own_Site%3F#Our_Network goes into considerable detail, including references, on all the issues surrounding the basic problem you are trying to solve: providing your own webserver in your small home/office net (LAN), and making it publicly accessible. On Jul 3, 8:27 am, Lamia Hannoun lamia.hann...@gmail.com wrote: Hi ! Actually i've already tried to use the real IP of my machine but it didn't work, and yes my my LAN is behind NAT. Do u have any idea? Thx 2010/7/2 HeHe cnm...@gmail.com is your LAN is behind nat? On Jul 2, 7:22 am, Lamia Hannoun lamia.hann...@gmail.com wrote: Hi ! I actually want to deploy my app on a real phone after deploying it on a an emulator.the problem is that i access to a web service (.net) hosted on my machine , i used the address 10.0.2.2 to test it on emulator and everythg went well, when i install my app on my htc i couldn't access to my web service, i tried to change the address by using a real machine IP connected to a LAN but it didn't work!!! Do u have any ideas to solve that issue. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] File read and write.
It really helpful. Thank you for reply all question that i asked. On Sat, Jul 3, 2010 at 3:31 PM, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 3, 2010 at 12:40 AM, choi devmc...@gmail.com wrote: Today, i tried to read and write file on the android. but it seems that file write mode is only provided for SD card? With the WRITE_EXTERNAL_STORAGE permission, you can write to the SD card. most of article is asked about SD card written. Is there no way to save data internal side? You can call getFilesDir() from your Activity or Service to get a directory in the on-board flash that you can read and write to. So when i install the application to real device. then its application installed in SD card or internal space? For Android 2.1 and earlier, it is installed in internal space. For Android 2.2 and beyond, you have the option of allowing the user to install it on the SD card or internal space. So, how do we write the file to SD card and specified the absolute path where we saved? to load this file. Use Java file I/O. Use Environment.getExternalStorageDirectory() to get a File object pointing to the root of the SD card. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Whether to use a Service or Thread for Http Connection?
Hi Android experts please reply about the pros and cons of using both thread as well as Service for http connection On Jul 5, 10:04 am, sagare sagar.ekb...@gmail.com wrote: Hi All, I am a newbie in android and i had a question whether i should use a service or thread for http connection and what will be the advantage of using a service over a thread or viceversa. Please help me out with this. Thanks, Sagar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] OpenGL strange Exception: Nexus one upgrade to 2.2 causes app to crash?
Hey Guys, I've made some edits to my application but I'm pretty sure it crashing is linked to my updating my Nexus One. I've included the error as well as all code I think is relevant. Anyone got any ideas? 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): FATAL EXCEPTION: GLThread 11 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): java.lang.IllegalArgumentException: No config chosen 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): at android.opengl.GLSurfaceView $BaseConfigChooser.chooseConfig(GLSurfaceView.java:771) 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916) 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java: 1246) 07-05 12:07:04.292: ERROR/AndroidRuntime(5751): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116) public class GLCamTest extends Activity { private CamLayer mPreview; private GLLayer glView; static int counter=0; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); counter++; } /** Called when the activity is first created. */ @Override public void onResume() { super.onResume(); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); final Window win = getWindow(); win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // Hide the window title. requestWindowFeature(Window.FEATURE_NO_TITLE); glView=new GLLayer(this); mPreview = new CamLayer(this, glView); setContentView(glView); addContentView(mPreview, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); } protected void onPause() { super.onPause(); if (counter=2) { System.exit(0); } } } public class GLLayer extends GLSurfaceView implements SurfaceHolder.Callback, Camera.PreviewCallback, Renderer { int onDrawFrameCounter=1; int[] cameraTexture; byte[] glCameraFrame=new byte[256*256]; //size of a texture must be a power of 2 FloatBuffer cubeBuff; FloatBuffer texBuff; public GLLayer(Context c) { super(c); this.setEGLConfigChooser(5, 6, 5, 8, 16, 0); this.setRenderer(this); this.getHolder().setFormat(PixelFormat.TRANSLUCENT); } public void onDrawFrame(GL10 gl) { onDrawFrameCounter++; gl.glEnable(GL10.GL_TEXTURE_2D); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); bindCameraTexture(gl); gl.glLoadIdentity(); GLU.gluLookAt(gl, 0, 0, 4.2f, 0, 0, 0, 0, 1, 0); gl.glRotatef(onDrawFrameCounter,1,0,0); //Rotate the camera image gl.glRotatef((float)Math.sin(onDrawFrameCounter/ 20.0f)*40,0,1,0); //Rotate the camera image gl.glRotatef((float)Math.cos(onDrawFrameCounter/ 40.0f)*40,0,0,1); //Rotate the camera image gl.glNormal3f(0,0,1); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 4, 4); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 8, 4); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP,12, 4); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP,16, 4); gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP,20, 4); } public void onSurfaceChanged(GL10 gl, int width, int height) { gl.glViewport(0, 0, width, height); float ratio = (float) width / height; gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); GLU.gluLookAt(gl, 0, 0, 4.2f, 0, 0, 0, 0, 1, 0); } public void onSurfaceCreated(GL10 gl, EGLConfig config) { gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST); gl.glClearColor(0, 0, 0, 0); gl.glEnable(GL10.GL_CULL_FACE); gl.glShadeModel(GL10.GL_SMOOTH); gl.glEnable(GL10.GL_DEPTH_TEST); cubeBuff = makeFloatBuffer(camObjCoord); texBuff = makeFloatBuffer(camTexCoords); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, cubeBuff); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texBuff); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); } /** * Generates a texture from the black and white array filled by the onPreviewFrame * method. */ void
[android-developers] Water ripple effect
hi friends, i am trying to create a ripple effect one similar to water live wallpaper in nexus one.please give me direction to acheive it. Thanks and regards :) Mansoor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Whether to use a Service or Thread for Http Connection?
The consensus seems to be AsyncTask, try that. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: rtsp client?
Hi, I am trying to stream media containing mpeg4 video and AAC audio over RTSP using ffserver. When I try to connect to the server using VLC player I get the message: Your input can't be opened: VLC is unable to open the MRL 'rtsp:// 192.168.1.122:5454/test1.mp4'. Check the log for details. Terminal running FFserver shows following [OPTIONS] rtsp://192.168.1.122:5454 RTSP/1.0 200 85 - - PLAY test1.mp4/streamid=0 RTP/UDP [TEARDOWN] rtsp://192.168.1.122:5454/test1.mp4/ RTSP/1.0 200 792 [OPTIONS] rtsp://192.168.1.122:5454 RTSP/1.0 200 85 I did a packet capture, and I see that, in response to the PLAY request the FFServer returns following: RTSP/1.0 454 Session Not Found.. CSeq: 11..Date: Mon Jul 5 17:12:54 2010 GMT I don't know what I am doing wrong. Could you please share some ideas? Andy, Could you please share your ffserver configuration that you used to RTSP stream to Android? ffmpeg: == ./ffmpeg -i ~/Media/fileSequence0.mp4 -s 160x128 -r 15 -flags +global_header -ac 2 -ar 48000 -vglobal 2 -acodec copy -vcodec copy http://127.0.0.1:8090/feed1.ffm FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers built on Jul 2 2010 17:43:50 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4) configuration: libavutil 50.15. 1 / 50.15. 1 libavcodec52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.11. 0 / 0.11. 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x8ac1420]multiple edit list entries, a/v desync might occur, patch welcome Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/yadnesh/Media/ fileSequence0.mp4': Metadata: major_brand : isom minor_version : 0 compatible_brands: mp41 encoder : vlc 1.0.1 stream output encoder-eng : vlc 1.0.1 stream output Duration: 00:00:09.80, start: 0.00, bitrate: 456 kb/s Stream #0.0(eng): Audio: aac, 44100 Hz, mono, s16, 18 kb/s Stream #0.1(eng): Video: mpeg4, yuv420p, 192x144 [PAR 3:4 DAR 1:1], 432 kb/s, 14.99 fps, 25 tbr, 1001 tbn, 25 tbc Output #0, ffm, to 'http://127.0.0.1:8090/feed1.ffm': Metadata: encoder : Lavf52.64.2 Stream #0.0(eng): Video: mpeg4, yuv420p, 192x144, q=2-31, 432 kb/ s, 1000k tbn, 25 tbc Stream mapping: Stream #0.1 - #0.0 Press [q] to stop encoding frame= 147 fps= 0 q=-1.0 Lsize= 528kB time=9.78 bitrate= 442.2kbits/s video:518kB audio:0kB global headers:0kB muxing overhead 1.887475% == FFmpeg does not show Audio output. And also no error/warning about it. Do you see any reason? ffserver config: == Stream test1.mp4 Feed feed1.ffm Format rtp VideoFrameRate 15 VideoCodec mpeg4 VideoSize qvga VideoBitRate 256 VideoBufferSize 4 VideoGopSize 12 #AudioCodec aac NoAudio AudioBitRate 8 AudioChannels 1 /Stream == Regards, Yadnesh On Jun 29, 6:10 am, Andy Savage a...@bluewire.net.nz wrote: With certain types of well formed RTSP streams the mediaplayer class can play it directly. http://m.youtube.comis a great example of some well formed feeds, but most RTSP feeds from the net seem to work fine. I've also managed to get ffserver streaming fine to it using H.264. On Mon, Jun 28, 2010 at 7:28 PM, MobDev developm...@mobilaria.com wrote: afaik you can directly feed that trsp url to the MediaPlayer class... On 28 jun, 12:33, chas__123 charlie.nug...@gmail.com wrote: Hi could someone say if android supports an RTSP stack? We've an RTSP server that we'd like to stream video to an android rtsp client if thats possible thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App Not Visible On Donut
For anyone needing an answer, apps aren't visible to Donut or Cupcake if they specify BLUETOOTH or BLUETOOTH_ADMIN it seems... great... Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ProximityAlert Exists
Hello, Is there a way to find out whether a proximityAlert exists? I am allowing the user to add proximityAlerts to be activated sometime in the future based on alarms. However, the user can change her mind and remove a proximityAlert. Before removing a proximityAlert I need to find out whether the corresponding alarm has gone off and whether the proximityAlert exists. How do I know if a proximityAlert exists? Thanks, Prasanna -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Accurate sleep()\timer in Android
Hello, Does anyone know of a precise way of measuring 80 milliseconds for scheduling purposes? Thread.sleep() and SystemClock.sleep() don't seem accurate enough. Purpose - I want to schedule a certain event to happen in an exact interval of 80 milliseconds and I don't want the time to skew (scheduling 1000 such events must take 80 seconds in total). 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] intent to launch flash swf files
Hi, I am working on a podcasat player and am looking for a sutable intent to launch and play a downloaded SWF file. I am on 2.2 and have adobe flash player installed. The things i have tried are: This launces the HTC flash player to select a file: ComponentName toLaunch = new ComponentName(com.htc.flash,com.htc.flash.FlashPlayer); Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_MAIN); intent.setComponent(toLaunch); act.startActivity(intent); This should launch the file in the htc flash player - but it doesnt seem to work. the file never plays (I know the file works) File localFile = new File(/sdcard/test.swf); url = Uri.fromFile(localFile).toString(); ComponentName toLaunch = new ComponentName(com.htc.flash,com.htc.flash.FlashPlayer); Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url), flash/*); intent.putExtra(play, file.path); intent.setComponent(toLaunch); act.startActivity(intent); i put the file on the network server and i get this line in the log file, the file plays ok in the browser: action=android.intent.action.SEARCH;launchFlags=0x1000;component=com.android.browser/.BrowserActivity;S.query=192.168.1.2%2Ftst.swf;S.user_query=192.168.1.2%2Ftst.swf;end So I am wondering if i can just launch the browser to get it to play - i haven't had any luck yet. File localFile = new File(/sdcard/test.swf); url = Uri.fromFile(localFile).toString(); Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_SEARCH); toLaunch = new ComponentName(com.android.browser,com.android.browser.BrowserActivity); intent.setData(Uri.parse(url)); intent.setComponent(toLaunch); act.startActivity(intent); And i have tried the obvious: File localFile = new File(/sdcard/test.swf); url = Uri.fromFile(localFile).toString(); Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); act.startActivity(intent); Has anyone done it before? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: notification/broadcast for sent sms
Thank you all for your kind responses. I kinda knew about the broadcast for reception, fact is that, I wanted something for sent sms. But, my bad. Anyways, is there a log that is maintained by the android for all incomings and outgoings of sms? I don't mean the inbox content provider! Thanks again. Regards, Saurav Mukherjee. On Mon, Jul 5, 2010 at 12:08 PM, joebowbeer joe.bowb...@gmail.com wrote: Issue 2261 requests this feature: http://code.google.com/p/android/issues/detail?id=2261 Given that the provider is accessible (if permissions are granted), and there is already a change notification and broadcast on reception, I wonder why there isn't a change notification or broadcast when a message is sent. On Jul 4, 10:09 am, Saurav to.saurav.mukher...@gmail.com wrote: Thank you for ur reply! Indeed. Point is i'm not sending the sms. the sms is sent by the user using some other app or the default messaging app. So, basically, my hands are tied. Like the sms_receive broadcast, is there something for sms sent? i just need to know when a sms is sent. On Jul 4, 1:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 4, 2010 at 3:28 AM, Saurav to.saurav.mukher...@gmail.com wrote: Could anyone enlighten me on this subject? Please! Send theSMSwith SmsManager, and then you can register a PendingIntent to be notified when it issent. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Routing Audio to Bluetooth Headset API Level 8
Have you gotten this to work yet? I am interested in this solution too. From what the docs say, if your headset is A2DP, it should just work, but that isnt what I found in practice. Thanks. On Jun 27, 2:34 pm, jwei512 jwei...@gmail.com wrote: Hello! I was wondering if it was possible to route audio files from the phone to a bluetooth headset on versions of Android API Level 7 and under (so versions older than the new Froyo) If so, do you know of any sample code I could look at to figure out how to do this? Or perhaps just point me in the right direction? Thanks! - jwei -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 App Widget in portrait mode???
Hi Mark thanks for your reply, I have developed a home screen widget.its working fine. When i touch items on widget like ImageViews and TextViews its open the main Activity of my application, but when the orientation of phone changes from portrait to landscape, and land scape to portrait, it stops responding to touch events, and NOT opening main Activity of my applicaton. How I Can Resolve this issue? Any Solution??? Regards, Gulfam Hassan On Jul 5, 3:59 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 5:13 AM, Gulfam gulfa...@gmail.com wrote: I want to force App Widget in portrait mode, as we force our activity in portrait mode by adding this attribute in Menifest file android:screenOrientation = portrait. is there any way to force App Widget in portrait mode?? Not that I am aware of, sorry. Bear in mind that not all home screen implementations change orientation. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to force App Widget in portrait mode???
Gulfam, This is kind of non-obvious to get right, although really pretty simple. When home screen orientation is changed (is this a Moto Droid / Milestone, by any chance?) Android uses the most recent RemoveViews object to recreate widgets, since there is no onCreate() equivalent. If the most recent update for your widget only specified a text or image change, and didn't include PendingIntents for clicks, then the widget will stop responding to clicks, or misbehave in other ways. The trick is that each and every RemoteViews has to specify complete widget state - including all the PendingIntents, text item and image item changes, etc... -- Kostya 05.07.2010 19:18, Gulfam пишет: Hi Mark thanks for your reply, I have developed a home screen widget.its working fine. When i touch items on widget like ImageViews and TextViews its open the main Activity of my application, but when the orientation of phone changes from portrait to landscape, and land scape to portrait, it stops responding to touch events, and NOT opening main Activity of my applicaton. How I Can Resolve this issue? Any Solution??? Regards, Gulfam Hassan On Jul 5, 3:59 pm, Mark Murphymmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 5:13 AM, Gulfamgulfa...@gmail.com wrote: I want to force App Widget in portrait mode, as we force our activity in portrait mode by adding this attribute in Menifest file android:screenOrientation = portrait. is there any way to force App Widget in portrait mode?? Not that I am aware of, sorry. Bear in mind that not all home screen implementations change orientation. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to force App Widget in portrait mode???
As a follow-up: I also have some info about this in my blog. http://kmansoft.wordpress.com/2010/05/23/widgets-and-orientation-changes/ 05.07.2010 19:18, Gulfam пишет: Hi Mark thanks for your reply, I have developed a home screen widget.its working fine. When i touch items on widget like ImageViews and TextViews its open the main Activity of my application, but when the orientation of phone changes from portrait to landscape, and land scape to portrait, it stops responding to touch events, and NOT opening main Activity of my applicaton. How I Can Resolve this issue? Any Solution??? Regards, Gulfam Hassan On Jul 5, 3:59 pm, Mark Murphymmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 5:13 AM, Gulfamgulfa...@gmail.com wrote: I want to force App Widget in portrait mode, as we force our activity in portrait mode by adding this attribute in Menifest file android:screenOrientation = portrait. is there any way to force App Widget in portrait mode?? Not that I am aware of, sorry. Bear in mind that not all home screen implementations change orientation. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unable to specify the bucket to Gallery3D
In case anyone is interested on tracking this issue, I opened a new bug report here: http://code.google.com/p/android/issues/detail?id=9436q=gallery3dcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars And found similar requests here: http://code.google.com/p/android/issues/detail?id=7823q=gallery3dcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars http://stackoverflow.com/questions/2238760/android-cooliris-gallery-developer-documentation/ Regards, Diego M. Rosa On Wed, Jun 30, 2010 at 4:24 PM, Diego Moreira Rosa diegomr...@gmail.com wrote: Hi guys, I am using the default photo picker (usually Gallery or CoolIris Gallery3D) to pick an image from my application. The problem is that, when using Gallery3D, the user always needs to choose the album (aka bucket) and then the image, while it would be more intuitive to open directly the album the user was navigating on previously. For instance, let's say the user is working on an image stored into the sdcard. When she decides to choose another image, it is probable that she wants another image from the sdcard. So my question is: is there a way to tell CoolIris Gallery3D to open on a specific bucket? I have taken a look at the source code and couldn't find any. Testing on the emulator with Android 2.2 Google APIs. Here is the skeleton of my test application: public class GalleryTest extends Activity implements OnClickListener { private static final int PICK_REQUEST_CODE = 0; �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); this.findViewById(R.id.pickbutton).setOnClickListener(this); } public void onClick(View v) { this.startActivityForResult(createIntent(), PICK_REQUEST_CODE); } �...@override public void onActivityResult(int requestCode, int resultCode, Intent intent) { if ((resultCode == Activity.RESULT_OK) (requestCode == PICK_REQUEST_CODE)) { Uri imageUri = intent.getData(); if (imageUri != null) { ((TextView) this.findViewById(R.id.photoname)).setText( imageUri.toString()); } } } private static Intent createIntent() { Intent intent = new Intent(Intent.ACTION_PICK); intent.setType(image/*); return intent; } } Thanks in advance, Diego M. Rosa -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: discoverability
On Jun 30, 1:09 pm, TreKing treking...@gmail.com wrote: On Sun, Jun 27, 2010 at 1:50 PM, Lance Nanek lna...@gmail.com wrote: Often it is pretty easy to add a button to your app's screen that opens the menu and also lets users know it is available just by being there, at least. Sure it's easy - and also a major waste of limit screen space for a one-time function. I get your point about some people not realizing functionality is there, but again, it's a one-time learning experience that really doesn't justify a dedicated button or whatever, IMO. The skipping entries in the ADC2 app, for example, was just poorly implemented - that should have been a dedicated button with the frequency in which it was going to be used. Use a quick start dialog on the user's first run to let them know this exists, or Toast messages as Tips as they navigate the screens perhaps. Even with a Toast tip, the user must still remember whether or not the menu exists, which indeed is a trivial task for a single activity but not so trivial when there are a hundred activities. If the presentation of icons that don't do anything is trivially handled by one time learning experiences, perhaps the application launcher should not bother to remove the icons of deleted applications. :*) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] paypal mobile payment allowed?
Paypal recently released a mobile payment library for android. see news at http://www.intomobile.com/2010/05/22/paypals-mobile-payments-library-now-available-for-android-too/ https://www.x.com/community/ppx/xspaces/mobile/mep I recalled that the android market TOS doesn't allow non-google checkout payment solution. has TOS been changed to allow paypal integration?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can I pass my custom object to onSaveInstanceState?
Thanks Mark. Using a database seems a bit overkill in my case. I found that I can pass the state of my object in a Bundle by making it Parcelable. I'll try that out. On Jul 3, 10:32 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 3, 2010 at 1:28 PM, jul juj...@gmail.com wrote: I created a RestaurantList class to hold my data (a list of some Restaurant objects created to get some json data using gson). How can I pass an instance of that class toonSaveInstanceStateto be able to restore my data when needed? You shouldn't pass an instance of that class toonSaveInstanceState(). Your data model is not part of your instance state. If you are trying to deal with orientation changes, return your RestaurantList in onRetainNonConfigurationInstance() and get it back in onCreate() via getLastNonConfigurationInstance(). Otherwise (or perhaps even if orientation is your issue), move that data out of the activity into a database, or in a pinch a Java object mediated by a service (so it will stick around despite activities coming and going). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Question about parcelable object
Hi, I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet data using GSON: restaurantList = gson.fromJson(r, RestaurantList.class); Now, when I want to save the List of Restaurant objects using protected void onSaveInstanceState(Bundle outState) { if (restaurantList != null ) { outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); } super.onSaveInstanceState(outState); } I get an error, I guess because Parcelable data are not written. How should I do it? Do I have to create an array of Parcel objects in my main activity and fill it by calling writeToParcel for each of the Restaurant objects? thanks for any suggestion Julien **RestaurantList class** public class RestaurantList { private ListRestaurant restaurants = new ArrayListRestaurant(); public int getSize() { return restaurants.size(); } public ListRestaurant getRestaurants() { return this.restaurants; } public Restaurant getRestaurant(int i) { return this.restaurants.get(i); } public void setRestaurants(ListRestaurant restaurants) { this.restaurants = restaurants; } public ListString getRestaurantNames() { ListString restaurantNames = new ArrayListString(); for (int i=0; ithis.restaurants.size(); i++) { restaurantNames.add(this.restaurants.get(i).getName()); } return restaurantNames; } } **Restaurant class** public class Restaurant implements Parcelable{ private String name; /* more stuff */ public Restaurant() {} public String getName() { return this.name; } public void setName(String name) { this.name = name; } public void writeToParcel(Parcel out, int flags) { out.writeStringArray(new String[] {this.name, /* more stuff*/}); } public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public Restaurant createFromParcel(Parcel in) { return new Restaurant(in); } public Restaurant[] newArray(int size) { return new Restaurant[size]; } }; private Restaurant(Parcel in) { String[] stringData = new String[6]; in.readStringArray(stringData); this.name = stringData[0]; /* more stuff */ } public int describeContents(){ return 0; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Question about parcelable object
Jul, Parcelable implementation looks good, except for the questionable cast to ArrayListRestaurant, but that shouldn't have any effect. What error are you getting, exactly? -- Kostya 05.07.2010 20:20, jul пишет: Hi, I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet data using GSON: restaurantList = gson.fromJson(r, RestaurantList.class); Now, when I want to save the List of Restaurant objects using protected void onSaveInstanceState(Bundle outState) { if (restaurantList != null ) { outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); } super.onSaveInstanceState(outState); } I get an error, I guess because Parcelable data are not written. How should I do it? Do I have to create an array of Parcel objects in my main activity and fill it by calling writeToParcel for each of the Restaurant objects? thanks for any suggestion Julien **RestaurantList class** public class RestaurantList { private ListRestaurant restaurants = new ArrayListRestaurant(); public int getSize() { return restaurants.size(); } public ListRestaurant getRestaurants() { return this.restaurants; } public Restaurant getRestaurant(int i) { return this.restaurants.get(i); } public void setRestaurants(ListRestaurant restaurants) { this.restaurants = restaurants; } public ListString getRestaurantNames() { ListString restaurantNames = new ArrayListString(); for (int i=0; ithis.restaurants.size(); i++) { restaurantNames.add(this.restaurants.get(i).getName()); } return restaurantNames; } } **Restaurant class** public class Restaurant implements Parcelable{ private String name; /* more stuff */ public Restaurant() {} public String getName() { return this.name; } public void setName(String name) { this.name = name; } public void writeToParcel(Parcel out, int flags) { out.writeStringArray(new String[] {this.name, /* more stuff*/}); } public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public Restaurant createFromParcel(Parcel in) { return new Restaurant(in); } public Restaurant[] newArray(int size) { return new Restaurant[size]; } }; private Restaurant(Parcel in) { String[] stringData = new String[6]; in.readStringArray(stringData); this.name = stringData[0]; /* more stuff */ } public int describeContents(){ return 0; } } -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: save photo problem- probably HTC problem ??
Hi vandzi. Im having the exact same problem. Did you ever find a solution for this problem? I've tried the code with emulator and nexus one (which is HTC) and it works fine. Thanks for your time -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ViewSwitcher with AsyncTask
I have an activity that needs to do some stuff in the background. When the background is done, I want it to load a new activity. I can successfully kick off the async task and using using ViewSwitcher I can show a nice progress dialog. However, when the user hit 'back' or 'close' from the new task, I want them to see the main screen of this task again. So, I use the showPrevious() after I start the new Activity, but I see the screen switch from the loading window back to the main window BEFORE the new Acitivity is launched. How do I get it to switch after the new activity, or when they come back from the new activity? I tried onRestart() and onResume() but both of them seem to give me a view of -1 that I couldn't do much with. public class XXXActivity extends Activity implements OnClickListener { private ViewSwitcher views = null; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); views = new ViewSwitcher(this); View homeView = View.inflate(this, R.layout.home, null); views.addView(homeView); views.addView(View.inflate(this, R.layout.loading, null)); setContentView(views); final Button xButton = (Button) homeView.findViewById(R.id.button_x); xButton.setOnClickListener(this); } @Override public void onClick(View v) { switch(v.getId()) { case R.id.button_x: MyAsyncTask mTask = new MyAsyncTask(this); views.showNext(); mTask.execute(); break; } } private class MyAsyncTask extends AsyncTaskString, Integer, Boolean { XXXActivity parent; public CheckScannedCouponTask( XXXActivity x ) { parent = x; } @SuppressWarnings(unchecked) @Override protected Boolean doInBackground(String... params) { // do lots of background stuff here return true; } @Override protected void onProgressUpdate(Integer... progress) { // update some progress here } @Override protected void onPostExecute(Boolean b) { Intent intent = new Intent(parent, AnotherActivity.class); parent.startActivity(intent); parent.views.showPrevious(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Accurate sleep()\timer in Android
Android is not a realtime OS (it gives no guarentees about when events will happen). Plus there is the ever present garbage collector. What I am try to say is I think you have no chance - sorry. /Richard On Jul 5, 3:30 pm, Omer Gilad omer.gi...@gmail.com wrote: Hello, Does anyone know of a precise way of measuring 80 milliseconds for scheduling purposes? Thread.sleep() and SystemClock.sleep() don't seem accurate enough. Purpose - I want to schedule a certain event to happen in an exact interval of 80 milliseconds and I don't want the time to skew (scheduling 1000 such events must take 80 seconds in total). 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] Emoji Support
Hi all, Does anybody know about Emoji support for Android? http://en.wikipedia.org/wiki/Emoji We are going to port an iPhone application to Android, and this application supports emojicons. For iPhone, the user needs to install a keyboard app in order to be able to send emojicons, but even without this keyboard, an iPhone is able to display emoji. Cheers -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to make a imageview at right of linearlayout
Hi Give layout_width=wrap_content for ImageView Thanks Neil On Mon, Jul 5, 2010 at 2:25 AM, cindy ypu01...@yahoo.com wrote: Hi All, In the linearlayout, I need to put the image at right. I have tried a lot of method, none of them works. Can someone point out what is wrong? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:id=@+id/logo_block android:padding=10px android:layout_height=wrap_content ImageView android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=right android:layout_alignParentRight=true android:src=@drawable/logo_poweredby/ /LinearLayout Thanks! Cindy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Emoji Support
On Mon, Jul 5, 2010 at 1:07 PM, fr4gus fggar...@gmail.com wrote: Does anybody know about Emoji support for Android? http://en.wikipedia.org/wiki/Emoji AFAIK, these icons are not built into Android, if that is what you mean. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Layout Params classcastexception
Hi all. I have a ListView created programmatically and each view is a TableLayout. I am trying to get the Tables to expand to 100% of the list view, but it does not matter what type of layout params I set on the TableLayout I get a ClassCastException every time. Ie, I've tried TableLayout.LayoutParams, LinearLayout.LayoutParams, FrameLayout.LayoutParams, etc, all of them. Any advice on what I'm doing wrong ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout Params classcastexception
On Mon, Jul 5, 2010 at 1:14 PM, samspade79 samspad...@gmail.com wrote: I have a ListView created programmatically and each view is a TableLayout. I am trying to get the Tables to expand to 100% of the list view, but it does not matter what type of layout params I set on the TableLayout I get a ClassCastException every time. Ie, I've tried TableLayout.LayoutParams, LinearLayout.LayoutParams, FrameLayout.LayoutParams, etc, all of them. Any advice on what I'm doing wrong ? Treat it as an object temporarily. Use your debugger or android.util.Log to dump out what class it really is. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout Params classcastexception
Not sure what you mean by what class it really is? I'm instantiating it directly in code so I know what class it is (or at least I think I do?) On Jul 5, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 1:14 PM, samspade79 samspad...@gmail.com wrote: I have a ListView created programmatically and each view is a TableLayout. I am trying to get the Tables to expand to 100% of the list view, but it does not matter what type of layout params I set on the TableLayout I get a ClassCastException every time. Ie, I've tried TableLayout.LayoutParams, LinearLayout.LayoutParams, FrameLayout.LayoutParams, etc, all of them. Any advice on what I'm doing wrong ? Treat it as an object temporarily. Use your debugger or android.util.Log to dump out what class it really is. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout Params classcastexception
I stepped through the debugger anyway. The type is TableLayout $LayoutParams as expected and as soon as I pass this into the setLayoutParams call it explodes. This happens regardless of whatever type of LayoutParams I use - and I've tried them all. On Jul 5, 12:23 pm, samspade79 samspad...@gmail.com wrote: Not sure what you mean by what class it really is? I'm instantiating it directly in code so I know what class it is (or at least I think I do?) On Jul 5, 12:17 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 1:14 PM, samspade79 samspad...@gmail.com wrote: I have a ListView created programmatically and each view is a TableLayout. I am trying to get the Tables to expand to 100% of the list view, but it does not matter what type of layout params I set on the TableLayout I get a ClassCastException every time. Ie, I've tried TableLayout.LayoutParams, LinearLayout.LayoutParams, FrameLayout.LayoutParams, etc, all of them. Any advice on what I'm doing wrong ? Treat it as an object temporarily. Use your debugger or android.util.Log to dump out what class it really is. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Layout Params classcastexception
On Mon, Jul 5, 2010 at 1:23 PM, samspade79 samspad...@gmail.com wrote: Not sure what you mean by what class it really is? I'm instantiating it directly in code so I know what class it is (or at least I think I do?) Whoops, sorry, misread your post. I thought the ClassCastException was on retrieving the existing LayoutParams, not setting them. You could, however, examine what the existing LayoutParams are, using your debugger or Log. How are you creating your rows? If you are inflating them from layout XML files, be sure to use the inflate(R.layout.whatever, parent, true) call. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Question about parcelable object
Is it the right way to do it? The writeToParcel method of my Restaurant object is never called... The error seems to be in outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); and I get in my LogCat: 07-05 19:34:13.846: WARN/ActivityManager(563): Activity pause timeout for HistoryRecord{436950f8 {org.digitalfarm.atable/ org.digitalfarm.atable.Atable}} 07-05 19:34:28.336: DEBUG/AndroidRuntime(808): Shutting down VM 07-05 19:34:28.336: WARN/dalvikvm(808): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 07-05 19:34:28.336: ERROR/AndroidRuntime(808): Uncaught handler: thread main exiting due to uncaught exception 07-05 19:34:28.637: DEBUG/dalvikvm(808): GC freed 3337 objects / 259288 bytes in 94ms 07-05 19:34:28.647: ERROR/AndroidRuntime(808): java.lang.RuntimeException: Unable to pause activity {org.digitalfarm.atable/org.digitalfarm.atable.Atable}: java.lang.ClassCastException: java.util.LinkedList 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2840) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2797) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java: 2780) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.access$2000(ActivityThread.java:112) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.os.Handler.dispatchMessage(Handler.java:99) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.os.Looper.loop(Looper.java:123) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at java.lang.reflect.Method.invokeNative(Native Method) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at java.lang.reflect.Method.invoke(Method.java:521) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:782) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at dalvik.system.NativeStart.main(Native Method) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by: java.lang.ClassCastException: java.util.LinkedList 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.Activity.performSaveInstanceState(Activity.java:1008) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java: 1256) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2822) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): ... 12 more thanks for your help On Jul 5, 6:31 pm, Kostya Vasilyev kmans...@gmail.com wrote: Jul, Parcelable implementation looks good, except for the questionable cast to ArrayListRestaurant, but that shouldn't have any effect. What error are you getting, exactly? -- Kostya 05.07.2010 20:20, jul пишет: Hi, I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet data using GSON: restaurantList = gson.fromJson(r, RestaurantList.class); Now, when I want to save the List of Restaurant objects using protected void onSaveInstanceState(Bundle outState) { if (restaurantList != null ) { outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); } super.onSaveInstanceState(outState); } I get an error, I guess because Parcelable data are not written. How should I do it? Do I have to create an array of Parcel objects in my main activity and fill it by calling writeToParcel for each of the Restaurant objects? thanks for any suggestion Julien **RestaurantList class** public class RestaurantList { private ListRestaurant restaurants = new ArrayListRestaurant(); public int getSize() { return restaurants.size(); } public ListRestaurant getRestaurants() { return this.restaurants; } public Restaurant getRestaurant(int i) { return this.restaurants.get(i); } public void setRestaurants(ListRestaurant restaurants) {
[android-developers] Re: Avoid non-static inner classes in an activity?
On Jun 21, 11:03 am, Nathan critter...@crittermap.com wrote: True enough. In the case I am using it, I would be happy with an activity context *if* Google Analytics would not hold on to it, causing a huge memory leak and subsequent crashes. Nathan On Jun 21, 10:46 am, Bob Kerns r...@acm.org wrote: I have gotten analytics data with the tracker and the application context. So I will stick with the application context where Google Analytics is concerned. Of course, now I can't run an ActivityUnitTestCase because that application context is not there. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Speech to text not working behind corporate firewall
I've noticed that speech to text only works on cellular or WiFi connections not behind corporate firewalls. I'm guessing it uses non-standard ports of some kind? Anyone else seen this? -Stace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout Params classcastexception
Here is a simple test case that does the same thing. I am trying to get the yellow background to stretch the entire row (I can do this by changing my design, but I need/want the list inside a linear layout, and I need each view of the list to be a table). If you run this you will get a ClassCast public class Test extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout layout = new LinearLayout(this); ListView list = new ListView(this); list.setBackgroundColor(Color.GREEN); list.setAdapter(new TestAdaptor(new String[] { kronenburg, san miguel, sam adams })); layout.addView(list); setContentView(layout); } } class TestAdaptor extends BaseAdapter { private final String[] strings; public TestAdaptor(String[] strings) { this.strings = strings; } public int getCount() { return strings.length; } public Object getItem(int position) { return strings[position]; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { TableLayout table = new TableLayout(parent.getContext()); table.setBackgroundColor(Color.RED); table.setLayoutParams(new TableLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT)); TableRow row = new TableRow(parent.getContext()); row.setBackgroundColor(Color.YELLOW); table.addView(row); TextView textView = new TextView(parent.getContext()); textView.setText((String) getItem(position)); row.addView(textView); return table; } } On Jul 5, 12:32 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 1:23 PM, samspade79 samspad...@gmail.com wrote: Not sure what you mean by what class it really is? I'm instantiating it directly in code so I know what class it is (or at least I think I do?) Whoops, sorry, misread your post. I thought the ClassCastException was on retrieving the existing LayoutParams, not setting them. You could, however, examine what the existing LayoutParams are, using your debugger or Log. How are you creating your rows? If you are inflating them from layout XML files, be sure to use the inflate(R.layout.whatever, parent, true) call. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Speech to text not working behind corporate firewall
Not sure if this helps, but I noticed that if my nexus one doesnt have a wifi/data signal, speech to text does not work. Only when a connection is present does it work. Eddie On Jul 5, 10:59 am, Connick oconn...@gmail.com wrote: I've noticed that speech to text only works on cellular or WiFi connections not behind corporate firewalls. I'm guessing it uses non-standard ports of some kind? Anyone else seen this? -Stace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Speech to text not working behind corporate firewall
Yeah, it needs to reach google ...only prob is if you have a connection but it's wifi behind a firewall, you're out of luck. (at least in our case) Not great for enterprise. :( On Mon, Jul 5, 2010 at 2:30 PM, EdKawas ed.ka...@gmail.com wrote: Not sure if this helps, but I noticed that if my nexus one doesnt have a wifi/data signal, speech to text does not work. Only when a connection is present does it work. Eddie On Jul 5, 10:59 am, Connick oconn...@gmail.com wrote: I've noticed that speech to text only works on cellular or WiFi connections not behind corporate firewalls. I'm guessing it uses non-standard ports of some kind? Anyone else seen this? -Stace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best practice to pass persistent objects from an activity to another activity
Why not put it in SharedPreferences? True, you will have to do the serialization by hand, since Android's support for it is so limited (java.io.Serializable for pure Java classes only), but unless you have a complicated object, that should pose no problem (if you do have a complex object, consider XML with JSON instead of binary serialization). When I say serialization by hand, what I mean is that you must break the object down into String, Int, Float and Boolean yourself, so that you can use SharedPreferences.getBoolean() etc. http://developer.android.com/guide/topics/data/data-storage.html#pref has sample code for this, as well as a discussion of other options. But this option is most likely good enough. On Jul 4, 5:34 am, Thomas Frick frick...@gmail.com wrote: Dear All, I have two activities. Activity A creates an object and stores some data in this object. After that, activity B ist started. In activity B I have to use the object created in activity A. What is the best way to pass the object from activity A to B? I think it is not possible to store an object in the SharedPreferences, isn't it? Is it a good way to call the object in activity A directly from activity B? Thanks for your help. Thomas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Speech to text not working behind corporate firewall
I'm wondering if it's because it's waiting for a return intent (async process) from the server? Google follks? :) On Mon, Jul 5, 2010 at 2:39 PM, Connick oconn...@gmail.com wrote: Yeah, it needs to reach google ...only prob is if you have a connection but it's wifi behind a firewall, you're out of luck. (at least in our case) Not great for enterprise. :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Best practice to pass persistent objects from an activity to another activity
It depends very much on the object you want to pass and how its going to be used. I've used a number of different techniques in my applications, and each one is best suited to different situations. -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com twitter: tomgibara On 4 July 2010 13:34, Thomas Frick frick...@gmail.com wrote: Dear All, I have two activities. Activity A creates an object and stores some data in this object. After that, activity B ist started. In activity B I have to use the object created in activity A. What is the best way to pass the object from activity A to B? I think it is not possible to store an object in the SharedPreferences, isn't it? Is it a good way to call the object in activity A directly from activity B? Thanks for your help. Thomas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Resource Alias not resolving
Ah, but that has always been the excuse; it may even become your project's Swan Song;) I'm trying to design an app that not only functions well, but looks better than everything else out there was the excuse for ignoring the distinction between physical and logical tags in HTML, too. And ever since. Yet I have never seen an app where it was worth the costs Dianne has already warned of. You already alluded to how iPhone apps get away with this: they don't HAVE to run on a wide variety of hardware. On Jul 4, 8:16 pm, Stephen Lebed srle...@gmail.com wrote: Thanks Dianne, I really do take what you say to heart. I would love to abandon fixed graphics sizes and work with scalable graphics. The problem is that I'm trying to design an app that not only functions well, but looks better than everything else out there. It seems like it would be easier to create stunning looking graphics for the iPhone because you know exactly the spec to design your graphics for. I want to create apps that have a polished, high end look to them for Android. For me, that means rendering my interface in a 3d graphics environment (even if the end result is just a 2d display). I would attach a screen shot, but I don't know how in this forum. I realize I am fighting the way the platform is intended to be used. My scenario is that I'm writing a utility that has graphics that cover a 320x480 display and a 480x720 display using a surfaceview. I have a layout under the surfaceview that positions buttons based on the size and density of the display. My graphic has drawn buttons and needs to overlay the actual buttons from the layout. That is the reason why I'm struggling with resolutions and densities. I've taken your advice and wrote a new routine to manually load the images I need based on the screen size of the device. I've actually made it a generalized routine, so adding support for future unknown displays will be trivial. Thanks again for all your hard work and taking time out on this holiday to help me out. Hopefully I have a chance to meet with you at a future I/O conference. Best, Stephen Lebed On Jul 4, 6:19 pm, Dianne Hackborn hack...@android.com wrote: Okay let me put it this way... what you are trying to do is not how things are intended to work, because it results in applications that are very tied to specific screen resolutions and are likely to not behave well when encountering new kinds of screens that they didn't anticipate. So I strongly recommend not going down this route, and instead using another approach. However, if this is REALLY what you want to do... then you need to take control, and decide exactly what you want to have happen yourself. That is, stick all of your possible graphics in drawable-nodpi, and at run time look at the space you have on the screen and other information to determine exactly which graphic you want to use for that environment. Definitely don't do things like try to mix physical screen resources, with density resources, with screen size resources. It IS well defined which resource you will end up with given a particular screen (via the resource matching hierarchy described in the docs), but it is likely it won't do exactly what you want. If one were to ask is a large screen resource better than a high density resource? well... it depends. For our purposes we will always match screen size before density since layouts tends to be more fragile than densities (we can after all always scale graphics), but you are going against how the platform thinks about screen sizes so you can't really count on it doing what you want here. That is, screen size and density are two completely orthogonal things, and have no bearing on each other. You are trying to put them together, and fighting with the platform by doing so. And honestly -- just DO NOT use absolute screen size configurations. Those are deprecated for a reason. They will only cause pain. They just do not work for being able to adjust for the kinds of different screens we have. But let me say one more time: with the approach you are taking, there is a good chance you are going to end up having to tweak your app each time a device with a new kind of screen appears. It is going to cause you some trouble. If that is absolutely what you want, then go ahead and take control and do it... just don't be surprised at the consequences. On Sun, Jul 4, 2010 at 4:16 PM, Stephen Lebed srle...@gmail.com wrote: As another test, I removed the drawable-normal-hdpi and drawable-large- mdpi folders and left drawable-480x320 and drawable-800x480. The G1 is displaying correctly, the Droid is using the layout for the G1, using the normal res graphics and scaled them to fill the screen, the Dell Streak is displaying correctly. Stephen On Jul 4, 3:58 pm, Stephen Lebed srle...@gmail.com wrote: I have tried
Re: [android-developers] Re: Avoid non-static inner classes in an activity?
The getApplicationContext() should return return the same Application object as getApplication()... however, they do go through slightly different code-paths (the Activity has its Application handed to it during initialization, while the base Context implementation needs to retrieve it for its package), so there could have been differences in behavior at times. We should probably have a CTS test for this. The main limitation of using an Application context is that it can not do direct UI. Activity represents the application's direct interaction with the user, so knows how to associate a Dialog or other UI element you make with the correct Z ordering in the window manager. The Application object in contrast lives separate from the app's UI flow, so can't properly display its own UI. That said, you can use it to display a toast (which briefly overlays on top of all UI) and of course a notification. Also the resources you get from Application should be as fine as those from Activity. The main thing to watch out for (and this also applies to Activity) is that if a configuration change happens while the application doesn't have an activity displayed, then the resources won't be updated. They will only be updated when the user next returns to the app. This is done so that if you for example rotate while in one app, we don't have to rebuild the resources in every other app when you return to it even if by that point the orientation is back to its previous state. On Mon, Jun 21, 2010 at 10:46 AM, Bob Kerns r...@acm.org wrote: My claim is that it is always incorrect but will usually work. (A bad combination!) I've raised the issue many times, and nobody, from Google or otherwise, has come up with an example of when it is correct to use it. (Unless I missed it, which is possible, but I think the reason is simply there is no reason!) If the Application is really the context you want, then getApplication() will get the right one. But the other problem is that people often are confused about what context they want, and usually the Activity is it. So a much more common source of bugs than using the wrong way to get to the Application context is using the Application context when the Activity context is required. On Jun 20, 7:11 pm, Streets Of Boston flyingdutc...@gmail.com wrote: I hope some Google engineers can way in when and when not to use getApplicationContext(). I use it all the time for getting a context that isn't tied to an activity life-cycle, which - as i am now learning - may be incorrect. On Jun 20, 9:06 pm, Bob Kerns r...@acm.org wrote: You should read the documentation for getApplicationContext(), and not simply believe what the name says. It does NOT, repeat, NOT, return your application. Well, it might, but it might not. Return the context of the single, global Application object of the current process. This generally should only be used if you need a Context whose lifecycle is separate from the current context, that is tied to the lifetime of the process rather than the current component. Read that carefully. I didn't, first time. The application object it returns may not even be associated with your current .apk -- it can be some other .apk with code running in the same process. It does NOT necessarily return the same as Activity.getApplication(). Activity.getApplication() can be useful. I claim Context.getApplicationContext() should absolutely NEVER be called by developers using the SDK. We simply do not have sufficient control over what it returns. It may work today -- and then later, when you introduce another .apk with the same signature and process name, suddenly stop working -- some of the time. This literally happened to me, which is why I'm clear on the point. The object it returns may even have been loaded with a different classloader -- you won't even be able to cast to get access. The page you linked needs to be fixed! Just as various demos needed to be fixed for the same flaw. On Jun 19, 6:04 pm, Nathan critter...@crittermap.com wrote: On Jun 19, 5:45 pm, Mark Murphy mmur...@commonsware.com wrote: Well, as I wrote: A number of GUI-related things fail outright if you use getApplicationContext() instead of an Activity, for example. Off the top of my head, I can't name any specific methods. Resources don't map right, IIRC, and you can't use one for opening a Dialog. It seems like any time I suggest somebody replace getApplicationContext() with this in a StackOverflow answer, it fixes their problem. Frankly, I just avoid getApplicationContext() completely unless I am specifically looking for the Application object. Also, FWIW, Ms. Hackborn has voiced her concerns about Application as a Context in the past. Advice from Google Developers isn't exactly consistent on this point,
Re: [android-developers] Accurate sleep()\timer in Android
You are doomed if you just want to be able to schedule exactly 80ms every time so that you add it all up after 1000 times and you get 80 seconds. At the very least, you should schedule your events so that even if there is some jitter in individual timings they add up correctly -- that is start at the current time, then schedule each next event for a successive 80ms from that base time, regardless of when the previous event actually fired. At this point, then, the only question is how much jitter between events you will find acceptable. As Richard said, some big events can cause a fair amount of jitter, in particular GCs. The platform is designed to avoid thrashing through objects and thus not cause GCs, so if you are likewise careful you may be able to do things so that GCs don't happen enough to be an issue. For perspective: on low-end hardware, a GC can take on the order of 100ms; on higher-end devices like the Droid it is more like 30ms. If that is still not sufficient, you may want to consider dropping down to native code and doing the timing in a separate native thread (which thus won't be paused by GCs). Of course you still won't have 100% accurate 80ms every time because there will still be other processes wanting to run at times, though the jitter will be significantly smaller (as long as your process is not in the background scheduling group). On Mon, Jul 5, 2010 at 7:30 AM, Omer Gilad omer.gi...@gmail.com wrote: Hello, Does anyone know of a precise way of measuring 80 milliseconds for scheduling purposes? Thread.sleep() and SystemClock.sleep() don't seem accurate enough. Purpose - I want to schedule a certain event to happen in an exact interval of 80 milliseconds and I don't want the time to skew (scheduling 1000 such events must take 80 seconds in total). 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Speech to text not working behind corporate firewall
I regularly use speech to text on my Nexus One without a wireless connection. A local speech to text library and a local (on SD card) copy of speech data are needed for Android's speech to text to work. Although I had downloaded them to get speech to text capability in the emulator, I don't recall having to download either to my Nexus One and I was under the assumption that the Nexus One is shipped including the speech to text library and the local speech data. On the other hand (or in the other direction), the voice input capability definitely requires a wireless connection to work. On Jul 5, 2:30 pm, EdKawas ed.ka...@gmail.com wrote: Not sure if this helps, but I noticed that if my nexus one doesnt have a wifi/data signal, speech to text does not work. Only when a connection is present does it work. Eddie On Jul 5, 10:59 am, Connick oconn...@gmail.com wrote: I've noticed that speech to text only works on cellular or WiFi connections not behind corporate firewalls. I'm guessing it uses non-standard ports of some kind? Anyone else seen this? -Stace -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: discoverability
I think that, at a higher cognitive level, a user remembers what actions can be performed at a particular activity, not whether or not a menu exists. Frequently there is also a visual/motor memory asociated with the menu layout (example: third item = discard message). The way a user discovers what actions can be performed is via an explanation, by an example, and by pressing the menu button to explore the menu. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Whether to use a Service or Thread for Http Connection?
Only people who want to punish themselves use Java threads on Android:-) But you also asked about Service. You can use an AsyncTask in an Activity if the task has to happen while the activity is active. If the task needs to happen also when the acitivity is not active, (like when the user goes to other activities while the task is downloading stuff) use an AsyncTask in a Service. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Sync Any Database With Google Android
Following last year’s successful release of Google Android support for the MobiForms Developer rapid application development tool, the team at MobiForms are proud to announce the latest addition of Google Android support to the MobiForms Sync Server. The MobiForms Sync Server enables bi-directional data replication, synchronisation and offline buffering between just about any master database server and any MobiForms mobile client running on Google Android and a host of other mobile platforms such as Windows Mobile. Supported back office database servers include Oracle, SQL Server, Access, Sybase, IBM DB2, SQLite, HSQLDB and MySQL. The MobiForms Sync Server is part of the MobiForms Advanced Edition and includes the MobiForms Developer. The MobiForms Advance Edition now supports the full mobile development lifecycle for Google Android database apps including: - Definition of database replication rules from the master database - Creation and definition of mobile users - Building a seed mobile database based on a subset of the master database - Creation of a mobile application using the seed mobile database - Deployment of the mobile application and seed mobile database - Bi-directional data replication and status updates between the master database and the mobile client database Unlike most competing products, the MobiForms Advanced Edition offers a total solution for a once off licence fee. The licence includes an unlimited number of MobiForms clients running on Tablet PC, Pocket PC, Windows CE, Windows Mobile, Windows Smartphone, Symbian and now Google Android. For more information about the MobiForms Advanced Edition please go to: http://www.mobiforms.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Tool to generate class diagrams
Hi, I have an existing android project, which I want to view it as a class diagram or in any uml representation Could anyone please give me a free tool to generate them. Thanks, Priyank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] audio and video application in android
hi, i have run the media appllication in android emulator, audio and video file is not displaying in android emulator. video view source code is given below /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.apis.media; import com.example.android.apis.R; import android.app.Activity; import android.os.Bundle; import android.widget.MediaController; import android.widget.Toast; import android.widget.VideoView; public class VideoViewDemo extends Activity { /** * TODO: Set the path variable to a streaming video URL or a local media * file path. */ private String path = C:\'Documents and Settings\'ASWINI\'.android \'avd\'singam.mkv; private VideoView mVideoView; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.videoview); mVideoView = (VideoView) findViewById(R.id.surface_view); if (path == ) { // Tell the user to provide a media file URL/path. Toast.makeText( VideoViewDemo.this, Please edit VideoViewDemo Activity, and set path + variable to your media file URL/path, Toast.LENGTH_LONG).show(); } else { /* * Alternatively,for streaming media you can use * mVideoView.setVideoURI(Uri.parse(URLstring)); */ mVideoView.setVideoPath(path); mVideoView.setMediaController(new MediaController(this)); mVideoView.requestFocus(); } } } kindly suggest me how to give the local path in the android application. thanks in advance thanks regards aswini -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Question about parcelable object
Jul, This is the heart of the problem in logcat: 07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by: java.lang.ClassCastException: java.util.LinkedList 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254) My guess is that gson.fromJson creates a LinkedListRestaurant, then it blows at line Atable.java:254. I am guessing it's the line saying: outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); and the immediate cause is the cast from LinkedListRestaurant to ArrayListRestaurant, which are unrelated classes. To fix this, you can change the above code to read: Restaurant[] restArray = restaurantList.getRestaurants().toArray(); outState.putParcelableArray(restoList,restArray); -- Kostya 05.07.2010 21:42, jul пишет: Is it the right way to do it? The writeToParcel method of my Restaurant object is never called... The error seems to be in outState.putParcelableArrayList(restoList, (ArrayListRestaurant)restaurantList.getRestaurants()); and I get in my LogCat: 07-05 19:34:13.846: WARN/ActivityManager(563): Activity pause timeout for HistoryRecord{436950f8 {org.digitalfarm.atable/ org.digitalfarm.atable.Atable}} 07-05 19:34:28.336: DEBUG/AndroidRuntime(808): Shutting down VM 07-05 19:34:28.336: WARN/dalvikvm(808): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 07-05 19:34:28.336: ERROR/AndroidRuntime(808): Uncaught handler: thread main exiting due to uncaught exception 07-05 19:34:28.637: DEBUG/dalvikvm(808): GC freed 3337 objects / 259288 bytes in 94ms 07-05 19:34:28.647: ERROR/AndroidRuntime(808): java.lang.RuntimeException: Unable to pause activity {org.digitalfarm.atable/org.digitalfarm.atable.Atable}: java.lang.ClassCastException: java.util.LinkedList 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2840) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2797) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java: 2780) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.access$2000(ActivityThread.java:112) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.os.Handler.dispatchMessage(Handler.java:99) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.os.Looper.loop(Looper.java:123) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at java.lang.reflect.Method.invokeNative(Native Method) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at java.lang.reflect.Method.invoke(Method.java:521) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:782) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at dalvik.system.NativeStart.main(Native Method) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): Caused by: java.lang.ClassCastException: java.util.LinkedList 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at org.digitalfarm.atable.Atable.onSaveInstanceState(Atable.java:254) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.Activity.performSaveInstanceState(Activity.java:1008) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java: 1256) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): at android.app.ActivityThread.performPauseActivity(ActivityThread.java: 2822) 07-05 19:34:28.647: ERROR/AndroidRuntime(808): ... 12 more thanks for your help On Jul 5, 6:31 pm, Kostya Vasilyevkmans...@gmail.com wrote: Jul, Parcelable implementation looks good, except for the questionable cast to ArrayListRestaurant, but that shouldn't have any effect. What error are you getting, exactly? -- Kostya 05.07.2010 20:20, jul пишет: Hi, I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet data using GSON: restaurantList = gson.fromJson(r, RestaurantList.class); Now, when I want to save the List of Restaurant objects using protected void onSaveInstanceState(Bundle outState) { if (restaurantList != null ) { outState.putParcelableArrayList(restoList,
[android-developers] Re: Emulator Problems
I am also using Win 7 64bit, and running Android 1.6 I don't know if this happens with other versions. I will try it out. On Jun 29, 1:38 am, Sathish Kumar xath...@gmail.com wrote: The same thing is happening for me when i start the emulator in 800 or 854 mode but not in 400. It is just random i guess, but it happens frequently if you close eclipse before closing the emulator. Even deletion and recreation does not have an effect in my case. You can try opening a 400 instance and then launch the other one. This usually works. It is pretty annoying when this happens. Anybody have a more concrete solution. Using Win 7 64bit and Eclipse. On Jun 29, 10:48 am, Cameron cameron.m.john...@gmail.com wrote: Hi there, Sometimes when I run a FWVGA or WVGA emulator it causes my app to run in compatibility mode (small inner rectangle instead of full screen / MDPI instead of HDPI). If I delete the emulator and recreate another one this usually solves the problem. My app can support HDPI, MDPI, and LDPI screens. My Android Manifest Support Screens says Small Screens = true Normal Screens = true Large Screens = false Resizeable = true Any Density = true Usually the front page looks like this:http://4.bp.blogspot.com/_hmNcPpDB070/TCmGaxEdS-I/AEQ/g0tlmQu... But when it screws up it looks like this:http://2.bp.blogspot.com/_hmNcPpDB070/TCmGvlOUqtI/AEY/mLUVGxN... Does anyone know what causes this or if there is a solution? It's not a major problem, just annoying. Thanks Cameron If the image links don't work I posted it on my blog here:http://wonton-games.blogspot.com/2010/06/emulator-problems.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: Tool to generate class diagrams
Hi Priyank, ArgoUML it also has an eclipse plugin and Papyrus Eclipse Modeling project Eclipse 3.6. On Jul 5, 2:55 pm, Priyank priyankvma...@gmail.com wrote: Hi, I have an existing android project, which I want to view it as a class diagram or in any uml representation Could anyone please give me a free tool to generate them. Thanks, Priyank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Tool to generate class diagrams
Hi, Thanks a lot for your reply. I installed ArgoUML and am trying to figure how to use it. My project doesnt have a XMI file to import from. It consists of 2 modules. Application and Services. Each of them has 3-4 packages having about 15 .java files and a few resource files. I tried to do Import Sources in ArgoUML and selected the entire project. But I was not able to understand how to go ahead. Which perspective is the best to use in this scenario. Could you please tell me what I am doing is the right way. Or am I missing something . Thanks, Priyank On Mon, Jul 5, 2010 at 3:31 PM, Fred Grott(Android Expert, http://mobilebytes.wordpress.com) fred.gr...@gmail.com wrote: Hi Priyank, ArgoUML it also has an eclipse plugin and Papyrus Eclipse Modeling project Eclipse 3.6. On Jul 5, 2:55 pm, Priyank priyankvma...@gmail.com wrote: Hi, I have an existing android project, which I want to view it as a class diagram or in any uml representation Could anyone please give me a free tool to generate them. Thanks, Priyank -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ItemizedOverlay using both onTap methods
Any news on how to implement this ? Is overriding the class that extends itemizedOverlay on the onTap method enough? I need to show information when the user clicks a marker and cant seem to find possibilities On Jun 29, 9:52 pm, Steve Howard ste...@android.com wrote: Trying to resend this reply as I think it may not have gone through the first time... Steve On Thu, Jun 24, 2010 at 11:24 AM, Steve Howard ste...@android.com wrote: I think the ideal usage would be something like this: public boolean onTap(GeoPoint point, MapView mapView) { // first, let the superclass check if the event hit a marker; if so, it'll call onTap(index) // if it returns true, that means onTap(index) returned true, meaning the event has been handled already if (super.onTap(point, mapView)) { return true; } // the event wasn't handled as a tap on an existing marker, so let's add a new marker addNewMarkerAt(point); return true; } public boolean onTap(int index) { // an existing marker was tapped // ...display info by whatever means are appropriate... return true; // indicate that we've handled this tap, and it shouldn't propagate to other potential handlers } You can override both, but the key is to call the superclass implementation of onTap(GeoPoint, MapView) and examine its return value. Let me know if that helps. Steve On Thu, Jun 24, 2010 at 9:57 AM, Carlos Silva r3...@r3pek.org wrote: On Thu, Jun 24, 2010 at 17:49, TreKing treking...@gmail.com wrote: On Jun 15, 9:15 am, tfriest tfri...@kc.rr.com wrote: Does anyone know of a better way to do this? As you've seen, the maps documentation is pretty pathetic. What I know of the onTap functions has been gleamed from trial and error and experimentation. This is how I believe it works: onTap(int) determines whether the item at the specified index will handle tap events at all. If you return false, the other onTap function will always return false. onTap(Point, MapView) determines whether an item in the overlay was tapped given the touch point, if onTap(int) return true for it's index. OK, with that, what you can do is: return true for onTap(int) always. in onTap(Point, MapView) call through to the base implementation to determine if something was tapped. And that's it. public boolean onTap(point, mapview) { boolean tapped = super.onTap(point, mapView); if (tapped) showInfo(); else dropNewItem(point); return true; // irrelevant if you only have one itemized overlay } Hope that helps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en I don't really agree with this. I use onTap(int) to detect if an overlayItem was clicked. And use onTap(point, mapview) to handle every other click on the map. I use the first to show a ballow, and the second to hide 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Default shared preferences consistency check
On Mon, Jul 5, 2010 at 12:55 PM, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 4:04 AM, Federico Paolinelli fedep...@gmail.com wrote: However, is there another way to do this? Am I missing something? You can create a custom preference, perhaps subclassing an existing one, and implement your business logic there. See here for a custom View that I wrapped into a ColorPreference: http://github.com/commonsguy/cwac-colormixer After looking at the source code, I managed to get it work using the PreferenceActivity with DefaultSharedPreferences. I write for those who might be interested in this. The editor.commit() call calls the listener after storing the new values, so what I was doing was basically correct. A new editor.commit() call inside the listener forces the SharedPreferences to a different value from the one that is being notified (to be more precise, to the one related to the key that is being notified). What I did not consider, is that the activity view does not get updated if I change the preferences from the listener. So the preference stored was ok but the view was showing an incorrect value. I resolved reloading the whole activity using : startActivity(getIntent()); finish(); Federico -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: paypal mobile payment allowed?
It depends on what you want to charge the user for. From 3.3: All fees received by Developers for Products distributed via the Market must be processed by the Market’s Payment Processor. Definition ofroducts: Software, content and digital materials created for Devices in accordance with the Android SDK and distributed via the Market. On Jul 5, 6:03 pm, Kai snowst...@gmail.com wrote: Paypal recently released a mobile payment library for android. see news athttp://www.intomobile.com/2010/05/22/paypals-mobile-payments-library-...https://www.x.com/community/ppx/xspaces/mobile/mep I recalled that the android market TOS doesn't allow non-google checkout payment solution. has TOS been changed to allow paypal integration?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ItemizedOverlay using both onTap methods
On Mon, Jul 5, 2010 at 5:58 PM, Pedro Teixeira pedroteixeir...@gmail.com wrote: Any news on how to implement this ? Is overriding the class that extends itemizedOverlay on the onTap method enough? I need to show information when the user clicks a marker and cant seem to find possibilities Here are examples of how I've done it: http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/ http://github.com/commonsguy/cw-advandroid/tree/master/Maps/EvenNooerYawk/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: audio and video application in android
Hi. im also new. i found a way with paths that works ok. you have to use setVideoURI(Uri uri) instead of setVideoPath. and the media file needs to be in your res folder. this article explains it: http://androidbook.blogspot.com/2009/08/referring-to-android-resources-using.html maybe someone can give info on how to correctly reference the path (if you want to use the function setVideoPath). hope it helps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ItemizedOverlay using both onTap methods
Thank you very much, I've implemented some parts of the code you gave me in my code and works like a charm. I just had my overlay class in a separate file and i'm not sure how to access the variables like the map from there. I'd like to keep the format I had before, but if its not possible, this works perfectly so I changed my code a little bit and now it works. Thank you very much for this :)) On Jul 5, 2010, at 11:03 PM, Mark Murphy wrote: On Mon, Jul 5, 2010 at 5:58 PM, Pedro Teixeira pedroteixeir...@gmail.com wrote: Any news on how to implement this ? Is overriding the class that extends itemizedOverlay on the onTap method enough? I need to show information when the user clicks a marker and cant seem to find possibilities Here are examples of how I've done it: http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/ http://github.com/commonsguy/cw-advandroid/tree/master/Maps/EvenNooerYawk/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] LocationManager.getSpeed(); always zeroo
Hi all, I'm using LocationManager.getspeed(); and everytime I use it it comes to with location.hasSpeed=false ,and the speed is zero ? So is this something related to ANdroid bugs or this provider doesn't support speed ? and What would be the alternatives for it ? should I use the accelerometer to measure the speed? Thanks -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Protect the Shared Data between service and thread
Just I created an activity that start a new service collect some data,the this service will intiate another thread to do certain operations on the data collected by the service.so all I feared that may the service access this array and the thread also at the same time and a race condition might happen ? So am I thinking right or wrong ? On Thu, Jun 24, 2010 at 3:28 PM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Jun 23, 2010 at 10:46 PM, tarek attia tarek.m.at...@gmail.com wrote: Yes,I mean that,as in my service there's an array to be accessed also by a thread exists in this service ,so how do I protect the array from being a race condition between the service and the thread? Comparing services and threads is like comparing apples and shoes. You do not protect the array from being a race condition between the service and the thread. You may wish to protect the array from being a race condition between two threads. Services by default use only the main application thread, unless you are arranging for work to be done in another thread yourself (e.g., AsyncTask). In that case, you would want to use java.util.concurrent classes, or the synchronization keyword, as Mr. Boston suggests. The use of these classes is not specific to Android, as they have been in Java for some time. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Protect the Shared Data between service and thread
On Mon, Jul 5, 2010 at 8:27 PM, tarek attia tarek.m.at...@gmail.com wrote: Just I created an activity that start a new service collect some data,the this service will intiate another thread to do certain operations on the data collected by the service.so all I feared that may the service access this array and the thread also at the same time and a race condition might happen ? So am I thinking right or wrong ? You need to synchronize access to anything shared between threads that is not intrinsically thread-safe. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] LocationManager.getSpeed(); always zeroo
On Mon, Jul 5, 2010 at 8:21 PM, tarek attia tarek.m.at...@gmail.com wrote: I'm using LocationManager.getspeed(); and everytime I use it it comes to with location.hasSpeed=false ,and the speed is zero ? So is this something related to ANdroid bugs or this provider doesn't support speed ? What device are you testing this on? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] LocationManager.getSpeed(); always zeroo
T-mobile G1,,plus the emulator the same case On Tue, Jul 6, 2010 at 3:32 AM, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 5, 2010 at 8:21 PM, tarek attia tarek.m.at...@gmail.com wrote: I'm using LocationManager.getspeed(); and everytime I use it it comes to with location.hasSpeed=false ,and the speed is zero ? So is this something related to ANdroid bugs or this provider doesn't support speed ? What device are you testing this on? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- tarek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout Params classcastexception
Excellent thank you. On Jul 5, 3:04 pm, skink psk...@gmail.com wrote: On Jul 5, 3:14 pm, samspade79 samspad...@gmail.com wrote: Hi all. I have a ListView created programmatically and each view is a TableLayout. I am trying to get the Tables to expand to 100% of the list view, but it does not matter what type of layout params I set on the TableLayout I get a ClassCastException every time. Ie, I've tried TableLayout.LayoutParams, LinearLayout.LayoutParams, FrameLayout.LayoutParams, etc, all of them. not all of them: you didn't try AbsListView.LayoutParams pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Trying to compile the Voice Dialer, need help...
Hi, I downloaded the HEAD revision of the Voice Dialer from GIT (used the web interface) but there are so many errors and I have no idea how to fix them. I did the same thing for the 3D Gallery and that turned out fine. But the Voice Dialer is a completely different story... Here's a couple of the errors: Description ResourcePathLocationType ACTION_CALL_PRIVILEGED cannot be resolved or is not a field BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 517Java Problem BluetoothHeadset cannot be resolved BluetoothVoiceDialerActivity.java / VoiceDialer/src/com/android/voicedialer line 221Java Problem BluetoothHeadset cannot be resolved to a type BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 226Java Problem BluetoothHeadset cannot be resolved to a type BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 368Java Problem BluetoothHeadset cannot be resolved to a type BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 880Java Problem BluetoothHeadset cannot be resolved to a type BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 883Java Problem BluetoothHeadset cannot be resolved to a variable BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 368Java Problem Grammar cannot be resolved to a typeCommandRecognizerEngine.java/ VoiceDialer/src/com/android/voicedialer line 96 Java Problem Grammar cannot be resolved to a typeCommandRecognizerEngine.java/ VoiceDialer/src/com/android/voicedialer line 113Java Problem Grammar cannot be resolved to a typeCommandRecognizerEngine.java/ VoiceDialer/src/com/android/voicedialer line 141Java Problem Grammar cannot be resolved to a typeCommandRecognizerEngine.java/ VoiceDialer/src/com/android/voicedialer line 163Java Problem Grammar cannot be resolved to a type PhoneTypeChoiceRecognizerEngine.java/VoiceDialer/src/com/android/ voicedialer line 35 Java Problem Intents cannot be resolved VoiceDialerReceiver.java /VoiceDialer/src/ com/android/voicedialer line 54 Java Problem MicrophoneInputStream cannot be resolved to a type RecognizerEngine.java /VoiceDialer/src/com/android/voicedialerline 153 Java Problem Recognizer cannot be resolved RecognizerEngine.java /VoiceDialer/src/ com/android/voicedialer line 176Java Problem Recognizer cannot be resolved to a type CommandRecognizerEngine.java/ VoiceDialer/src/com/android/voicedialer line 146Java Problem Recognizer cannot be resolved to a variable CommandRecognizerEngine.java/VoiceDialer/src/com/android/voicedialer line 953Java Problem Recognizer cannot be resolved to a variable PhoneTypeChoiceRecognizerEngine.java/VoiceDialer/src/com/android/ voicedialer line 71 Java Problem ServiceListener cannot be resolved to a type BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 227Java Problem STREAM_BLUETOOTH_SCO cannot be resolved or is not a field BluetoothVoiceDialerActivity.java /VoiceDialer/src/com/android/ voicedialer line 318Java Problem There's around 121 errors like these though... What am I missing? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en