[android-developers] Re: Set Screen Orientation of a Tab
I see. Is there any way you can think of that will enable me to set the orientation per displayed tab (without wrecking havoc)? Thanks again for all the help! On Mar 19, 7:59 am, Dianne Hackborn hack...@android.com wrote: When you call setRequestedOrientation(), your activity will be restarted in the new orientation. During that time you could very well end up calling it with a different value while initializing. You might try putting breakpoints wherever you call it and seeing why it is being called. On Wed, Mar 18, 2009 at 10:30 PM, Uri.Kanonov urikano...@gmail.com wrote: Thank you for the quick response. If that's not possible then is it possible to merely change orientation when switching to a Tab and to switch back to another orientation when leaving that tab? I tried to implement that behavior by using the setRequestedOrientation method of Activity in the onCreate method of the activities displayed in my tabs but I seem to have gotten the device stuck in an infinite loop of orientation switches. I'm not sure why that happened as after all only one onCreate method should've been called when accessing a single tab. On Mar 19, 2:49 am, Dianne Hackborn hack...@android.com wrote: No it is not, sorry. The orientation applies to the entire display, and tabs are not considered at all. On Wed, Mar 18, 2009 at 3:19 PM, Uri.Kanonov urikano...@gmail.com wrote: Anyone? -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Dynamically loading a .jar file at Runtime
On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote: Security will be one concern but , my plan is to load the required .jar files in the sdcard only when it is necessary and I will remove that .jar files from the /sdcard when my application execution completes. That doesn't fix the security hole, just makes it a little harder for people to exploit. Not much, though, since they can easily monitor the directory where you place them. Why not just put them in your app's data directory, which nobody else can touch? I want to do this because I wanna run different things, those will be decided at runtime. I think this is same concept as that of .dll ( Dynamic link Lib) in the .net framework. And dlls also have serious security issues if you put them in a place where others can modify them. It's not as much of a concern on Windows, though, because its security is much looser and all of the apps tend to run as the same user, anyway. -- 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. 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: Set Screen Orientation of a Tab
Just set it to what you want in the top-level activity and make sure not to change it to something else until the user explicitly changes tabs. On Wed, Mar 18, 2009 at 11:01 PM, Uri.Kanonov urikano...@gmail.com wrote: I see. Is there any way you can think of that will enable me to set the orientation per displayed tab (without wrecking havoc)? Thanks again for all the help! On Mar 19, 7:59 am, Dianne Hackborn hack...@android.com wrote: When you call setRequestedOrientation(), your activity will be restarted in the new orientation. During that time you could very well end up calling it with a different value while initializing. You might try putting breakpoints wherever you call it and seeing why it is being called. On Wed, Mar 18, 2009 at 10:30 PM, Uri.Kanonov urikano...@gmail.com wrote: Thank you for the quick response. If that's not possible then is it possible to merely change orientation when switching to a Tab and to switch back to another orientation when leaving that tab? I tried to implement that behavior by using the setRequestedOrientation method of Activity in the onCreate method of the activities displayed in my tabs but I seem to have gotten the device stuck in an infinite loop of orientation switches. I'm not sure why that happened as after all only one onCreate method should've been called when accessing a single tab. On Mar 19, 2:49 am, Dianne Hackborn hack...@android.com wrote: No it is not, sorry. The orientation applies to the entire display, and tabs are not considered at all. On Wed, Mar 18, 2009 at 3:19 PM, Uri.Kanonov urikano...@gmail.com wrote: Anyone? -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Dynamically loading a .jar file at Runtime
Hi Dianne, Yes you are right, But Is there any way to store over .jar file in the app's data directory. Because I am working on emulator and I can store any file there. Please tell the way I can store in the data dir. And yes any alternate idea to call the .jar files dynamically at runtime?? I want to call a function from the .jar file, which will be decided at runtime. Thanks in advance. Regards, Asif Kadiwala On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote: On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote: Security will be one concern but , my plan is to load the required .jar files in the sdcard only when it is necessary and I will remove that .jar files from the /sdcard when my application execution completes. That doesn't fix the security hole, just makes it a little harder for people to exploit. Not much, though, since they can easily monitor the directory where you place them. Why not just put them in your app's data directory, which nobody else can touch? I want to do this because I wanna run different things, those will be decided at runtime. I think this is same concept as that of .dll ( Dynamic link Lib) in the .net framework. And dlls also have serious security issues if you put them in a place where others can modify them. It's not as much of a concern on Windows, though, because its security is much looser and all of the apps tend to run as the same user, anyway. -- 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. 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] SimpleCursorAdapter and setListAdapter problems
I am trying to fill the data in two text views in a single row (see xml) and am trying to use SimpleCursorAdapter to do it. As I understand the function, it is allowed to take an array of strings and an array of ids which you see in the list below. When I run the application from the phone, it errors out at start (the client view is the default view to show which is where this function is executed from). Can anyone fill me in on what I am missing? XML ?xml version=1.0 encoding=utf-8? TextView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=60px TextView android:id=@+id/client_row_title android:textSize=20px / TextView android:id=@+id/client_row_body android:textSize=10px / /TextView private void fillData(){ Cursor c = mDbHelper.fetchAllClients(); startManagingCursor(c); // Set Client Row Title String[] from = new String[]{ FinanceDbAdapter.KEY_TITLE, FinanceDbAdapter.KEY_BODY }; int[] to = new int[] { R.id.client_row_title, R.id.client_row_body }; // Now create an array adapter and set it to display using our row SimpleCursorAdapter clients = new SimpleCursorAdapter(this, R.layout.client_row, c, from, to); setListAdapter(clients); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 implement scrolling text?
I implemented a scrollable TextView, named ScrollTextView before Android 1.1R1 with the marquee feature for TextView. It used android.widget.Scroller and attached TextPaint. Here's the source code: http://bear-polka.blogspot.com/2009/01/scrolltextview-scrolling-textview-for.html It's glad to see that marquee is supported. However you could not make the TextView scrolling if you only set these 2 attributes, android:ellipsize and android:marqueeRepeatLimit. According to my testing, at least the following 3 attributes shall be set: android:ellipsize=marquee android:focusable=true android:singleLine=true And the TextView shall be focused while running. Moreover, I found 2 limitations in current marquee implementation: 1. Never scroll if the TextView does not get the focuse; 2. The scrolling is odd because the round of scrolling begins from the left side while end at the right side. It looks like the animation is reset. So far, I think my implementation of ScrollTextView is better for the marquee feature. :) On 3月10日, 下午1时55分, soniya soniy...@gmail.com wrote: I am talking about this API Demo: API Demos - Text - Marquee I tried selecting the textbut it does not move...not even a millimeter :( Am I missing something?? On Mar 4, 9:28 pm, Romain Guy romain...@google.com wrote: The marquee starts when a TextView gets focused/selected. It is used throughout the UI in 1.1, for instance in the list of all apps in Home. On Tue, Mar 3, 2009 at 11:00 PM, soniya soniy...@gmail.com wrote: I have downloaded the latest SDK i.e. Android 1.1 but I am not able to run the API demo for Marquee. It does not work The text remain static. Do I need to do any setting or something to view that? On Jan 31, 1:51 am, Romain Guy romain...@google.com wrote: Note that cupcake will have themarqueefeature on TextView. On Fri, Jan 30, 2009 at 12:31 PM, Zach Hobbs ho...@helloandroid.com wrote: You can create a custom singleLine TextView and animate it by creating a loop and calling scrollBy(x,y) incrementing/decrementing the x value. -Zach On Thursday 29 January 2009 7:47:49 pm Rodrigo wrote: HI, What is the best way to implement scrolling text (with behavior similar to that of HTML tag 'marquee')?? I've been trying to do this using TextViews + Animations but I'm having troubles primarily because of sizing issues. If my text is long enough that it exceeds the screen width, it won't be drawn completely (it's size will be chopped at screen width). Thus, when I animate it from right to left, only a part of the text will be displayed. This happens if I allow a maximum of 1 line in my TextView, because otherwise it makes the TextView have multiple lines. If I make it horizontally scrollable, the same 'chopped-off' behavior is seen. I think this happens because the TextView's parent imposes some restrictions on its size. Is there a way to bypass these restrictions so that the TextView is 'drawn' even if parts of it will be off- screen? If that's not possible, what's an alternative way of implementing this behavior? Thanks! -- Zach Hobbs HelloAndroid.com Android OS news, tutorials, downloads -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to implement scrolling text?
The TextView doesn't have to be focused. You can also use setSelected(true). -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to set color to String?
I have the String, how can I set color the text in String? For example: String S1; S1 =Name: + \t + this.Name1 + \n + Country/Area: + \t + this.Country1 + \n + Department: + \t + this.Department + \n + Title: + \t + this.Title + \n; I want set color: Name, Country, ... are RED. I don't know in Android can do it? Thanks, --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: Hidden Contacts
I have the same problem, but I need a better solution. I'm doing a managed query on the contacts and am already filtering out entries that do not have a DISPLAY_NAME, but I still get all the suggested contacts. I need to deal with contacts that have a name but no phone number or email address. I guess the proper way would be to check in which group a contact is, but what's the quickest way to do that in a simple managed query? And what group is the official Contacts group? I could look at the source for the contacts app, but maybe there is an official solution that someone could post here real quick. On Feb 14, 1:51 pm, Chili chilib...@gmail.com wrote: Hey Miguel, I was having the same problem. It's not a perfect solution but you can check whether the contact has a name and/or phone number and if not add then don't add them to your list. Just loop through all the items and add items to a List and then use the List to populate you listview. Chili On Jan 27, 5:06 am, Miguel Paraz mpa...@gmail.com wrote: On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote: bklik's question seemed to indicate that he was dumping the contact list programactically via his own activity. I was just wondering if thecontactsAPI was returning allcontactsand the activity needed to do the filtering. I have the same situation. I use the contact list content provider to let the user select an email address. The SuggestedContactsare irrelevant to my application and just slow down the loading process. I looked at the SQLite db using the sqlite command line, but couldn't find how to differentiate thesecontacts. Is there a way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Developer Challenge II Cancelled?
This ( http://code.google.com/android/adc.html ) gives a 404 which is weird for a google site. Is this challenge cancelled? I hope not.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 implement scrolling text?
Set the focus on the buttons to make them scrolling. not selecting the text, but use the UP and Down navigator button of the simulator to change the focus ... On 3月10日, 下午1时55分, soniya soniy...@gmail.com wrote: I am talking about this API Demo: API Demos - Text - Marquee I tried selecting the textbut it does not move...not even a millimeter :( Am I missing something?? On Mar 4, 9:28 pm, Romain Guy romain...@google.com wrote: The marquee starts when a TextView gets focused/selected. It is used throughout the UI in 1.1, for instance in the list of all apps in Home. On Tue, Mar 3, 2009 at 11:00 PM, soniya soniy...@gmail.com wrote: I have downloaded the latest SDK i.e. Android 1.1 but I am not able to run the API demo for Marquee. It does not work The text remain static. Do I need to do any setting or something to view that? On Jan 31, 1:51 am, Romain Guy romain...@google.com wrote: Note that cupcake will have themarqueefeature on TextView. On Fri, Jan 30, 2009 at 12:31 PM, Zach Hobbs ho...@helloandroid.com wrote: You can create a custom singleLine TextView and animate it by creating a loop and calling scrollBy(x,y) incrementing/decrementing the x value. -Zach On Thursday 29 January 2009 7:47:49 pm Rodrigo wrote: HI, What is the best way to implement scrolling text (with behavior similar to that of HTML tag 'marquee')?? I've been trying to do this using TextViews + Animations but I'm having troubles primarily because of sizing issues. If my text is long enough that it exceeds the screen width, it won't be drawn completely (it's size will be chopped at screen width). Thus, when I animate it from right to left, only a part of the text will be displayed. This happens if I allow a maximum of 1 line in my TextView, because otherwise it makes the TextView have multiple lines. If I make it horizontally scrollable, the same 'chopped-off' behavior is seen. I think this happens because the TextView's parent imposes some restrictions on its size. Is there a way to bypass these restrictions so that the TextView is 'drawn' even if parts of it will be off- screen? If that's not possible, what's an alternative way of implementing this behavior? Thanks! -- Zach Hobbs HelloAndroid.com Android OS news, tutorials, downloads -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Hidden Contacts
To answer my own post... I looked at the Contacts source code, and this is essentially what they do: The main My contacts group is called Contacts.Groups.GROUP_MY_CONTACTS. To query all members in that group, simply use this URI: Uri uri = Uri.parse(content://contacts/groups/system_id/ + Contacts.Groups.GROUP_MY_CONTACTS + /members); Works like a charm for me. I can imagine that at least part of this URL is contained in the Contacts.Groups.CONTENT_* strings, so it would be cleaner to use those. -Mike On Mar 18, 11:39 pm, EboMike ebom...@gmail.com wrote: I have the same problem, but I need a better solution. I'm doing a managed query on thecontactsand am already filtering out entries that do not have a DISPLAY_NAME, but I still get all the suggestedcontacts. I need to deal withcontactsthat have a name but no phone number or email address. I guess the proper way would be to check in which group a contact is, but what's the quickest way to do that in a simple managed query? And what group is the official Contacts group? I could look at the source for thecontactsapp, but maybe there is an official solution that someone could post here real quick. On Feb 14, 1:51 pm, Chili chilib...@gmail.com wrote: Hey Miguel, I was having the same problem. It's not a perfect solution but you can check whether the contact has a name and/or phone number and if not add then don't add them to your list. Just loop through all the items and add items to a List and then use the List to populate you listview. Chili On Jan 27, 5:06 am, Miguel Paraz mpa...@gmail.com wrote: On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote: bklik's question seemed to indicate that he was dumping the contact list programactically via his own activity. I was just wondering if thecontactsAPI was returning allcontactsand the activity needed to do the filtering. I have the same situation. I use the contact list content provider to let the user select an email address. The SuggestedContactsare irrelevant to my application and just slow down the loading process. I looked at the SQLite db using the sqlite command line, but couldn't find how to differentiate thesecontacts. Is there a way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: IWindowManager Not Available
If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. 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: SimpleCursorAdapter and setListAdapter problems
Nevermind, I found the solution... The final fillData function does exactly what I need. Hope this helps someone... private void fillData(){ Cursor c = mDbHelper.fetchAllClients(); startManagingCursor(c); // Set Client Row Title String[] from = new String[]{ FinanceDbAdapter.KEY_TITLE, FinanceDbAdapter.KEY_BODY }; int[] to = new int[]{ android.R.id.text1, android.R.id.text2}; // Now create an array adapter and set it to display using our row SimpleCursorAdapter clients = new SimpleCursorAdapter(this, android.R.layout.two_line_list_item, c, from, to); setListAdapter(clients); } On Thu, Mar 19, 2009 at 1:18 AM, sddandroid sddm...@gmail.com wrote: I am trying to fill the data in two text views in a single row (see xml) and am trying to use SimpleCursorAdapter to do it. As I understand the function, it is allowed to take an array of strings and an array of ids which you see in the list below. When I run the application from the phone, it errors out at start (the client view is the default view to show which is where this function is executed from). Can anyone fill me in on what I am missing? XML ?xml version=1.0 encoding=utf-8? TextView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=60px TextView android:id=@+id/client_row_title android:textSize=20px / TextView android:id=@+id/client_row_body android:textSize=10px / /TextView private void fillData(){ Cursor c = mDbHelper.fetchAllClients(); startManagingCursor(c); // Set Client Row Title String[] from = new String[]{ FinanceDbAdapter.KEY_TITLE, FinanceDbAdapter.KEY_BODY }; int[] to = new int[] { R.id.client_row_title, R.id.client_row_body }; // Now create an array adapter and set it to display using our row SimpleCursorAdapter clients = new SimpleCursorAdapter(this, R.layout.client_row, c, from, to); setListAdapter(clients); } -- Mike Garcia There is no coincidence! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 config G1 to make both browser and MMS work?
It works. But very unstable. Thanks a lot. On Mar 19, 3:18 am, David Turner di...@android.com wrote: when you want to use different APNs for both data and MMS, you need to set the apn type field for the system to make a difference between them and use them both. use apn type=default for the data APN. and apn type=mms for the MMS one. Hope this helps On Wed, Mar 18, 2009 at 12:38 AM, FayGU gqm...@gmail.com wrote: I have a G1 phone and use it in mainland China. But I can't config it to work with browser and MMS at the same time. However with different APN, the browser and MMS can work seperately. For browser, I use following APN config: --- name:cmnet apn: cmnet proxy:blank port:blank username:blank password:blank server:blank mmsc:blank mms proxy:blank mms port:blank mcc:460 mnc:00 apn type:blank -- For MMS, I use following APN config: -- name:cmwap apn: cmwap proxy:blank port:blank username:blank password:blank server:blank mmsc:http://mmsc.monternet.com mms proxy:010.000.000.172 mms port:80 mcc:460 mnc:00 apn type:blank --- When above two APNs both exists, only browser can work. MMS doesn't work any more. Does any google export know that how to config G1 to make both browser and MMS work? If it's a known issue, is there any roadmap to fix it? Thanks!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: IWindowManager Not Available
No, you can't. It is internal implementation details of the platform. On Wed, Mar 18, 2009 at 11:59 PM, AndRaj rajendran.b...@gmail.com wrote: If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Dynamically loading a .jar file at Runtime
You can put whatever you want in your private data directory. On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote: Hi Dianne, Yes you are right, But Is there any way to store over .jar file in the app's data directory. Because I am working on emulator and I can store any file there. Please tell the way I can store in the data dir. And yes any alternate idea to call the .jar files dynamically at runtime?? I want to call a function from the .jar file, which will be decided at runtime. Thanks in advance. Regards, Asif Kadiwala On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote: On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote: Security will be one concern but , my plan is to load the required .jar files in the sdcard only when it is necessary and I will remove that .jar files from the /sdcard when my application execution completes. That doesn't fix the security hole, just makes it a little harder for people to exploit. Not much, though, since they can easily monitor the directory where you place them. Why not just put them in your app's data directory, which nobody else can touch? I want to do this because I wanna run different things, those will be decided at runtime. I think this is same concept as that of .dll ( Dynamic link Lib) in the .net framework. And dlls also have serious security issues if you put them in a place where others can modify them. It's not as much of a concern on Windows, though, because its security is much looser and all of the apps tend to run as the same user, anyway. -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: IWindowManager Not Available
Really... Is it, as an application developer I can only use the ADK API's. But I can able to see the source of those API's, then I can use those classes in my applicaition right On Mar 19, 12:18 pm, Dianne Hackborn hack...@android.com wrote: No, you can't. It is internal implementation details of the platform. On Wed, Mar 18, 2009 at 11:59 PM, AndRaj rajendran.b...@gmail.com wrote: If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Problem with setTheme() method
I'm sorry. But even if I put the setTheme on the first line of onCreate (even beforce super.onCreate), I get a dark black background and not a transparent/blur background. But if I set the theme in the manifest, it works. It's not a great problem, because I can set it in the manifest. But really strange. Also if I create an own theme which inherits the Dialog-Theme with parent=@android:style/Theme.Dialog and change nothing in the body, I don't get the transparent background! Is there a trick or something more to consider? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
回复: [android-developers] Re: Problem w ith setTheme() method
Please invoke setTheme() just before setContentView() --- 09年3月19日,周四, Marcus marcus.ter...@gmail.com 写道: 发件人: Marcus marcus.ter...@gmail.com 主题: [android-developers] Re: Problem with setTheme() method 收件人: Android Developers android-developers@googlegroups.com 日期: 2009,319,周四,3:31下午 I'm sorry. But even if I put the setTheme on the first line of onCreate (even beforce super.onCreate), I get a dark black background and not a transparent/blur background. But if I set the theme in the manifest, it works. It's not a great problem, because I can set it in the manifest. But really strange. Also if I create an own theme which inherits the Dialog-Theme with parent=@android:style/Theme.Dialog and change nothing in the body, I don't get the transparent background! Is there a trick or something more to consider? ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.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: Probl em with setTheme() method
That's my code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTheme(android.R.style.Theme_Dialog); setContentView(R.layout.whatsnew); } And it doesn't work! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Developer Challenge II Cancelled?
http://developer.android.com/ try in here.. its moved i guess On Thu, Mar 19, 2009 at 12:10 PM, Eelke Folmer eelke.fol...@gmail.comwrote: This ( http://code.google.com/android/adc.html ) gives a 404 which is weird for a google site. Is this challenge cancelled? I hope not.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: IWindowManager Not Available
Just because you can browse through the source and find something doesn't mean it is supported for application development. You can use the APIs in the SDK. Things that are not in the SDK were deliberately removed because they can change in arbitrary ways across versions of the platform. On Thu, Mar 19, 2009 at 12:25 AM, AndRaj rajendran.b...@gmail.com wrote: Really... Is it, as an application developer I can only use the ADK API's. But I can able to see the source of those API's, then I can use those classes in my applicaition right On Mar 19, 12:18 pm, Dianne Hackborn hack...@android.com wrote: No, you can't. It is internal implementation details of the platform. On Wed, Mar 18, 2009 at 11:59 PM, AndRaj rajendran.b...@gmail.com wrote: If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Developer Challenge II Cancelled?
Where are the info about the 2° comp ? Post the link please the search give no result. Thanks. 2009/3/19 Al Sutton a...@funkyandroid.com Very very recently though. Googling for android developer challenge still brings up the 404ed page as the top result. Al. Anonymous Anonymous wrote: http://developer.android.com/ try in here.. its moved i guess On Thu, Mar 19, 2009 at 12:10 PM, Eelke Folmer eelke.fol...@gmail.com mailto:eelke.fol...@gmail.com wrote: This ( http://code.google.com/android/adc.html ) gives a 404 which is weird for a google site. Is this challenge cancelled? I hope not.. -- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Creating Android.Jar File
from device directory, make sdk will generate android.jar to ./out/ host/linux-x86/sdk/android-sdk_eng.user_linux-x86/... Kenny On Mar 18, 9:55 pm, Rajendrakumar C rajendran.b...@gmail.com wrote: Hi all, I downloaded the android source code.. Can any one tell me how to make our own jar file with all our available java classes in the Android source code If any one know please help me how to do 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] Will SyncML engine be available in Android?
Hi Experts, Is there a plan to add SyncML engine to Android platform? I just heard from someone that Esmertec AG is going to implement a SyncML engine and will be contributing it back to Android, is it true? Regards, DH --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Marquee Api demo
The marquee does work on Focus. :) On Mar 4, 11:44 am, soniya soniy...@gmail.com wrote: I downloaded the Android SDK 1.1 and tried to run the Marquee demo (API Demos - Text -Marquee). But the program is not working .The text is static and does not move :( Did any one try this demo? And is it working?? Please help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Issue in android:duration in frame animation
Hi, In Frame Animation, in item tag, when i am putting android:duration=5, its not working. 15ms is the minimum which i tried and working. Is it a bug in Android ?. Anybody else got the same kind of problem. Thanks Nithin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Changing drawing order while animating
Hi , Im trying to do a custom animation on two image views which are placed one below the other (the object in the background is half visible and half the size compared to the object in the foreground ) . Now on animation , the visibilty and size of the images should be swapped .i.e the object in the foreground should now be my background image which should take the size and visibility of background image . How can we acheive 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] Re: Understand Broadcast and Intent with Dalvik process
As no one answers, I also see similar questions with other threads. I want to rephrase the question. Android defines Application as components Activity, Service, Broadcast/Intent and Content provider; Android designs the inter-process communication - BINDER; Usually application components send intents (Broadcast or PendingIntent::send(), others?) as application messages; If we look into the Android emulator using shell command ps, dozen of Linux processes are present. Each may have one or more Dalvik JAVA program. # ps USER PID PPID VSIZE RSS WCHANPC NAME ... root 231 70740 18860 c008be9c afe0c464 S zygote ... system 4823169084 22552 afe0c33c S system_server app_10 8023112416 19496 afe0d434 S android.process.acore radio8323106508 16636 afe0d434 S com.android.phone ... If android.process.acore gets an intent broadcast or PendingInent::send (), can com.android.phone get the intent? Note they are in two Linux processes with PID 80 and 83. Kenny On Mar 17, 10:06 pm, Kenny Yu yxw...@gmail.com wrote: Does anyone know if sendBroadcast(intentA) will bring intents to all Dalvik processes? For example, process android.process.acore behaves sendBroadcast(new intentA). Will the intentA be received in com.android.camera? We think android.process.acore and com.android.camera are zygoted to two Dalvik VMs (Linux processes). Same question to sendIntent(intentB). In terms of docs, sendIntent( ) can address certain class to receive the intent. Is this behavior across processes? Kenny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Google dev phone G1 activation problem
If anyone gets their phone set up with telenor, including MMS, please let us know. I have got my phone working too now, with these settings... name: Telenor apn: telenor username: password: mmsc: http://mmsc/ mms proxy: 10.10.10.11 mms port: 8080 mcc:242 mnc:01 apn type: default The only thing that will not work is MMS. Adding a second apn that looks identical, with apn type of MMS does not help either. I would love to get MMS working, so please let me know if you have Telenor Norway subscription and have MMS working (and of course, how you did it :)) HalfAsleep On 11 Mar, 10:38, Stian slind...@gmail.com wrote: No, it still does not ship directly to Norway. I got it shipped here through our US office. I guess Jetpak will work as well. Now, I've been getting a few mails from people having the same activation problem as I had so I figured I should post an update here. After lots of trials and errors I finally managed to activate the phone, but I had to use WLAN. To get that going you first need to install the USB driver for the phone and connect it to your computer. Run adb devices to verify that the device is connected correctly (HTC-something should show up under List of devices attached). Then run adb shell and am start -a android.intent.action.MAIN -n com.android.settings/.Settings from the shell prompt to get the WiFI- configuration screen up. Now configure your WIFI and activate the phone. Once you get that done you can go to Settings, Wireless controls-Mobile networks and register your SIM card on the mobile network! The APN settings I mentioned are correct (the only thing you need is to set telenor as apn name for Telenor). MMS doesn't seem to work, but I don't care. Good luck! Best regards, Stian On Feb 26, 12:06 pm, HalfAsleep chri...@gmail.com wrote: How do you go about getting the dev phone in Norway? It still does not ship directly to Norway does it? Cheers, HalfAsleep On Feb 18, 10:21 pm, Mandrake0 francis.tyrone.pime...@gmail.com wrote: look at:http://www.taniwha.org.uk/gprs.html Network APN Username Password DNS SMTP Server TelenorMobil internet.telenor.no guest guest 212.17.131.3 smtp.euromail.no 48.122.161.2 On Feb 18, 7:22 pm, slind...@gmail.com slind...@gmail.com wrote: I've got the Google dev phone from USA and I'm trying to activate it onTelenorinNorway. I've tried a whole bunch of different APN settings but nothing seems to be working. After filling in my username and password it tries to connect to google servers foractivationa couple of minutes before it reports an error There is a problem communicating with the Google servers. I've tried to delete all APNs and adding a new one. The settings I'm using now is: Name:telenor APN:telenor MCC: 242 MNC: 01 The rest is unset. I've also tried with username/password dj/dj and wap/wap. And also changing the APN value to internet. Any suggestions?– Skjul sitert tekst – – Vis sitert tekst – --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: When another activity is called from main activity, The calling activity get destroyed?
http://developer.android.com/guide/topics/fundamentals.html On Thu, Mar 19, 2009 at 8:50 AM, jj jagtap...@gmail.com wrote: When another activity is started from main activity, The main activity get destroyed and created when returned back from second Activity OR main activity remains in pause state till second activity finish (), onSart or onResume from when returned back from second activity? which one these case does happen in Android application? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Developer Challenge II Cancelled?
The strategy of Google for Android is very very obscure. I think for a while that the Challenge Two will not come. As I know Objective C maybe I ll take a pause with android. ... 2009/3/19 luigi bertoneri luigi.berton...@gmail.com Where are the info about the 2° comp ? Post the link please the search give no result. Thanks. 2009/3/19 Al Sutton a...@funkyandroid.com Very very recently though. Googling for android developer challenge still brings up the 404ed page as the top result. Al. Anonymous Anonymous wrote: http://developer.android.com/ try in here.. its moved i guess On Thu, Mar 19, 2009 at 12:10 PM, Eelke Folmer eelke.fol...@gmail.com mailto:eelke.fol...@gmail.com wrote: This ( http://code.google.com/android/adc.html ) gives a 404 which is weird for a google site. Is this challenge cancelled? I hope not.. -- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Dynamically loading a .jar file at Runtime
Yes I can push file to /data/app-private/ directory using DDMS but not programmatically. But I want to call .jar file at runtime to complete my task. Please any suggestion On Mar 19, 12:19 pm, Dianne Hackborn hack...@android.com wrote: You can put whatever you want in your private data directory. On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote: Hi Dianne, Yes you are right, But Is there any way to store over .jar file in the app's data directory. Because I am working on emulator and I can store any file there. Please tell the way I can store in the data dir. And yes any alternate idea to call the .jar files dynamically at runtime?? I want to call a function from the .jar file, which will be decided at runtime. Thanks in advance. Regards, Asif Kadiwala On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote: On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote: Security will be one concern but , my plan is to load the required .jar files in the sdcard only when it is necessary and I will remove that .jar files from the /sdcard when my application execution completes. That doesn't fix the security hole, just makes it a little harder for people to exploit. Not much, though, since they can easily monitor the directory where you place them. Why not just put them in your app's data directory, which nobody else can touch? I want to do this because I wanna run different things, those will be decided at runtime. I think this is same concept as that of .dll ( Dynamic link Lib) in the .net framework. And dlls also have serious security issues if you put them in a place where others can modify them. It's not as much of a concern on Windows, though, because its security is much looser and all of the apps tend to run as the same user, anyway. -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can i access html code of a web page.
Thanks for the replies. I can be able to access a web page. But can anyone tell me how can i get the html coding of the respective web page? You cannot access the HTML source from a running Browser instance. If you want to download HTML for your own use, use URLConnection or HttpClient. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 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 -~--~~~~--~~--~--~---
[android-developers] Accuracy of sensors such as electronic compass
Just a quick question... I am now beginning an app which will use the compass and tilt sensors to determine a persons heading and line of sight. Can I assume the sensors on devices such as the G1 are fairly accurate or can I expect to run into problems such as the compass being 5-10 degress off etc? 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: help with my implementation of mediaplayer
yes,thanks you very much. you got it. The reason for my problem is because I have used the android tools-》export unsigned apk, so my apk is unsigned, On 2月23日, 下午1时55分, Gray graham.stachow...@gmail.com wrote: From what I can understand you want to move the compiled file. In eclipse load your workspace project, look in the 'bin' folder and you will find the .APK file of your app. Transfer this to your device or platform and your golden. Hope I could help -gray On Feb 22, 7:38 pm, susanner zsusan...@163.com wrote: Hi all, I have run mediaplayer in SDK which can play media in res/raw folder successfully on emulator , but now I wanted to run it on my hardware which have already successfully implemented the android kernal and file system and audio, video drivers etc. I have no experience to implement JAVA app . I once implemented mplayer app written in C to my linux OS which only need to copy the final executable file , but now I don't know which files or folder should I copy to my platform because I have no basic knowledge of Java although I have run successfully on my emulator. anyone can help 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: Obtaining IP address when on 3G (MOBILE) connection
Hi Regina.. Many Thanks for the codes! :) Joseph On Thu, Mar 19, 2009 at 5:38 AM, Regina Mitsue Azuma rmaz...@gmail.comwrote: I was able to get the IP address using the following code: public String getLocalIpAddress() { try { for (EnumerationNetworkInterface en = NetworkInterface.getNetworkInterfaces(); en .hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (EnumerationInetAddress enumIpAddr = intf.getInetAddresses(); enumIpAddr .hasMoreElements();) { InetAddress inetAddress = enumIpAddr.nextElement (); if (!inetAddress.isLoopbackAddress()) { return inetAddress.getHostAddress().toString (); } } } } catch (SocketException ex) { Log.e(S.TAG, ex.toString()); } return null; } Regards, Regina On Mar 15, 10:39 pm, Joseph Teo josephteo2...@gmail.com wrote: Hi Folks, I have a small question. When i'm connected to WIFI, I could use the following code to obtain the IP address of the Android phone WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int ipAddress = wifiInfo.getIpAddress(); However, when i'm on the MOBILE (3G) connection, is it still possible to obtain the IP address of the Android phone? and if so, can someone post the code snippet (e.g. like above) for getting the IP address when on 3G Connection? Thanks a million! Rgds, Joseph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Can i convert AMR to MP3 OR WAV in my activity?
? On Mar 18, 2:31 pm, zeeshan genx...@gmail.com wrote: Thanks for reply Dave, can anyone tell me how can i do this, i assume to install any converter application and use it in my code to convert and return the mp3 uri please help me - On Mar 18, 10:31 am, Dave Sparks davidspa...@android.com wrote: No, there is no built-in package to convert from AMR to MP3 or WAVE. If you want to do this in the current SDK, you'll need to write your own code to do the conversion. On Mar 18, 2:44 am, zeeshan genx...@gmail.com wrote: Hi Android Experts, i want to convert recorded AMR sound into mp3 or WAV within my activity, is there any method or package i can use? i am using this activity for recording: Intent intent = new Intent (MediaStore.Audio.Media.RECORD_SOUND_ACTION); startActivityForResult(intent, SELECT_AUDIO); this gives me amr content uri but my question is , how can i get the mp3/wav uri? i posted this question long ago but still no solution, please help me as i am really stuck on this. Thanks- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: modal ViewGroups
On 19 Mar, 09:53, skink psk...@gmail.com wrote: hi, suppose i have two 'main' subtrees in my view hierarchy. is there any way to 'disable' one subtree (ViewGroup) so that it does not gain fosus, touch events etc (maybe even it gets blurred/ translucent). basically something similar to Dialog behavior... i'm aware of setDescendantFocusability(boolean) but still such ViewGroup can process TouchEvents and setEnabled doesn't do the trick since its not overriden by ViewGroup... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: IWindowManager Not Available
Thanks for the reply... On Mar 19, 1:10 pm, Dianne Hackborn hack...@android.com wrote: Just because you can browse through the source and find something doesn't mean it is supported for application development. You can use the APIs in the SDK. Things that are not in the SDK were deliberately removed because they can change in arbitrary ways across versions of the platform. On Thu, Mar 19, 2009 at 12:25 AM, AndRaj rajendran.b...@gmail.com wrote: Really... Is it, as an application developer I can only use the ADK API's. But I can able to see the source of those API's, then I can use those classes in my applicaition right On Mar 19, 12:18 pm, Dianne Hackborn hack...@android.com wrote: No, you can't. It is internal implementation details of the platform. On Wed, Mar 18, 2009 at 11:59 PM, AndRaj rajendran.b...@gmail.com wrote: If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Could I release a new version of an app under a new name and port existing users for free?
couldn't you ask google the key under you dev account? it is a registered account which the app was released under On Wed, Mar 18, 2009 at 6:21 PM, Sena Gbeckor-Kove s...@imkon.com wrote: Dude, that sucks so hard! The same thing happend to me 4 weeks ago, luckily I had backups though. Good luck. S On 18 Mar 2009, at 16:41, admin.androidsl...@googlemail.com wrote: I ask this because my laptop was stolen along with my signing keys! I know I should have backed up - but the last thing I expected last Friday was for burglars to break into my house and steal my laptop (and most of my other electronics jewellery) - lesson learnt, but I need to plan what to do next! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: need help on --core-library
I think I have to compile the java.bean. using the makefiles (just like the android core sources). to be honest I didnt find any documentation how to use them. greetings, darolla 2009/3/18 Stoyan Damov stoyan.da...@gmail.com: FreeTTS is a text-to-speech engine. It's only dependency is *again* java.beans.PropertyChangeListener. I've tried compiling with --core-library using Eclipse but no matter what I did I wasn't able to pass that parameter to the Android tools (can't remember which one required it). I managed to compile using the command-line tools but haven't tried running the app because in the end I've given up because of the big voice files required for FreeTTS. Bottom line is, I can't really help you, but try compiling on the command line OR try creating an IntelliJ IDEA project and modify it's build script -- I can't guarantee it will work though. Cheers On Wed, Mar 18, 2009 at 9:51 AM, Marco Schmitz netzprofi.ma...@googlemail.com wrote: hi stoyan, I am working for a company that needs an android client for their web application. because the server is coded nicely, the first try is going to be a serialized server object on android. but the server uses jdk 1.6 and therefor some classes that android doesnt support like java.bean. because these beans are transient I just need an empty class inside android. but the problem is to compile it. any suggestions? by the way: what is freetts? greetings, darolla 2009/3/17 Stoyan Damov stoyan.da...@gmail.com: I'll try to pull a magic now and guess what you're trying to do -- are you trying to get FreeTTS to work in your app? :P On Tue, Mar 17, 2009 at 6:01 PM, DaRolla netzprofi.ma...@googlemail.com wrote: hello, I need to build a java.beans.PropertyChangeListener which is part of JDK (rt.jar) but not part of Dalvik. Trying to copy the sources to my Application I get this: Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. My solution: 1) build a core library with consisting out of java.beans.PropertyChangeListener 2) integrate that library (jar?) into my application. My question: - how can I build a core library using eclipse? greetings, darolla --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Count Down Timer in list view
Can i have ny solution from any oneee Y is the count down timer showing different time periods if all are set to the same duration in the start??? and thy are ticking in inetrval of 3-4 secs... pls tel me any soultion to fix thisss On Mar 18, 5:15 pm, AnuR anura...@gmail.com wrote: Hi, I want to add a count down timer in a list view. the time duration is got from an xml in the format (PnYnMnDTnHnMnS). I used joda-time.jar for parsing the time from Period. I used long totaltimeinmilliseconds = (H*24*60+M*60+S)*1000; new CountDownTimer(totaltimeinmilliseconds, 1000) { public void onTick(long millisUntilFinished) { mTimer.setText(left: + millisUntilFinished / 1000); } public void onFinish() { mTimer.setText(done!); } }.start(); This code for making the countdown timer display. I put the code just before ll.addView(mTimer, new LinearLayout.LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); in which, this linearlayout ll is used for making the list. But my problem is if there is only 1 item in the list , the timer will count down in each sec, but for more than one item, the dislpay wil be in the interval of 3 or more seconds.how can i make it display in each seconds??? Also I want to display in H:M:S format, with H,M,S synchronised. thanx in advance ANUR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 get System Endianess
In Sun Java I can get System endianess using the System.getProperty (sun.os.endian). How to get endianess of the system in Android? 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: Scheduling a repeating task and being notified
I did something similar, however, i did not use a BroadcastReceiver to get callbacks back from the service. Instead i used the RemoteCallbackList class: http://developer.android.com/reference/android/os/RemoteCallbackList.html No fiddling with intents and such. Just define a callback interface and bind to it in your client and call it in your service and you're done. It works like a breeze :-) On Mar 16, 6:16 am, BoD bodl...@gmail.com wrote: Replying myself, for future reference. For the scheduling part I used AlarmManager and a Service as mentioned before. For the notification back part I ended up using sendBroadcast from the service and a BroadcastReceiver on my Activity (registering/ unregistering it in onResume/onPause). It works fine. BoD On Mar 15, 7:22 pm, BoD bodl...@gmail.com wrote: Hi! I'm trying to find the correct way to do the following: . I have an activity with a button that starts a repeating task in the background. That is, if the user goes away from my activity, I want my task to still be scheduled and executed every x minutes. . I want a status TextView to be displayed on the activity, and if the task happens to start executing while my activity is showing, the TextView should be updated so the user can be aware of what's going on. So basically, is there a way to start a scheduled background repeating task and be notified when it is executed? From what I saw in the sample applications, I understand I'm supposed to use AlarmManager and a Service but I'm not sure about the notification part. Thanks a lot for your help. BoD- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Stopping autoscroll on scrolling up
Hi all, normally my scrollview scrolls down when text is added to the textview it wraps around. When I scroll up, I want to stop it from autoscrolling. I have boolean which says if it should scroll or not, but the problem I'm having it to work out if the scrollbar is at the bottom of the scrollview or not. If it is, then autoscroll should happen. I have a touchlistener which called onScroll or onFling when I scroll and I set the boolean there. I'm sure the solution is really simple but for the life of me, I can't work it out. How do I calculate if the scrollbar position is at the bottom of the scrollview? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: File Upload Question
Sure its not the MIME type not being defined correctly on the server? Try changing the extensions to txt, bin, etc and if you see a pattern where some work and others don't then thats the culprit. -- Android Academy: http://www.androidacademy.com On Mar 18, 8:36 pm, Bobbie bobbie.st...@gmail.com wrote: I have included my code below. I have the code working for image uploads, but was wondering how to get it to work with audio and video files? Please let me know if you have any suggestions/tutorials. // WORKS WITH JPEG FILE -- String existingFileName = /sdcard/dcim/ Camera/1225231027592.jpg; String existingFileName = /sdcard/Music/kryptonite.mp3; // DOES NOT WORK WITH MP3 FILE File uploadFile = new File(existingFileName); FileInputStream fileInputStream = new FileInputStream(uploadFile); String lineEnd = \r\n; String twoHyphens = --; String boundary = *; try { URL connectURL = new URL(http://www.mysite.com/uploads.php;); // connectURL is a URL object HttpURLConnection conn = (HttpURLConnection) connectURL.openConnection(); // allow inputs conn.setDoInput(true); // allow outputs conn.setDoOutput(true); // don't use a cached copy conn.setUseCaches(false); // use a post method conn.setRequestMethod(POST); // set post headers conn.setRequestProperty(Connection,Keep-Alive); conn.setRequestProperty(Content-Type,multipart/form- data;boundary=+boundary); // open data output stream DataOutputStream dos = new DataOutputStream(conn.getOutputStream ()); dos.writeBytes(twoHyphens + boundary + lineEnd); dos.writeBytes(Content-Disposition: form-data; name=\uploadedfile \;filename=\+existingFileName +\ + lineEnd); dos.writeBytes(lineEnd); // create a buffer of maximum size int bytesAvailable = fileInputStream.available(); int maxBufferSize = 1024; int bufferSize = Math.min(bytesAvailable, maxBufferSize); byte[] buffer = new byte[bufferSize]; // read file and write it into form... int bytesRead = fileInputStream.read(buffer, 0, bufferSize); while (bytesRead 0) { dos.write(buffer, 0, bufferSize); bytesAvailable = fileInputStream.available(); bufferSize = Math.min(bytesAvailable, maxBufferSize); bytesRead = fileInputStream.read(buffer, 0, bufferSize); } // send multipart form data necesssary after file data... dos.writeBytes(lineEnd); dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd); // close streams fileInputStream.close(); dos.flush(); InputStream is = conn.getInputStream(); int ch; StringBuffer b =new StringBuffer(); while( ( ch = is.read() ) != -1 ) { b.append( (char)ch ); } String s=b.toString(); dos.close(); } catch (MalformedURLException ex) { // Log.e(Tag, error: + ex.getMessage(), ex); } catch (IOException ioe) { // Log.e(Tag, error: + ioe.getMessage(), ioe); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem launching my own (camera) application on press of Camera-button
When i press the phone's camera button, both my application and the system's camera application are launched: - I press camera button - After a few seconds, my camera app appears and all looks good. - However, when i go back (back-button), i'm not brought back to where i was before. Instead, i'm brought (back) to the system's camera application. It looks like both camera apps are launched: The system's camera app is launched and on top of that my camera app is launched. I expected the activity-chooser to appear asking which camera app i'd like to start (with an option of making one the default). Here are some code snippets: Manifest: receiver android:name=.camera.CameraReceiver intent-filter action android:name=android.intent.action.CAMERA_BUTTON/ /intent-filter /receiver activity android:name=.camera.SmugCamera android:label=@string/app_name android:screenOrientation=landscape android:icon=@drawable/ camera android:clearTaskOnLaunch=true android:taskAffinity=smugdroid.task.camera intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.LAUNCHER / /intent-filter intent-filter action android:name=android.media.action.IMAGE_CAPTURE / category android:name=android.intent.category.DEFAULT / /intent-filter /activity CameraReceiver.java: public void onReceive(Context context, Intent intent) { KeyEvent event = (KeyEvent) intent.getParcelableExtra (Intent.EXTRA_KEY_EVENT); if (event == null) { return; } Intent i = new Intent(Intent.ACTION_MAIN); i.setClass(context, SmugCamera.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); } Do i have to change the onReceive method to use Intent.createChooser (...) instead? Or is there some other problem i'm not aware of? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: IWindowManager Not Available
Actually you can use some of them. Just add tools\lib\layoutlib.jar to the build path (Eclipse: right click the project, select Build Path/ Add Libraries. Click User Libraries, select Android libs, click Add JARs, browse to layoutlib.jar, click OK, Finish etc.) BR Lars Brange / User Library On Mar 19, 12:51 pm, AndRaj rajendran.b...@gmail.com wrote: Thanks for the reply... On Mar 19, 1:10 pm, Dianne Hackborn hack...@android.com wrote: Just because you can browse through the source and find something doesn't mean it is supported for application development. You can use the APIs in the SDK. Things that are not in the SDK were deliberately removed because they can change in arbitrary ways across versions of the platform. On Thu, Mar 19, 2009 at 12:25 AM, AndRaj rajendran.b...@gmail.com wrote: Really... Is it, as an application developer I can only use the ADK API's. But I can able to see the source of those API's, then I can use those classes in my applicaition right On Mar 19, 12:18 pm, Dianne Hackborn hack...@android.com wrote: No, you can't. It is internal implementation details of the platform. On Wed, Mar 18, 2009 at 11:59 PM, AndRaj rajendran.b...@gmail.com wrote: If I want to use those thing into my application. How can I use. Is there any way to do that. I want to create a object for the Iwindowmanager class. Ho can I do this... On Mar 19, 12:38 am, Dianne Hackborn hack...@android.com wrote: Those are not part of the SDK. On Wed, Mar 18, 2009 at 6:53 AM, Rajendrakumar C rajendran.b...@gmail.comwrote: Hi All, I downloaded the Android Source to my machine, I have seen the source code. In that I found Iwindowmanager, I activity manager and etc I managers... But when I try to use those things in my application. Those classes and even the packages also not avaiable. Can any one know how to import those classes into our applications. Best Regards, Rajendra -- 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. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: When the system launches a ResolverActivity or ChooserActivity it doesn't present...
On Mar 18, 11:16 pm, Dianne Hackborn hack...@android.com wrote: They use queryIntentActivities(), which only returns activities. In the package manager, the four component types are completely disjoint, and there is simply no call you can make that will give you a mix of them. Thanks for the info :). BTW, does this mean that services will tend to only get 'sticky' broadcast intents, intents intended explicitly for them from a given activity or service, and the occasional intent that isn't handle by any activity currently registered for it? Services are just completely different from receivers, which are different from activities. They don't receive any broadcasts at all. They certainly do when you register for them dynamically. Neither do activities. Ibidem Only receivers do. (One exception is that you can dynamically create a BroadcastReceiver and register it at runtime, but in that case it is not the component itself receiving the broadcast.) Presumably this difference only matters when the code in question is not yet running. In other words: - You launch activities with startActivity(). - You send to receivers with sendBroadcast(). - You bind to services with bindService() (and make them run with startService(), but semantically this is not the same at all as starting an activity; we probably should have found a different verb to use here). So - If I have a service that I want to run when certain things happen, just for an example I want it to run when someone clicks 'share' on the photo viewer menu. Presuming that service is not running, putting the proper intent filter in the service's manifest won't make a difference because services are never evaluated for intents, but a running service with a broadcast receiver inside of it would have its broadcast receiver evaluated, correct? I presume that if you want a service started up because of a standard broadcast message your service's package would also contain a broadcast receiver that would actually be what was triggered and it would in turn start the service, yes/no? So, to sum up, unless an intent is sent via broadcast, a running service has no approach to receive intents other than from binds and starts/stops, correct? Thanks, Hans --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] detect screensize
Hi, How do I get the current screen resolution (width and height)? Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get System Endianess
On Mar 19, 6:57 am, Luca Belluccini lucabellucc...@gmail.com wrote: In Sun Java I can get System endianess using the System.getProperty (sun.os.endian). How to get endianess of the system in Android? One possibility: java.nio.ByteOrder.nativeOrder(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: decompilar .dex
On Mar 18, 2:52 pm, Carlos Alberto tic...@gmail.com wrote: how to decompile a. dex for instructions in machine language anyone know of a disassembler. Dalvík in dex dexdump -d file. Works on .dex, .odex, and .apk/.jar with a classes.dex inside. dexdump is included on the device and in (most versions of) the SDK. There's also at least one 3rd-party tool (http://sourceforge.net/ projects/undx/). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: detect screensize
this may work but I've not tested it :-) getWindow().getWindowManager().getDefaultDisplay().getWidth(); getWindow().getWindowManager().getDefaultDisplay().getHeight(); Bob wrote: Hi, How do I get the current screen resolution (width and height)? Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Accuracy of sensors such as electronic compass
On Thu, Mar 19, 2009 at 3:49 AM, mscwd01 mscw...@gmail.com wrote: Just a quick question... I am now beginning an app which will use the compass and tilt sensors to determine a persons heading and line of sight. Can I assume the sensors on devices such as the G1 are fairly accurate or can I expect to run into problems such as the compass being 5-10 degress off etc? 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: Accuracy of sensors such as electronic compass
the compass measures the local magnetic field, and as such might be influenced by various electronics devices around the phone. For example, try using a compass application and move near/far a PC, and you'll see the pin tilting towards it sensibly. In other words, the accuracy of the compass is not very great and you should expect some deviation. I can't comment the exact range but deviations of 10% are not unheard of according to a few tests we made, when indoor an engineering lab. Of course, when outdoors, things should be a lot more accurate. On Thu, Mar 19, 2009 at 3:49 AM, mscwd01 mscw...@gmail.com wrote: Just a quick question... I am now beginning an app which will use the compass and tilt sensors to determine a persons heading and line of sight. Can I assume the sensors on devices such as the G1 are fairly accurate or can I expect to run into problems such as the compass being 5-10 degress off etc? 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: Could I release a new version of an app under a new name and port existing users for free?
Google does not have the private key which you would need to sign new apps. Moral of the story: Make sure your keystore is backed up off-site *before* you publish an app (If nothing else you can mail it to your web mail account as an attachment) Avraham Serour wrote: couldn't you ask google the key under you dev account? it is a registered account which the app was released under On Wed, Mar 18, 2009 at 6:21 PM, Sena Gbeckor-Kove s...@imkon.com mailto:s...@imkon.com wrote: Dude, that sucks so hard! The same thing happend to me 4 weeks ago, luckily I had backups though. Good luck. S On 18 Mar 2009, at 16:41, admin.androidsl...@googlemail.com mailto:admin.androidsl...@googlemail.com wrote: I ask this because my laptop was stolen along with my signing keys! I know I should have backed up - but the last thing I expected last Friday was for burglars to break into my house and steal my laptop (and most of my other electronics jewellery) - lesson learnt, but I need to plan what to do next! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Issue in android:duration in frame animation
It's normal, 15ms is the resolution of the clock on the G1. It's the same kind of resolution you can expect on desktop machines. On Thu, Mar 19, 2009 at 2:05 AM, Nithin nithin.war...@gmail.com wrote: Hi, In Frame Animation, in item tag, when i am putting android:duration=5, its not working. 15ms is the minimum which i tried and working. Is it a bug in Android ?. Anybody else got the same kind of problem. Thanks Nithin -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Issue in android:duration in frame animation
Note that the hardware also won't let you do more than 60 frames per second, so any duration lower than 15ms is useless. On Thu, Mar 19, 2009 at 8:26 AM, Romain Guy romain...@google.com wrote: It's normal, 15ms is the resolution of the clock on the G1. It's the same kind of resolution you can expect on desktop machines. On Thu, Mar 19, 2009 at 2:05 AM, Nithin nithin.war...@gmail.com wrote: Hi, In Frame Animation, in item tag, when i am putting android:duration=5, its not working. 15ms is the minimum which i tried and working. Is it a bug in Android ?. Anybody else got the same kind of problem. Thanks Nithin -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: File Upload Question
I'm currently not specifying a MIME type, do I need to do this? Here is the PHP code I'm using: ?php $target_path = uploads/; $target_path = $target_path.basename($_FILES['uploadedfile'] ['name']); if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo The file .basename($_FILES['uploadedfile']['name']). has been uploaded; } else { echo There was an error uploading the file, please try again!; } ? On Mar 19, 10:11 am, Carl Whalley carl.whal...@googlemail.com wrote: Sure its not the MIME type not being defined correctly on the server? Try changing the extensions to txt, bin, etc and if you see a pattern where some work and others don't then thats the culprit. -- Android Academy:http://www.androidacademy.com On Mar 18, 8:36 pm, Bobbie bobbie.st...@gmail.com wrote: I have included my code below. I have the code working for image uploads, but was wondering how to get it to work with audio and video files? Please let me know if you have any suggestions/tutorials. // WORKS WITH JPEG FILE -- String existingFileName = /sdcard/dcim/ Camera/1225231027592.jpg; String existingFileName = /sdcard/Music/kryptonite.mp3; // DOES NOT WORK WITH MP3 FILE File uploadFile = new File(existingFileName); FileInputStream fileInputStream = new FileInputStream(uploadFile); String lineEnd = \r\n; String twoHyphens = --; String boundary = *; try { URL connectURL = new URL(http://www.mysite.com/uploads.php;); // connectURL is a URL object HttpURLConnection conn = (HttpURLConnection) connectURL.openConnection(); // allow inputs conn.setDoInput(true); // allow outputs conn.setDoOutput(true); // don't use a cached copy conn.setUseCaches(false); // use a post method conn.setRequestMethod(POST); // set post headers conn.setRequestProperty(Connection,Keep-Alive); conn.setRequestProperty(Content-Type,multipart/form- data;boundary=+boundary); // open data output stream DataOutputStream dos = new DataOutputStream(conn.getOutputStream ()); dos.writeBytes(twoHyphens + boundary + lineEnd); dos.writeBytes(Content-Disposition: form-data; name=\uploadedfile \;filename=\+existingFileName +\ + lineEnd); dos.writeBytes(lineEnd); // create a buffer of maximum size int bytesAvailable = fileInputStream.available(); int maxBufferSize = 1024; int bufferSize = Math.min(bytesAvailable, maxBufferSize); byte[] buffer = new byte[bufferSize]; // read file and write it into form... int bytesRead = fileInputStream.read(buffer, 0, bufferSize); while (bytesRead 0) { dos.write(buffer, 0, bufferSize); bytesAvailable = fileInputStream.available(); bufferSize = Math.min(bytesAvailable, maxBufferSize); bytesRead = fileInputStream.read(buffer, 0, bufferSize); } // send multipart form data necesssary after file data... dos.writeBytes(lineEnd); dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd); // close streams fileInputStream.close(); dos.flush(); InputStream is = conn.getInputStream(); int ch; StringBuffer b =new StringBuffer(); while( ( ch = is.read() ) != -1 ) { b.append( (char)ch ); } String s=b.toString(); dos.close(); } catch (MalformedURLException ex) { // Log.e(Tag, error: + ex.getMessage(), ex); } catch (IOException ioe) { // Log.e(Tag, error: + ioe.getMessage(), ioe); } --~--~-~--~~~---~--~~ You received this message because you are
[android-developers] onResume called while device is off for hours??
Hi, all. I have documented cases of an activity's onResume method getting called HOURS after the G1 is - well, not asleep, since a WakeLock is in use, but idle with the screen off (indeed, it had been off in one case for 6+ hours). Can anyone here explain how that might have happened? Thanks. Marc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: File Upload Question
Nevermind, I'm a moron. I understand what you are talking about now. Bobbie On Mar 19, 11:38 am, Bobbie bobbie.st...@gmail.com wrote: I'm currently not specifying a MIME type, do I need to do this? Here is the PHP code I'm using: ?php $target_path = uploads/; $target_path = $target_path.basename($_FILES['uploadedfile'] ['name']); if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo The file .basename($_FILES['uploadedfile']['name']). has been uploaded;} else { echo There was an error uploading the file, please try again!;} ? On Mar 19, 10:11 am, Carl Whalley carl.whal...@googlemail.com wrote: Sure its not the MIME type not being defined correctly on the server? Try changing the extensions to txt, bin, etc and if you see a pattern where some work and others don't then thats the culprit. -- Android Academy:http://www.androidacademy.com On Mar 18, 8:36 pm, Bobbie bobbie.st...@gmail.com wrote: I have included my code below. I have the code working for image uploads, but was wondering how to get it to work with audio and video files? Please let me know if you have any suggestions/tutorials. // WORKS WITH JPEG FILE -- String existingFileName = /sdcard/dcim/ Camera/1225231027592.jpg; String existingFileName = /sdcard/Music/kryptonite.mp3; // DOES NOT WORK WITH MP3 FILE File uploadFile = new File(existingFileName); FileInputStream fileInputStream = new FileInputStream(uploadFile); String lineEnd = \r\n; String twoHyphens = --; String boundary = *; try { URL connectURL = new URL(http://www.mysite.com/uploads.php;); // connectURL is a URL object HttpURLConnection conn = (HttpURLConnection) connectURL.openConnection(); // allow inputs conn.setDoInput(true); // allow outputs conn.setDoOutput(true); // don't use a cached copy conn.setUseCaches(false); // use a post method conn.setRequestMethod(POST); // set post headers conn.setRequestProperty(Connection,Keep-Alive); conn.setRequestProperty(Content-Type,multipart/form- data;boundary=+boundary); // open data output stream DataOutputStream dos = new DataOutputStream(conn.getOutputStream ()); dos.writeBytes(twoHyphens + boundary + lineEnd); dos.writeBytes(Content-Disposition: form-data; name=\uploadedfile \;filename=\+existingFileName +\ + lineEnd); dos.writeBytes(lineEnd); // create a buffer of maximum size int bytesAvailable = fileInputStream.available(); int maxBufferSize = 1024; int bufferSize = Math.min(bytesAvailable, maxBufferSize); byte[] buffer = new byte[bufferSize]; // read file and write it into form... int bytesRead = fileInputStream.read(buffer, 0, bufferSize); while (bytesRead 0) { dos.write(buffer, 0, bufferSize); bytesAvailable = fileInputStream.available(); bufferSize = Math.min(bytesAvailable, maxBufferSize); bytesRead = fileInputStream.read(buffer, 0, bufferSize); } // send multipart form data necesssary after file data... dos.writeBytes(lineEnd); dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd); // close streams fileInputStream.close(); dos.flush(); InputStream is = conn.getInputStream(); int ch; StringBuffer b =new StringBuffer(); while( ( ch = is.read() ) != -1 ) { b.append( (char)ch ); } String s=b.toString(); dos.close(); } catch (MalformedURLException ex) { // Log.e(Tag, error: + ex.getMessage(), ex);
[android-developers] Polite discussion of lite/trial vs pro distribution
First I will explain my situation. Then, I would greatly appreciate constructive dialog on how other developers feel similar situations should be managed. I wrote a simple app in November. I offered it for free on the Market for two reasons. One, Google hadn't implemented paid apps yet, so I had no choice. Two, by my own admission, v1.0 was too simple too garner payment. However, in the app's documentation, I requested donations toward future development. Out of thousands of installs, I received nothing. This week I finished a considerably fancier version of the program. Given hundreds of hours of unpaid development, I decided to charge a few bucks for the new version. I split the app into lite and pro versions. The lite version has all the new fancy features enabled but is limited in how large a document can be created (spread sheet, I limited the number of rows/cols, admittedly unlimited in the earlier version). The pro version went to Market as a new app, the lite version on top of the old app to retain the long feedback history. Since the Market provides no way to downgrade, I put the old unlimited version on my website and put directions in the new lite version in multiple places explaining how to revert to the old version. Thus, any user dissatisfied with the rol/col limit could restore the EXACT functionality they had before upgrading to the lite version. Incidentally, the 325 character blurb allotted on the Market was insufficient to list the new features and the lite version's limitation and the caveat that the lite version could be reverted through my website. I simply could not communicate these facts to users to help them decide whether to upgrade or what to expect after upgrading. The complaints about the new lite version have been diverse. Most pertinent to this discussion are complaints that the lite version now limits the rows/cols where the previous version didn't. I find such complaints unjustifiable since I explicitly permit reversion. I literally don't see what they have to complain about. Another irksome genre of complaints is that the program is still too simple to ask any money for at all. I am infuriated. It costs less than an ice cream cone. So, as discussion, how would other developers handle this situation: initial app is simple so offered for free, later version is complex so split into lite/pro. You don't want to limit the lite version by not showing the new fancy features, so the limitation must be something else, a time limit, a forced delay splash screen, something. I chose limited rows/cols on a spreadsheet app, but also permitted reversion to the old unlimited version. How would other developers implement an increase in complexity, charge for it, yet provide a lite version that doesn't anger users of a previously unlimited, but also much more simplistic app? Instead of flaming me where you think I made mistakes, please just open the floor for honest discussion. I'm trying to figure out how to do this properly. A lot of us are probably trying to figure out the same thing. 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: Polite discussion of lite/trial vs pro distribution
I don't think anyone would flame you on this list. You had a free app, you made some improvements which cost you this and that hours of hard work, angry wife, etc :) and you want a reward for that - how this can be wrong? What I'd do is have the lite version display a dialog on 1st startup, showing a 1-time notice explaining everything you've just said in a way that users can understand, including instructions on how to download and install the previous full-featured free version from your web site (explaining to users that they have to enable apps from 2rd party sites, menu paths to do that, etc.). Don't forget to mention that it can't possibly be your fault that an imbecile at Google decided that an app's description could fit in 325 chars, and express your confidence that the issue will be fixed by Google in a timely manner, and asking users politely to file this is a bug on the Market's forums :) Cheers On Thu, Mar 19, 2009 at 6:18 PM, Keith Wiley kbwi...@gmail.com wrote: First I will explain my situation. Then, I would greatly appreciate constructive dialog on how other developers feel similar situations should be managed. I wrote a simple app in November. I offered it for free on the Market for two reasons. One, Google hadn't implemented paid apps yet, so I had no choice. Two, by my own admission, v1.0 was too simple too garner payment. However, in the app's documentation, I requested donations toward future development. Out of thousands of installs, I received nothing. This week I finished a considerably fancier version of the program. Given hundreds of hours of unpaid development, I decided to charge a few bucks for the new version. I split the app into lite and pro versions. The lite version has all the new fancy features enabled but is limited in how large a document can be created (spread sheet, I limited the number of rows/cols, admittedly unlimited in the earlier version). The pro version went to Market as a new app, the lite version on top of the old app to retain the long feedback history. Since the Market provides no way to downgrade, I put the old unlimited version on my website and put directions in the new lite version in multiple places explaining how to revert to the old version. Thus, any user dissatisfied with the rol/col limit could restore the EXACT functionality they had before upgrading to the lite version. Incidentally, the 325 character blurb allotted on the Market was insufficient to list the new features and the lite version's limitation and the caveat that the lite version could be reverted through my website. I simply could not communicate these facts to users to help them decide whether to upgrade or what to expect after upgrading. The complaints about the new lite version have been diverse. Most pertinent to this discussion are complaints that the lite version now limits the rows/cols where the previous version didn't. I find such complaints unjustifiable since I explicitly permit reversion. I literally don't see what they have to complain about. Another irksome genre of complaints is that the program is still too simple to ask any money for at all. I am infuriated. It costs less than an ice cream cone. So, as discussion, how would other developers handle this situation: initial app is simple so offered for free, later version is complex so split into lite/pro. You don't want to limit the lite version by not showing the new fancy features, so the limitation must be something else, a time limit, a forced delay splash screen, something. I chose limited rows/cols on a spreadsheet app, but also permitted reversion to the old unlimited version. How would other developers implement an increase in complexity, charge for it, yet provide a lite version that doesn't anger users of a previously unlimited, but also much more simplistic app? Instead of flaming me where you think I made mistakes, please just open the floor for honest discussion. I'm trying to figure out how to do this properly. A lot of us are probably trying to figure out the same thing. 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: Polite discussion of lite/trial vs pro distribution
My solution would be to leave the old version on the market, then, under a new name, have the lite and pro versions. Put in the 325 char description that the old app is not supported and people may want to look at the new app name. Al. Keith Wiley wrote: First I will explain my situation. Then, I would greatly appreciate constructive dialog on how other developers feel similar situations should be managed. I wrote a simple app in November. I offered it for free on the Market for two reasons. One, Google hadn't implemented paid apps yet, so I had no choice. Two, by my own admission, v1.0 was too simple too garner payment. However, in the app's documentation, I requested donations toward future development. Out of thousands of installs, I received nothing. This week I finished a considerably fancier version of the program. Given hundreds of hours of unpaid development, I decided to charge a few bucks for the new version. I split the app into lite and pro versions. The lite version has all the new fancy features enabled but is limited in how large a document can be created (spread sheet, I limited the number of rows/cols, admittedly unlimited in the earlier version). The pro version went to Market as a new app, the lite version on top of the old app to retain the long feedback history. Since the Market provides no way to downgrade, I put the old unlimited version on my website and put directions in the new lite version in multiple places explaining how to revert to the old version. Thus, any user dissatisfied with the rol/col limit could restore the EXACT functionality they had before upgrading to the lite version. Incidentally, the 325 character blurb allotted on the Market was insufficient to list the new features and the lite version's limitation and the caveat that the lite version could be reverted through my website. I simply could not communicate these facts to users to help them decide whether to upgrade or what to expect after upgrading. The complaints about the new lite version have been diverse. Most pertinent to this discussion are complaints that the lite version now limits the rows/cols where the previous version didn't. I find such complaints unjustifiable since I explicitly permit reversion. I literally don't see what they have to complain about. Another irksome genre of complaints is that the program is still too simple to ask any money for at all. I am infuriated. It costs less than an ice cream cone. So, as discussion, how would other developers handle this situation: initial app is simple so offered for free, later version is complex so split into lite/pro. You don't want to limit the lite version by not showing the new fancy features, so the limitation must be something else, a time limit, a forced delay splash screen, something. I chose limited rows/cols on a spreadsheet app, but also permitted reversion to the old unlimited version. How would other developers implement an increase in complexity, charge for it, yet provide a lite version that doesn't anger users of a previously unlimited, but also much more simplistic app? Instead of flaming me where you think I made mistakes, please just open the floor for honest discussion. I'm trying to figure out how to do this properly. A lot of us are probably trying to figure out the same thing. Thanks. -- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: decompilar .dex
Here is another --- never used undx, but Gabbor did a nice job with dedexer; http://dedexer.sourceforge.net/ On Mar 19, 10:48 am, fadden fad...@android.com wrote: On Mar 18, 2:52 pm, Carlos Alberto tic...@gmail.com wrote: how to decompile a. dex for instructions in machine language anyone know of a disassembler. Dalvík in dex dexdump -d file. Works on .dex, .odex, and .apk/.jar with a classes.dex inside. dexdump is included on the device and in (most versions of) the SDK. There's also at least one 3rd-party tool (http://sourceforge.net/ projects/undx/). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 WifiManager or WifiConfiguration.Status
Hi all, Does anyone have an idea how use those Class(WifiManager or WifiConfiguration.Status) this is my code but doesn't work even if the manifestxml has all the necessary permession WifiManager manager= (WifiManager) getSystemService (Context.WIFI_SERVICE); if( manager.isWifiEnabled()){ ..} else{ . } Thx ; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 config G1 to make both browser and MMS work?
If I leave apn type to blank, is that same to default? Actually I have tested with cmnet apn type blank, and cmwap apn type mms, it's not working either. On Mar 19, 3:18 am, David Turner di...@android.com wrote: when you want to use different APNs for both data and MMS, you need to set the apn type field for the system to make a difference between them and use them both. use apn type=default for the data APN. and apn type=mms for the MMS one. Hope this helps On Wed, Mar 18, 2009 at 12:38 AM, FayGU gqm...@gmail.com wrote: I have a G1 phone and use it in mainland China. But I can't config it to work with browser and MMS at the same time. However with different APN, the browser and MMS can work seperately. For browser, I use following APN config: --- name:cmnet apn: cmnet proxy:blank port:blank username:blank password:blank server:blank mmsc:blank mms proxy:blank mms port:blank mcc:460 mnc:00 apn type:blank -- For MMS, I use following APN config: -- name:cmwap apn: cmwap proxy:blank port:blank username:blank password:blank server:blank mmsc:http://mmsc.monternet.com mms proxy:010.000.000.172 mms port:80 mcc:460 mnc:00 apn type:blank --- When above two APNs both exists, only browser can work. MMS doesn't work any more. Does any google export know that how to config G1 to make both browser and MMS work? If it's a known issue, is there any roadmap to fix it? Thanks!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] openInputStream problem
Hi, I'm trying to read an image (taken on camera) that I need to POST to a server. I'm using the following code: CODE OutputStream os = urlConn.getOutputStream(); ContentResolver cR = this.getContentResolver(); InputStream is = cR.openInputStream(photoUri); BufferedInputStream buf = new BufferedInputStream(is); int readBytes = 0; while ((readBytes = buf.read()) != -1){ os.write(readBytes); } /CODE But when I debug, I find that readBytes never gets a -1 (i.e eof). Can anyone tell what is wrong here? Is there any other alternative to read photos taken by the phone camera (get a stream or bytes) to be POSTed to services etc... Cheers, Tej --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Long Click Event of Button
Hello all, I have a problem. I use Click and Long Click Event in a button. Everything's seems fine. However; whenever a user long click the button, the click event also triggers. I couldn't find what I am doing wrong. On the other hand, I noticed something might highly relevant showDialog function returns before the user selects in the popup menu. this is the long click function: @Override public boolean onLongClick(View view) { if(SMBGuesstheNumber.bDisplayFlagList) { theActiveButton = (Button) view; showDialog(R.id.display_flaglist); } return false; } and this is the dialog handler: case R.id.display_flaglist: AlertDialog listdialog = new AlertDialog.Builder (GfxGuesstheNumber.this) .setIcon(R.drawable.droid) .setTitle(R.string.dialog_flaglist) .setItems(R.array.entries_flaglist, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { switch(whichButton){ case 0: theActiveButton.setTextColor(Color.BLACK); break; case 1: theActiveButton.setTextColor(Color.GREEN); break; case 2: theActiveButton.setTextColor(Color.YELLOW); break; case 3: theActiveButton.setTextColor(Color.RED); break; } } }) .create(); return listdialog; Any comment will be helpful. Thank you, Omer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Unified Database Populating Solution
On Mar 14, 2:17 am, Dianne Hackborn hack...@android.com wrote: On Tue, Mar 10, 2009 at 6:36 PM, Justin Allen Jaynes jus...@ragblue.comwrote: 1. Why is there a file size limit on resources in the raw or assets folders (such a small limit, that is)? Assets are normally stored compressed, so currently opening it requires uncompressing into an in-memory buffer. From that perspective, 1MB is pretty big -- it's over 1% of the total memory available to the kernel and all apps on the G1! To get around this, you can store your file uncompressed -- the new aapt has an option to turn off compression for custom fie extensions -- so you can read it directly from the .apk as an AssetFileDescriptor. It would also be nice to support streaming access that uncompresses while you read... patches welcome. :) 2. Does this limit apply to all raw and asset files, or only to files that you get an input stream for? It is compressed files. PNGs, MP3s, etc are not compressed in the .apk since their data is already compressed. 2. Can I change the file size limit, or is it a fixed feature? Fixed. 3. Is it appropriate to split a raw file into two or three files and read them in as three consecutive separate streams, all output to one file? Or is this a bad practice since they must have implemented a file size limit for storage conservation reasons? Sure, that is fine. 4. Can I delete the resources from raw or assets at runtime (or is this totally invalid since the compiler sets up R.raw to have methods representing the files) to save space? Not at all, sorry. You .apk is completely read-only. 5. How big is too big an application? (mine is a large word dictionary and the whole app after first run takes 4 meg) Given the storage space on the G1, that is pretty big -- 5-10% of the space available to all applications, their private data (Gmail messages and such), and the browser cache. That size of an .apk will probably reduce the number of users you have, depending on how valuable people find the app to be. -- 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. All such questions should be posted on public forums, where I and others can see and answer them. How do we specify to not compress some resource data in order to break the 1MB limitation using Eclipse ? Carlo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator fails at boot up
hello everyone, I am using android-sdk-windows-1.1_r1. when i start the emulator the first screen appears and then it freezes. I dont get the home screen even if i wait for 10 min. In ddms log cat i get these messages 03-19 09:08:18.291: INFO/DEBUG(20): debuggerd: Feb 5 2009 15:37:59 03-19 09:08:21.432: ERROR/mountd(19): could not read initial mass storage state 03-19 09:08:22.370: ERROR/flash_image(27): can't find recovery partition 03-19 09:08:23.525: DEBUG/RILD(21): overriding with -s /dev/socket/ qemud_gsm 03-19 09:08:39.041: DEBUG/AndroidRuntime(22): AndroidRuntime START 03-19 09:08:39.051: DEBUG/AndroidRuntime(22): CheckJNI is ON 03-19 09:08:40.362: ERROR/dalvikvm(22): Can't open dex cache '/data/ dalvik-cache/sys...@framework@core@classes.dex': No such file or directory 03-19 09:08:40.362: INFO/dalvikvm(22): Unable to open or create cache for /system/framework/core.jar 03-19 09:08:40.362: DEBUG/dalvikvm(22): Failed on '/system/framework/ core.jar' (boot=1) 03-19 09:08:40.374: DEBUG/dalvikvm(22): VM cleaning up 03-19 09:08:40.381: DEBUG/dalvikvm(22): LinearAlloc 0x0 used 4100 of 4194304 (0%) 03-19 09:08:40.431: WARN/dalvikvm(22): JNI_CreateJavaVM failed 03-19 09:08:40.431: ERROR/AndroidRuntime(22): JNI_CreateJavaVM failed 03-19 09:08:45.991: INFO/(23): ServiceManager: 0xaab8 03-19 09:08:46.508: INFO/AudioFlinger(23): AudioFlinger's main thread ready to run. 03-19 09:08:46.921: INFO/CameraService(23): CameraService started: pid=23 03-19 09:08:47.681: DEBUG/AndroidRuntime(47): AndroidRuntime START 03-19 09:08:53.177: DEBUG/dalvikvm(51): Failed on '/system/framework/ core.jar' (boot=1) Pls tell me the reason for errors, thank you in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] catching a trackball event
I have tried all day to capture a trackball event in a View. Basically I want to use the trackball to move a Sprite in a 2D game left and right. The onTouchEvent works perfectly well in the View to move the Sprite with my finger but it would be nicer and cleaner to use the trackball. The onTouchEvent looks like: @Override public boolean onTouchEvent (MotionEvent motionEvent) { int action = motionEvent.getAction (); int currentX = (int) motionEvent.getX (); int currentY = (int) motionEvent.getY (); if (action == MotionEvent.ACTION_MOVE) { do stuff here and it works great } return true; } The onTrackballEvent looks like: @Override public boolean onTrackballEvent (MotionEvent motionEvent) { int action = motionEvent.getAction (); int currentX = (int) motionEvent.getX (); int currentY = (int) motionEvent.getY (); if (action == MotionEvent.ACTION_MOVE) { do stuff here and it never gets here } return true; } In the debugger I can never get a trackball event to enter the above code. I also tried setting up an onKey listener in the View that looks like: this.setOnKeyListener ( new OnKeyListener () { public boolean onKey (View view, int keyCode, KeyEvent keyEvent) { //int currentX = (int) motionEvent.getX (); //int currentY = (int) motionEvent.getY (); if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { do stuff } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { do stuff } return true; } }); Can anyone provide me with a simple example that uses the trackball to move something in a View in a 2D type game world (not a menu or UI type of example)? Or can someone explain what I'm not doing. Thanks so much for any help you can give me. PS - I did try and study the LunarLander code and I don't see what I'm doing differently. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] content://sms/sent Read SMS
Hi, I'm having a problem reading the SMS messages from the device. When acquiring a content provider for the URI content://sms/inbox - everything is fine, I read the person column to find the foreign key into the people table and I can ultimately reach the contact and their name. However, I also want to traverse the sent messages too. When reading from content://sms/sent, the person field always appears to be 0. Is this the correct field to be reading to locate the recipient data for the sent message? If so - why is it always 0. All my testing has been done in the emulator and I've created 3 contacts. I've sent messages to those contacts from the emulator in the normal manner you'd send a message. Just to reiterate, I can see the 4 sent messages and read the associated body text. My problem is that I can't seem to read the person ID and hence I can't work out who the recipient is. Any help would be greatly appreciated. Many thanks, Martin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there a Color Picker widget in Android?
Hi, Is there a Color Picker widget which developer can call in Android? 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: Accessing contact' email addresses
I think you can try ContactMethods.DATA,this field contains the email address. Good luck! On Mar 18, 2:10 pm, Umair knowledgeinter...@gmail.com wrote: Posted: Tue Mar 17, 2009 11:47 am Post subject: Accessing contact' email addresses Hi! I'm developing an application in which I need to display user a list of contacts and their email addresses so that user can choose one of them. I've got some help from Internet and I'm able to display a list of contacts and their number by the following code: --- JAVA CODE --- public class ShowContacts extends ExpandableListActivity implements OnChildClickListener { private int mGroupIdColumnIndex; private String mPhoneNumberProjection[] = new String[] { People.Phones._ID, People.NUMBER // CHANGE HERE }; private ExpandableListAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Query for people Cursor groupCursor = managedQuery(People.CONTENT_URI, new String[] {People._ID, People.NAME}, null, null, null); // Cache the ID column index mGroupIdColumnIndex = groupCursor.getColumnIndexOrThrow (People._ID); // Set up our adapter mAdapter = new MyExpandableListAdapter(groupCursor, this, android.R.layout.simple_expandable_list_item_1, android.R.layout.simple_expandable_list_item_1, new String[] {People.NAME}, // Name for group layouts new int[] {android.R.id.text1}, new String[] {People.NUMBER}, // AND CHANGE HERE new int[] {android.R.id.text1}); setListAdapter(mAdapter); } public class MyExpandableListAdapter extends SimpleCursorTreeAdapter { public MyExpandableListAdapter(Cursor cursor, Context context, int groupLayout, int childLayout, String[] groupFrom, int[] groupTo, String[] childrenFrom, int[] childrenTo) { super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childrenFrom, childrenTo); } @Override protected Cursor getChildrenCursor(Cursor groupCursor) { // Given the group, we return a cursor for all the children within that group // Return a cursor that points to this contact's phone numbers Uri.Builder builder = People.CONTENT_URI.buildUpon(); ContentUris.appendId(builder, groupCursor.getLong (mGroupIdColumnIndex)); builder.appendEncodedPath (People.Phones.CONTENT_DIRECTORY); Uri phoneNumbersUri = builder.build(); return managedQuery(phoneNumbersUri, mPhoneNumberProjection, null, null, null); } } @Override public boolean onChildClick(android.widget.ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { AlertDialog dialog = new AlertDialog.Builder (ShowContacts.this) .setMessage(((TextView) v).getText().toString()) .setPositiveButton(OK, null).create(); dialog.show(); return true; } } --- What I need now is how to replace numbers by email addresses. What I need to change is People.NUMBER at a couple of places but I'm not able to find any replacement. There is a field called People.PRIMARY_EMAIL_ID but that returns the ID of the email rather than the actuall email. Kindly guide me what am I missing. Big thanks in advance!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Extra Icons in Menu
Hi, When I run my app, I see about 8 or 9 icons in the main phone menu. One is to run the app, and the others actually run activities within the app. I want there to only be one icon for users. Any ideas as to why this is happening? My code is structured similar to examples from the book Android - A Programmers Guide by JF DiMarzio. How do I hide the other icons so users have to start at the main menu screen? Thanks, Grant _ Windows Live™ Groups: Create an online spot for your favorite groups to meet. http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] regarding android screenshot source code
hello.. we are trying to use the screen shot source code in our project, we tried to compile screenshot code on eclipse, there is a write function used which uses renderd image as one of its parameter , but the one which is being passed is buffered image, and we are getting an error .. so kinldy help in this regard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Handling Sensor Events and optimal way of using SensorGestureDetector?
Hi All My dbt is that lets say I have the applications like Gallery and Calendar which want to use Sensor input as another input apart from touch i/p and key i/p and for this there is a utility say SensorGestureDetector(Example SensorGestureDetector: http://code.google.com/p/openintents/source/browse/trunk/ShoppingList/src/org/openintents/hardware/SensorGestureDetector.java?r=1106) , then which of the 2 ways u suggest me to use: 1) we use it the way we use GestureDetector, extending itsonSimpleGestureListener and implementig only the gestures specific to the application. This is simple and straight 2) we have a service to which application can bind and the service will call back when the getsure happens to the application which has been binded. So this service will listen to the sensor events in 1st place and implement the SensorGestureDetectors listeners which in turn would call the applications method and then the application can decide what to do on that specific gesture. Thanks and Regards, Learning_Android. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android and Java Security Running Together
Hi, do you have any official publications on this. This sounds very interesting. Good look in progressing. BR, Aubrey Daniel Janev wrote: Hi Guys, I've just succeeded in changing the security model of the dalvik VM! So I've run an OSGi implementation on the android platform with security. Of course it does not work without some hacks for file access and so on. But mainly the java security model works good enough. If anyone is interested in this I can share with you what have to be done. P.S. So, it seems that I was the first in the world to run it :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Getting current on-screen GUI objects?
Hello all, Is there any way for an Android application to retrieve some sort of Collection object that contains references to all of the GUI elements which are currently on the phone's screen? This could be very useful for testing purposes and so on. If I have overlooked a well-known class or library, please let me know. 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] How do I cleanup my Android application/Market?
Hi In the process of updating some software on my ADP1 using Market I apparently created an inconsistent state which I cannot resolve. I have reported it as a bug (http://code.google.com/p/android/issues/ detail?id=2238) but to make a long story short. When I start Market the application is marked as Free but when I try to install it Android says Download unsuccessful. Does anyone knopw how to clean up any files/databases/references/... to applications which has been uninstalled so I can start over? Thanks Andrew Engels Rump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 does LocationManager.requestLocationUpdates interact with power management?
I'm looking at writing an application which includes functionality similar to Google's My Tracks (with some additional data collection support and a specialized user interface). If periodic location updates are requested with a minimum update delay provided but the phone goes to sleep either by timeout or explicit user request, will the phone wake up every minTime ms to poll? If not, do I need to grab PARTIAL_WAKE_LOCK for my application to be able to record the user's path, or will a more conservative approach (such as setting an alarm to run every minTime ms, waking on the alarm, keeping the CPU awake until a location update is received, and then going back to sleep) work? Is there a better way to periodically poll position without running more of the phone hardware than necessary which I haven't thought of yet? Do I need to be concerned about GPS reacquisition time if the CPU has been off since the most recent query? 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] Using WifiManager or WifiConfiguration.Status
Hi all, Does anyone have an idea how use those Class(WifiManager or WifiConfiguration.Status) this is my code but doesn't work even if the manifestxml has all the necessary permession WifiManager manager= (WifiManager) getSystemService (Context.WIFI_SERVICE); if( manager.isWifiEnabled()){ ..} else{ . } Thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: detect screensize
You almost certainly don't want to do that. It does not tell you the actually available space (taking into account any screen decorations that may or may not be showing), just the raw size. You should always use the view hierarchy layout system to place your UI. On Thu, Mar 19, 2009 at 9:36 AM, Bob bshumsk...@yahoo.com wrote: Thanks, that seems to work. On Mar 19, 9:54 am, Pd lotusscr...@gmail.com wrote: this may work but I've not tested it :-) getWindow().getWindowManager().getDefaultDisplay().getWidth(); getWindow().getWindowManager().getDefaultDisplay().getHeight(); Bob wrote: Hi, How do I get the current screen resolution (width and height)? Thanks, Bob -- 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. 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: Getting current on-screen GUI objects?
You can look at the hierarchyviewer app. Note that this only works on dev phones for security reasons. On Thu, Mar 19, 2009 at 8:43 AM, adil.b adil.bukh...@gmail.com wrote: Hello all, Is there any way for an Android application to retrieve some sort of Collection object that contains references to all of the GUI elements which are currently on the phone's screen? This could be very useful for testing purposes and so on. If I have overlooked a well-known class or library, please let me know. Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Handling Sensor Events and optimal way of using SensorGestureDetector?
Didn't we just have this discussion on another list? 1. This class is not part of the platform at this point, it is stuff people are working on separate and you can just use if you want. 2. Statically link the class into your platform and use it, as has already been suggested. On Thu, Mar 19, 2009 at 2:32 AM, Learning_Android nidhiagarwal.l...@gmail.com wrote: Hi All My dbt is that lets say I have the applications like Gallery and Calendar which want to use Sensor input as another input apart from touch i/p and key i/p and for this there is a utility say SensorGestureDetector(Example SensorGestureDetector: http://code.google.com/p/openintents/source/browse/trunk/ShoppingList/src/org/openintents/hardware/SensorGestureDetector.java?r=1106 ) , then which of the 2 ways u suggest me to use: 1) we use it the way we use GestureDetector, extending itsonSimpleGestureListener and implementig only the gestures specific to the application. This is simple and straight 2) we have a service to which application can bind and the service will call back when the getsure happens to the application which has been binded. So this service will listen to the sensor events in 1st place and implement the SensorGestureDetectors listeners which in turn would call the applications method and then the application can decide what to do on that specific gesture. Thanks and Regards, Learning_Android. -- 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. 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: catching a trackball event
Make sure your view has input focus. On Wed, Mar 18, 2009 at 7:51 PM, djr ryand...@gmail.com wrote: I have tried all day to capture a trackball event in a View. Basically I want to use the trackball to move a Sprite in a 2D game left and right. The onTouchEvent works perfectly well in the View to move the Sprite with my finger but it would be nicer and cleaner to use the trackball. The onTouchEvent looks like: @Override public boolean onTouchEvent (MotionEvent motionEvent) { int action = motionEvent.getAction (); int currentX = (int) motionEvent.getX (); int currentY = (int) motionEvent.getY (); if (action == MotionEvent.ACTION_MOVE) { do stuff here and it works great } return true; } The onTrackballEvent looks like: @Override public boolean onTrackballEvent (MotionEvent motionEvent) { int action = motionEvent.getAction (); int currentX = (int) motionEvent.getX (); int currentY = (int) motionEvent.getY (); if (action == MotionEvent.ACTION_MOVE) { do stuff here and it never gets here } return true; } In the debugger I can never get a trackball event to enter the above code. I also tried setting up an onKey listener in the View that looks like: this.setOnKeyListener ( new OnKeyListener () { public boolean onKey (View view, int keyCode, KeyEvent keyEvent) { //int currentX = (int) motionEvent.getX (); //int currentY = (int) motionEvent.getY (); if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { do stuff } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { do stuff } return true; } }); Can anyone provide me with a simple example that uses the trackball to move something in a View in a 2D type game world (not a menu or UI type of example)? Or can someone explain what I'm not doing. Thanks so much for any help you can give me. PS - I did try and study the LunarLander code and I don't see what I'm doing differently. -- 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. 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: onResume called while device is off for hours??
If something is starting an activity while the screen is off, it can happen. If the screen is off during that time, it should quickly be re-paused though. On Thu, Mar 19, 2009 at 8:39 AM, Marc gram...@gmail.com wrote: Hi, all. I have documented cases of an activity's onResume method getting called HOURS after the G1 is - well, not asleep, since a WakeLock is in use, but idle with the screen off (indeed, it had been off in one case for 6+ hours). Can anyone here explain how that might have happened? Thanks. Marc -- 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. 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] shared Jar files between different project
Hi guys, I meet a problem when using jar files, I simplify my question by below examples: test.jar include a class of com.example.test.class eclipse project A using test.jar and declare test1 extend from com.example.test eclipse project B using test.jar too and declare test2 extend from com.example.test Both project build sucessfull. Then I try to using reflection in project B to instaniance a instance of test1 Class ? c = tmpCtxt.getClassLoader().loadClass (com.example.A.test1); test tmp = (test) c.newInstance() // it throw java.lang.ClassCastException. (but if I put com.example.test.class into frameworks/base, it's OK) Anyidea about this issue? Any advice is appreciated. Regards, Jove --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 open files from browser or mail or filebrowser or so with my application?
Hi, how can I open all files (for example all files with mime type application/msword or application/msexcel) with my Application? And how can I read the content of the files? Are there any examples? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] adb version failed
hello every one.. im new to android... i have installed android in eclipse every thing was going fine but at last when i gave path of android sdk it is giving error as ' adb version failed!' error while loading shared libraries:libncurses.so.5:wrong ELF class:ELFCLASS64. im not able to rectify this error please somebody do help me. im waiting for the solution to this problem. where i have gone wrong... thanx in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Signal strength seen by the G1 phone
Hello, This is my first post here. Please let me know if I should be posting this question elsewhere or if I should be asking the question in a different manner. I am trying to obtain the signal strength seen by the G1 phone. I have implemented a PhoneStateListener and onSignalStrengthChanged (int asu). It looks like I am seeing four returned asu values (2, 6, 12 and 25). I believe that the mapping of asu to dBm is as follows: -113dBm + 2*asu. Therefore, it looks like the G1 phone is reporting dBm values of -109, -101, -89 and -63. Also, I see that the signal strength icon used by the G1 has four bars (I am assuming that each bar corresponds to one of the 2, 6, 12 and 25 asu values). Question: does anyone know if it is possible to obtain signal strength (either as an asu measure or a direct dBm measure) with a higher level of granularity (that is, for example, in single asu steps or single dBm steps). Thank you in advance for any help or comments. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 color key 2d sprite backgound?
Hi, I am working on a 2d library for creating a game including sprite collisions, sorting and animation converting (.spr to Java classes/ bmp's). At first I used png's with the background color being transparant (24 bits png image) but I want to use 256 color bitmaps with the background color being transparant. Is this possible to do color keying in android? I looked at several other threads about this topic but the all ended without a solution. Also I am now using the canvas.drawBitmap to render my sprites, but will using opengl be faster? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 open files from browser or mail or filebrowser or so with my application?
Hi, how can I tell Android that I want all files (with mimetype for example application/msword) open with my application. And in my application, I want to be able to read the file. Is there any example? Thank you. Greetings --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: When the system launches a ResolverActivity or ChooserActivity it doesn't present...
On Thu, Mar 19, 2009 at 7:33 AM, Hans hkess...@gmail.com wrote: Services are just completely different from receivers, which are different from activities. They don't receive any broadcasts at all. They certainly do when you register for them dynamically. Seriously, they don't. sendBroadcast() will never ever reach a Service. When you use registerReciever(), you are creating a dynamic BroadcastReceiver and delivery is going there; the Service component is not involved at all. So - If I have a service that I want to run when certain things happen, just for an example I want it to run when someone clicks 'share' on the photo viewer menu. Presuming that service is not running, putting the proper intent filter in the service's manifest won't make a difference because services are never evaluated for intents, but a running service with a broadcast receiver inside of it would have its broadcast receiver evaluated, correct? Again, these are three completely different things. When share is clicked, startActivity() is called. The ONLY thing that will happen as a result of this is an activity being started, so you simply must have an activity component that will handle the share intent. Once you are in your activity, you can start your service or so whatever else you want. I presume that if you want a service started up because of a standard broadcast message your service's package would also contain a broadcast receiver that would actually be what was triggered and it would in turn start the service, yes/no? Correct. So, to sum up, unless an intent is sent via broadcast, a running service has no approach to receive intents other than from binds and starts/stops, correct? That makes it sound complicated. :) startActivity - Activity, startService - Service, sendBroadcast - BroadcastReceiver. Just don't think of Intent as a generic message system where all of them are routed through one common channel. Intent is a primitive data structure with standard semantics for declaring and matching a simple language, which is used in various places to build specific routing facilities. -- 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. 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] webview contentwidth
Hi, Is there anyway to get the measured width of a webview's rendered html. There is a getContentHeight method that gets the height but there doesn't seem to be a analogous method for widths. Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Polite discussion of lite/trial vs pro distribution
I think you can make the situation a lot better for yourself by accepting that people generally suck. There are lots of free loaders who don't want to pay for anything. And there are lots of people with lots of free time creating free apps, thus reinforcing the mentality of the free loaders. I think the people who complain about your paid app are a minority, albeit a loud one. So just ignore them and life goes on. Also, most paid apps on Android market are harnessed equally by the free loaders, so you're not the only one. If their comments on the market really bother you, then just get 3 G1 accounts, and you can make sure that you always have 3 five-star comments on the first page :-) On Thu, Mar 19, 2009 at 9:28 AM, Al Sutton a...@funkyandroid.com wrote: My solution would be to leave the old version on the market, then, under a new name, have the lite and pro versions. Put in the 325 char description that the old app is not supported and people may want to look at the new app name. Al. Keith Wiley wrote: First I will explain my situation. Then, I would greatly appreciate constructive dialog on how other developers feel similar situations should be managed. I wrote a simple app in November. I offered it for free on the Market for two reasons. One, Google hadn't implemented paid apps yet, so I had no choice. Two, by my own admission, v1.0 was too simple too garner payment. However, in the app's documentation, I requested donations toward future development. Out of thousands of installs, I received nothing. This week I finished a considerably fancier version of the program. Given hundreds of hours of unpaid development, I decided to charge a few bucks for the new version. I split the app into lite and pro versions. The lite version has all the new fancy features enabled but is limited in how large a document can be created (spread sheet, I limited the number of rows/cols, admittedly unlimited in the earlier version). The pro version went to Market as a new app, the lite version on top of the old app to retain the long feedback history. Since the Market provides no way to downgrade, I put the old unlimited version on my website and put directions in the new lite version in multiple places explaining how to revert to the old version. Thus, any user dissatisfied with the rol/col limit could restore the EXACT functionality they had before upgrading to the lite version. Incidentally, the 325 character blurb allotted on the Market was insufficient to list the new features and the lite version's limitation and the caveat that the lite version could be reverted through my website. I simply could not communicate these facts to users to help them decide whether to upgrade or what to expect after upgrading. The complaints about the new lite version have been diverse. Most pertinent to this discussion are complaints that the lite version now limits the rows/cols where the previous version didn't. I find such complaints unjustifiable since I explicitly permit reversion. I literally don't see what they have to complain about. Another irksome genre of complaints is that the program is still too simple to ask any money for at all. I am infuriated. It costs less than an ice cream cone. So, as discussion, how would other developers handle this situation: initial app is simple so offered for free, later version is complex so split into lite/pro. You don't want to limit the lite version by not showing the new fancy features, so the limitation must be something else, a time limit, a forced delay splash screen, something. I chose limited rows/cols on a spreadsheet app, but also permitted reversion to the old unlimited version. How would other developers implement an increase in complexity, charge for it, yet provide a lite version that doesn't anger users of a previously unlimited, but also much more simplistic app? Instead of flaming me where you think I made mistakes, please just open the floor for honest discussion. I'm trying to figure out how to do this properly. A lot of us are probably trying to figure out the same thing. Thanks. -- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com
[android-developers] Re: Getting current on-screen GUI objects?
If you want to do it from another tool, it's pretty easy. Run the following commands from a shell: Make sure you have a dev device/emulator (if you see 1, you're out of luck): $ adb shell getprop ro.secure 0 Start the server: $ adb shell service call window 1 i32 4939 You should see the following result (the 1 means the server is running): Result: Parcel( 0001 '') Install the port forwarding: $ adb forward tcp:4939 tcp:4939 Connect to the server: $ telnet localhost 4939 Now, you can use one of two commands (type enter after each command): - LIST will show the list of windows: LIST 43514758 com.android.launcher/com.android.launcher.Launcher 4359e4d0 TrackingView 435b00a0 StatusBarExpanded 43463710 StatusBar 43484c58 Keyguard DONE. - DUMP will show the views and their properties for a given window. For instance, DUMP 43514758 will show the views contained in the window com.android.launcher/com.android.launcher.Launcher. You can also use DUMP -1 or DUMP to dump the foreground window. I recommend that version. The dump may take a while go be generated and it looks like this: DUMP -1 com.android.internal.policy.impl.keyguardviewmanager$keyguardviewh...@434d8220 getDescendantFocusability()=24,FOCUS_BEFORE_DESCENDANTS getPersistentDrawingCache()=9,SCROLLING isAlwaysDrawnWithCacheEnabled()=4,true isAnimationCacheEnabled()=4,true isChildrenDrawnWithCacheEnabled()=5,false mMinWidth=1,0 mMinHeight=1,0 mMeasuredWidth=3,320 mMeasuredHeight=3,455 mPaddingBottom=1,0 mPaddingLeft=1,0 mPaddingRight=1,0 mPaddingTop=1,0 mLeft=1,0 mID=5,NO_ID mPrivateFlags=4,3248 mRight=3,320 mScrollX=1,0 mScrollY=1,0 mBottom=3,455 mTop=1,0 mUserPaddingBottom=1,0 mUserPaddingRight=1,0 mViewFlags=9,402653312 getBaseline()=2,-1 getHeight()=3,455 layout_height=11,FILL_PARENT layout_width=11,FILL_PARENT getTag()=4,null getVisibility()=7,VISIBLE getWidth()=3,320 hasFocus()=4,true isClickable()=5,false isDrawingCacheEnabled()=5,false isEnabled()=4,true isFocusable()=5,false isFocusableInTouchMode()=5,false isFocused()=5,false isHapticFeedbackEnabled()=4,true isInTouchMode()=4,true isSelected()=5,false isSoundEffectsEnabled()=4,true willNotCacheDrawing()=5,false willNotDraw()=4,true ... DONE. The format is simple. Each View is defined on a line of text which ends with \n. The indent at the beginning of the line indicates the depth of the child in the hierarchy. For instance, no indent == root, 1 space == child of the root, 2 spaces == child of a child of the root, etc. classn...@id followed by a list of properties. A property has the following format: name=X,data where X is the number of characters in the data. On Thu, Mar 19, 2009 at 9:57 AM, Dianne Hackborn hack...@android.com wrote: You can look at the hierarchyviewer app. Note that this only works on dev phones for security reasons. On Thu, Mar 19, 2009 at 8:43 AM, adil.b adil.bukh...@gmail.com wrote: Hello all, Is there any way for an Android application to retrieve some sort of Collection object that contains references to all of the GUI elements which are currently on the phone's screen? This could be very useful for testing purposes and so on. If I have overlooked a well-known class or library, please let me know. Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---