[android-developers] Autocomplete widget - not working - code attached
Hi experts, I am trying to implement a dynamic auto complete widget in android. I am done with the major functionalities and the auto completion implemented is for youtube video search. When I start typing a letter or two, the auto-completion is not working. But when I type three letters or more it works prefect. It also works when I type two letters and hit a backspace. I do not know what is wrong with the code. Code is as follows import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class SendUrl extends Activity { /** Called when the activity is first created. */ Button button; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button = (Button) findViewById(R.id.Button01); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent picMessageIntent = new Intent( android.content.Intent.ACTION_SEND); picMessageIntent.putExtra(Intent.EXTRA_SUBJECT, Here's a cool youtub video); picMessageIntent.putExtra(Intent.EXTRA_TEXT, Go to url: +http:// google.com/); picMessageIntent.setType(plain/text); startActivity(Intent.createChooser(picMessageIntent, Send your url using:)); } }); } } Experts, kindly guide me. I would be obliged if you can point out where I have gone wrong with the code. Any help in this regard will be well appreciated. Looking forward, Regards, Anees -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Autocomplete widget - not working - code attached
Sorry for the wrong code. Here is the correct one which has the issues I mentioned. import org.json.JSONArray; import org.json.JSONException; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.text.Editable; import android.text.TextWatcher; import android.widget.ArrayAdapter; public class YoutubeAutoComplete extends Activity { Youtube yt = new Youtube(); CustomAutoComplete myAutoComplete; ArrayAdapterString adapter; private JSONArray js; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); super.onCreate(savedInstanceState); setContentView(R.layout.main); myAutoComplete = (CustomAutoComplete) findViewById(R.id.autocomplete); adapter = new ArrayAdapterString(this, android.R.layout.simple_dropdown_item_1line); myAutoComplete.addTextChangedListener(textWatcher); myAutoComplete.setAdapter(adapter); adapter.notifyDataSetChanged(); } TextWatcher textWatcher = new TextWatcher() { public void onTextChanged(final CharSequence s, int start, int before, int count) { Thread t = new Thread() { public void run() { try { System.out.println(in here ***); js = yt.GetSuggestions(s.toString()).getJSONArray(1); messageHandler.sendEmptyMessage(0); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; t.start(); } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void afterTextChanged(Editable s) { } }; private Handler messageHandler = new Handler() { public void handleMessage(Message msg) { for (int i = 0; i js.length(); i++) { try { adapter.add(js.getJSONArray(i).getString(0)); System.out.println(js.getJSONArray(i).getString(0)); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } adapter.notifyDataSetChanged(); } }; } On Oct 22, 11:25 am, Anees aneesahame...@gmail.com wrote: Hi experts, I am trying to implement a dynamic auto complete widget in android. I am done with the major functionalities and the auto completion implemented is for youtube video search. When I start typing a letter or two, the auto-completion is not working. But when I type three letters or more it works prefect. It also works when I type two letters and hit a backspace. I do not know what is wrong with the code. Code is as follows import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class SendUrl extends Activity { /** Called when the activity is first created. */ Button button; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button = (Button) findViewById(R.id.Button01); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent picMessageIntent = new Intent( android.content.Intent.ACTION_SEND); picMessageIntent.putExtra(Intent.EXTRA_SUBJECT, Here's a cool youtub video); picMessageIntent.putExtra(Intent.EXTRA_TEXT, Go to url: +http:// google.com/); picMessageIntent.setType(plain/text);
[android-developers] Re: Autocomplete widget - not working - code attached
Hi, Sorry for the wrong code. Here is the code which has the issues I mentioned. import org.json.JSONArray; import org.json.JSONException; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.text.Editable; import android.text.TextWatcher; import android.widget.ArrayAdapter; public class YoutubeAutoComplete extends Activity { Youtube yt = new Youtube(); CustomAutoComplete myAutoComplete; ArrayAdapterString adapter; private JSONArray js; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); super.onCreate(savedInstanceState); setContentView(R.layout.main); myAutoComplete = (CustomAutoComplete) findViewById(R.id.autocomplete); adapter = new ArrayAdapterString(this, android.R.layout.simple_dropdown_item_1line); myAutoComplete.addTextChangedListener(textWatcher); myAutoComplete.setAdapter(adapter); adapter.notifyDataSetChanged(); } TextWatcher textWatcher = new TextWatcher() { public void onTextChanged(final CharSequence s, int start, int before, int count) { Thread t = new Thread() { public void run() { try { System.out.println(in here ***); js = yt.GetSuggestions(s.toString()).getJSONArray(1); messageHandler.sendEmptyMessage(0); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; t.start(); } public void beforeTextChanged(CharSequence s, int start, int count, int after) { } public void afterTextChanged(Editable s) { } }; private Handler messageHandler = new Handler() { public void handleMessage(Message msg) { for (int i = 0; i js.length(); i++) { try { adapter.add(js.getJSONArray(i).getString(0)); System.out.println(js.getJSONArray(i).getString(0)); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } adapter.notifyDataSetChanged(); } }; } Looking forward, Regards, Anees On Oct 22, 11:25 am, Anees aneesahame...@gmail.com wrote: Hi experts, I am trying to implement a dynamic auto complete widget in android. I am done with the major functionalities and the auto completion implemented is for youtube video search. When I start typing a letter or two, the auto-completion is not working. But when I type three letters or more it works prefect. It also works when I type two letters and hit a backspace. I do not know what is wrong with the code. Code is as follows import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class SendUrl extends Activity { /** Called when the activity is first created. */ Button button; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button = (Button) findViewById(R.id.Button01); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent picMessageIntent = new Intent( android.content.Intent.ACTION_SEND); picMessageIntent.putExtra(Intent.EXTRA_SUBJECT, Here's a cool youtub video); picMessageIntent.putExtra(Intent.EXTRA_TEXT, Go to url: +http:// google.com/); picMessageIntent.setType(plain/text);
[android-developers] Re: Android Porting on Telechips TCC89XX: Not able to start init process
Hello all, With some changes in the config file we are able to start the android init script it is able to start all most all process android related Here is my o/p for ps 07:01:198/system # ps 07:01:198 PID Uid VmSize Stat Command 07:01:2141 root276 S init 07:01:2142 rootSW [kthreadd] 07:01:2143 rootRW [ksoftirqd/0] 07:01:2144 rootSW [events/0] 07:01:2455 rootSW [khelper] 07:01:245 173 rootSW [kintegrityd/0] 07:01:245 174 rootSW [kblockd/0] 07:01:245 180 rootSW [ksuspend_usbd] 07:01:386 185 rootSW [khubd] 07:01:386 206 rootSW [pdflush] 07:01:386 207 rootSW [pdflush] 07:01:386 208 rootSW [kswapd0] 07:01:401 210 rootSW [aio/0] 07:01:401 338 rootSW [tcc-usb-thread] 07:01:401 374 root452 S udevd --daemon 07:01:417 684 rootSW [ndda] 07:01:417 754 root404 S -sh 07:01:417 1026 1000256 S /system/bin/servicemanager 07:01:432 1027 root348 S /system/bin/vold 07:01:432 1028 root292 S /system/bin/debuggerd 07:01:432 1031 1001684 S /system/bin/rild 07:01:448 1032 root 4800 D zygote /bin/app_process -Xzygote /system/bin --zygote 07:01:448 1035 root264 S /system/bin/installd 07:01:448 1040 root152 S /sbin/adbd 07:01:464 1089 root /sbin/adbd 07:01:464 1090 root368 R ps I was able to patch linux-2.6.29 with android patches along with my BSP patches also run init script for android above is the ps o/p for android board, but again i am facing some problem in android logo. All i could see on the display was some garbage data. I have the following doubts how can i change the resolution for the android image, i think it is now 320 * 480, how can we change it ? I think my problem is same as this guy http://groups.google.com/group/android-beginners/browse_thread/thread/19b4a038ffab03e6?pli=1 If you have idea or experience for it, please let me know. thanks and regards Suman On Thu, Sep 23, 2010 at 12:29 PM, Suman vijayendra.su...@gmail.com wrote: Hello I have started to port Android on TCC89XX board, I download Android SDK. and applied the patch with kernel 2.6.29, the Processor is having armv6 instruction set. I am not able to see the network up ifconfig is not able to show the network devices. Also I do not get why there is no on binary in the system/bin, system/xbin, the init.rc and init.goldfish.rc. I cannot get the zygote process up. create_socket throws error. If any one knows about this, please tell what i need to do correctly or point me to some correct URL's which will be help full thanks Suman -- Rgds Vijayendra Suman The only basis for a true and lasting unity of all humanity is the religion of the heart. The religion of the heart is the religion of love. People can only be united if they are free from jealousy, hatred and petty-mindedness. Purify your heart first. Meet hatred with love and malice with goodwill. The purer you make your heart, the greater will be the power of your love. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Can't create new Android project in Eclipse
You need the ADT plugin first installed on eclipse. On Tue, Oct 19, 2010 at 9:58 PM, egobuilder pe...@egobuilder.net wrote: I followed the instructions for installing the Android SDK on Windows 7 from http://developer.android.com/sdk/index.html ...but when I open Eclipse and click New it doesn't show Android in the list, even when I click Other. Nor does it appear under the Window tab. What step am I missing to make Android appear in the New options or Window options. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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] how to post a tweet through android example
You the Intent for Twitter app On Mon, Oct 18, 2010 at 10:55 AM, bhargav bhargavkumar...@gmail.com wrote: hai , in my application twitter button is there.just i click on the twitter button open the text box and enter the message after click on the post button .it will post to the twitter. but in my app i connect twitter.. it will go through the browser.it's not correct. any one knows please help me thanksregards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.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] Recents
A task, as a logical collection of activities, is unrelated to a physical process. On Thu, Oct 21, 2010 at 10:40 PM, CMWiii kentka...@gmail.com wrote: Working on a little sub-project to do with task switching and I came across an oddity (for me) on RecentTaskInfo. If I start a browser (Dolphin for example) and then exit using their menu exit option what I see is that in RecentTaskInfo the id is still positive. In theory it is running because the id is not -1. If I return to home then launch the browser again the id number is now different. I would expect this if the last one was actually ended. DDMS shows the browser and after the menu exit press DDMS shows it going away. The presence and absence is also confirmed by looking at the RunningTasksInfo. Any thoughts? This seems only to happen with browsers. What am I missing? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Shared Memory
There is really no need to use android:sharedUserId. The common way to do this on Android is to put your data behind a content provider, which others can call ContentResolver.openFileDescriptor() or related to get access to the file. The content provider opens the file (so it doesn't need to play uid games to allow others to access it), and returns the file descriptor. To make it so only your other apps can get to this file, in the .apk containing your content provider define a signature-only permission that is required to access the content provider. Then all of your apps (signed with your cert) can access the provider, and nobody else can. On Thu, Oct 21, 2010 at 8:37 PM, Bob Kerns r...@acm.org wrote: Actually, you can arrange for them to run in the same process, if you supply both the android:sharedUserId attribute on the manifest element, and the android:process attribute on the application element, and you sign them both with the same signing certificate. You'll also have to work out how to share access to the information, as the applications will have been loaded by different classloaders, but there are ways that can be done. But I'd question whether that's really what you want or need to do. That's really not how the system is designed to be used normally. A service, or sharing using android:sharedUserId to allow access to each other's data, or even persisting the data off the device in a web service are more usual approaches. You really didn't say what you are trying to accomplish, so we can't really make a more specific recommendation. On Oct 20, 6:14 am, chazz chazan...@googlemail.com wrote: Hi, I am new in android development. i was wondering if i could share some data between two applications in android. One way is to place the text file on SdCard but i dont want to do this... second way is to place in data folder, and i dont know how to 3rd way is to place the data in shared memory so both applications can see it... also i dont want the user to see or delete this file, only my two applications can change this file or data. Please help me... i've been wondering on this for 2 days regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: LVL found to be easy to crack
So then the check for the checksum could be removed... same problem. Peter On 22 Okt., 07:50, Jose toco...@gmail.com wrote: I think that an easy way to tamper-proof apk would be: 1) Android Market computes a checksum for the apk when the apk is uploaded 2) In the License Response (eg. in one extra), Android Market send this value 3) The aplication computes the same checsum of itself. If the values don`t match, just finis() This could be very easy to do for Android Market developers... Regards, Jose On Aug 24, 8:16 pm, Trevor Johns trevorjo...@google.com wrote: FYI: We have a blog post up on this topic. It covers many of the points I made earlier, but I figured it's worth pointing out. http://android-developers.blogspot.com/2010/08/licensing-server-news -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com http://android-developers.blogspot.com/2010/08/licensing-server-news On Tue, Aug 24, 2010 at 8:26 AM, a1 arco...@gmail.com wrote: But I'm not sure that native code is any harder to patch, and there are still identifiable syscalls or calls back up to java for i/o to show where it tries to accomplish verification. First of all it's much harder to bypass especially if you are dealing with optimized code and you will have to do it at least twice (for arm abi and armv7 abi). Event toolchain setup is more complicated. -- Bart Janusz (Beepstreet) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=e -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: appbucket: all apps for $9.99 per year, are we just going to watch?
I asked market help about this about a week ago and they say they've now made some changes which 'may have resolved the problem'. Fingers crossed. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Streaming MP4 videos in my app??????
Can you see/play the files if they live on your sdcard using the builtin gallery app? If not, then you're not going to be able to stream them using any streaming mechanism. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Gogle: fix the effing Lunar Lander example, unless it's an example of crappy programming.
I would have to say it contains no more errors per line of code than the subject of your message. :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Memory Leak with a ListView revisited
On Oct 21, 9:29 pm, John Gaby jg...@gabysoft.com wrote: There cannot be this kind of leak in general can there? No, there cannot. You strategy looks foreign to me. Can you explain in english what you're trying to do and the strategy you're using to implement it? Why are you calling your CreateLayout twice in onCreate? And even worse, why are you calling it at all in an your onClick handler? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Looking for android dev (2-10 yrs) Bangalore
Maybe he meant experience with androids like Lt. Cmdr. Data. I well over 10 years of experience watching Star Trek. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: LVL found to be easy to crack
But you can check for the checksum in dozens of differents places in your (ofuscated of course) code. It´s very easy and very fast This will raising the bar for piracy one step more On Oct 22, 9:18 am, noriato fabri...@gmail.com wrote: So then the check for the checksum could be removed... same problem. Peter On 22 Okt., 07:50, Jose toco...@gmail.com wrote: I think that an easy way to tamper-proof apk would be: 1) Android Market computes a checksum for the apk when the apk is uploaded 2) In the License Response (eg. in one extra), Android Market send this value 3) The aplication computes the same checsum of itself. If the values don`t match, just finis() This could be very easy to do for Android Market developers... Regards, Jose On Aug 24, 8:16 pm, Trevor Johns trevorjo...@google.com wrote: FYI: We have a blog post up on this topic. It covers many of the points I made earlier, but I figured it's worth pointing out. http://android-developers.blogspot.com/2010/08/licensing-server-news -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com http://android-developers.blogspot.com/2010/08/licensing-server-news On Tue, Aug 24, 2010 at 8:26 AM, a1 arco...@gmail.com wrote: But I'm not sure that native code is any harder to patch, and there are still identifiable syscalls or calls back up to java for i/o to show where it tries to accomplish verification. First of all it's much harder to bypass especially if you are dealing with optimized code and you will have to do it at least twice (for arm abi and armv7 abi). Event toolchain setup is more complicated. -- Bart Janusz (Beepstreet) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=e -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ListView OnClickListners Issue
Without looking at the code you should have provided, are you registering an onClick listener on the ListView itself, or an onItemClickListener? Only one of those really make sense. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ListView OnClickListners Issue
I had the similar problem with the checkbox. This link helped me out. http://stackoverflow.com/questions/1121192/android-custom-listview-unable-to-click-on-items http://stackoverflow.com/questions/1121192/android-custom-listview-unable-to-click-on-itemsIt states that these check boxes sort of overrides the onListItemClick, and imposes its own methods over ListItem. So we would have to set android:focusable=false for the checkbox. In your case it maybe same and u would have to set focusable as false for the button. Weired but yes it happens. Tell us if it worked for you? Vinay Julme ** {PS: Haven't seen your code.} On Fri, Oct 22, 2010 at 2:02 PM, Doug beafd...@gmail.com wrote: Without looking at the code you should have provided, are you registering an onClick listener on the ListView itself, or an onItemClickListener? Only one of those really make sense. What happens is it imposes it's will on the entire ListItem, and sort of overrides the onListItemClick. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Display a numeric keypad on activity without an input area
Apologies, I bumped it just before leaving the office. While the US is sleeping I'm working :) Any further thoights from anyone on the issue? it seems strange that it would not be possible. On Thu, Oct 21, 2010 at 6:26 PM, TreKing treking...@gmail.com wrote: On Thu, Oct 21, 2010 at 11:45 AM, Donal Rafferty draf...@gmail.comwrote: Anybody have any ideas? Wait more than 8 hours before bumping your own post - especially when you post around 2 - 5 AM US time. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: [USSD] Any API's or code flow ?
Does USSD works on Android Phone ? On Thu, Oct 21, 2010 at 2:08 PM, Atul Raut atul.dr...@gmail.com wrote: How to send Ussd command/code using Android phone. When am trying *#306# [for getting IMEI number] it say wrong Ussd code. But this is very generic and application to all phone. -Atul On Wed, Oct 13, 2010 at 10:52 AM, Atul Raut atul.dr...@gmail.com wrote: Thanks for kind reply. On Wed, Oct 13, 2010 at 2:35 AM, Frank Weiss fewe...@gmail.com wrote: I didn't even know what USSD code flow is. When I googled, the first few results were google groups questions. AFAICT, this is a carier-specific issue. I suggest you contact a carrier for specific USSD code flow questions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem in fix the value in EditText
Hi I am trying to fix the value in the edittext but it not shows in the run time. I am trying this like android:text=edittext in xml layout it shows in the design time but when i run it shows blank. plaese tell me the right process how can i fix it. thanks ankush mishra -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] [USSD] com.android.ussd.IExtendedNetworkService not found
Hi, I am trying USSD on device and getting error : com.android.ussd.IExtendedNetworkService not found Any idea why it is so ? -Atul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 find out that the global auto-sync state has been changed?
Hey guys. Is there any way that my code can be notified / receive a broadcast when the global auto-sync state changes? Cheers, Mariano http://developer.android.com/reference/android/content/ContentResolver.html#getMasterSyncAutomatically() -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 can I access gallery from HTC Desire?
hi all. I am just wondering why I cant access the gallery using the code below. Intent gallery = new Intent(Intent.ACTION_VIEW, Uri.parse(content:// media/internal/images/media)); startActivity(gallery); but when I installed the 3D gallery from cooliris, it is already possible. I can access the images from the installed 3D gallery. But why cant I access the preinstalled gallery on the device? Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Listen for key presses on Numeric keypad?
I have tried this and I get no KeyCodes or KeyEvents at all when I am in the numeric (Second) mode. On Thu, Oct 21, 2010 at 6:24 PM, TreKing treking...@gmail.com wrote: On Thu, Oct 21, 2010 at 11:45 AM, Donal Rafferty draf...@gmail.comwrote: Anybody have any ideas? Check what keycodes you are getting when in the second mode? Maybe they're different for some reason? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Install-time Extraction of .apk files
On Thu, Oct 21, 2010 at 11:34 PM, Dianne Hackborn hack...@android.com wrote: this is also telling the platform that your app relies on ARM code so it will not be available to devices running with other CPUs whenever those appear. Such as, oh, Google TV devices powered by Intel Atom, to pick a highly-publicized use of Android at random. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Listen for key presses on Numeric keypad?
Thanks letlite, However I want to be able to display the numeric keypad without having it input to an EditText so I cant use addTextChangedListener(TextWatcher) So I want the user to be able to click a button on my UI, the keypad pops up in numeric form and then I want to be able to listen to what they press on the keypad. On Thu, Oct 21, 2010 at 6:28 PM, letlite letl...@gmail.com wrote: Take a look at TextView.addTextChangedListener(TextWatcher) On Oct 21, 9:45 am, Donal Rafferty draf...@gmail.com wrote: Anybody have any ideas? On Thu, Oct 21, 2010 at 3:21 PM, draf...@gmail.com draf...@gmail.com wrote: I use the following code to listen for the key presses of 0 - 9 from the soft input keyboard on Android: --- @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_0) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_1) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_2) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_3) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_4) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_5) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_6) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_7) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_8) { return super.onKeyDown(keyCode, event); } if(keyCode == KeyEvent.KEYCODE_9) { Log.d(Keycode, Got KeyCode 9); return super.onKeyDown(keyCode, event); } return true; } --- The code works when i display the soft input keyboard in the following mode: http://i.imgur.com/Snasz.png However it does **not** work when I display the soft input keyboard in the following mode: http://i.imgur.com/wf0Kt.png Why is 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Error with DB onUpgrade
Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 serial port
a) wrong group : use android-platform b) maybe you could change the usb gadget on your device and provide an composite usb device with a serial communication port But to change the framework will be not so easy. IMHO you have to adapt the kernel, create your own kernel - framework communication via your own sysfs entries and so on ... But all not the scope of this group as this outside of the sdk Good luck ! Frank On 18 Okt., 19:34, Aravind aravindana...@gmail.com wrote: Hi Team, I am a beginner in Android and i want to establish a serial port communication(UART RS232) library in Android Framework Layer. My applications want to use that libary to send messages to some serial port devices. here we wan to use android as a embeded device and not a mobile device. can you suggest me how to establish a seria communication and to add that library on android framework layer. Regards, Aravind. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] my activity lost visibility after unlocked screen...
I have a broadcast receiver to listen the incoming sms and launch an activity after received any. After the activity is launched, the screen will be unlocked using the following code in onCreate() method. getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); and then the activity is gone. I think it is the default sms app in the phone refreshed the widget on home screen and made my activity gone, but my activity is actually still running. I am wondering is there a way to keep my activity visible when the screen is unlocked using above code?? Thanks for the help. Kev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] keep alive xmpp connection
Hi all, is there any way to keep my connection alive when the screen goes off ? my xmpp connection is disconnected due to ACTION_SCREEN_OFF event, Regards, Jey -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] No audio in emulator (ubuntu 10.10)
Dear all, I cannot manage to play audio in the android emulator 2.2. I am using ubuntu 10.10. I've tried to launch the emulator with the following audio options (and I tried to use root privileges as well): -audio oss - I get a warning for audio not supported, fair enough -audio esd -audio alsa Nothing happens with the latest two: emulator starts and runs ok, but no audio of any sort is played and even if I try the -verbose mode I don't see any error in the shell. Is this due to ubuntu 10.10 using pulseaudio? Does anyone have any clue? Thanks, Mik -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] keep alive xmpp connection
On Fri, Oct 22, 2010 at 8:12 AM, Jey jp9894562...@gmail.com wrote: is there any way to keep my connection alive when the screen goes off ? my xmpp connection is disconnected due to ACTION_SCREEN_OFF event, If you are on WiFi, you would need to hold a WifiLock and probably a WakeLock. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Error with DB onUpgrade
AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I access gallery from HTC Desire?
how can i view the standard gallery? The view should be just like opening the gallery from all apps. On Oct 22, 7:47 pm, MG my.android.a...@gmail.com wrote: hi all. I am just wondering why I cant access the gallery using the code below. Intent gallery = new Intent(Intent.ACTION_VIEW, Uri.parse(content:// media/internal/images/media)); startActivity(gallery); but when I installed the 3D gallery from cooliris, it is already possible. I can access the images from the installed 3D gallery. But why cant I access the preinstalled gallery on the device? Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Error with DB onUpgrade
No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyev kmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How can I access gallery from HTC Desire?
On Fri, Oct 22, 2010 at 8:35 AM, MG my.android.a...@gmail.com wrote: how can i view the standard gallery? There is no standard gallery in Android. There are two gallery apps in the Android open source project. These will be on a few devices. Other devices will have vendor-supplied equivalents. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LVL found to be easy to crack
The server-side LVL could verify the application signature instead, since anyone (pirates) changing the code would have to re-sign the package. The signature is (I think) available to Market application on the phone, and to the LVL back-end on the server. Android Market's communication with the server and the application are encrypted, and Market is signed with the platform key, which means it can't be tampered with. Don't know if there any vulnerabilities with this (other than rooted phones), but then, I don't work for Google and shouldn't discuss something I know nothing about :) -- Kostya 22.10.2010 12:30, Jose пишет: But you can check for the checksum in dozens of differents places in your (ofuscated of course) code. It´s very easy and very fast This will raising the bar for piracy one step more On Oct 22, 9:18 am, noriatofabri...@gmail.com wrote: So then the check for the checksum could be removed... same problem. Peter On 22 Okt., 07:50, Josetoco...@gmail.com wrote: I think that an easy way to tamper-proof apk would be: 1) Android Market computes a checksum for the apk when the apk is uploaded 2) In the License Response (eg. in one extra), Android Market send this value 3) The aplication computes the same checsum of itself. If the values don`t match, just finis() This could be very easy to do for Android Market developers... Regards, Jose On Aug 24, 8:16 pm, Trevor Johnstrevorjo...@google.com wrote: FYI: We have a blog post up on this topic. It covers many of the points I made earlier, but I figured it's worth pointing out. http://android-developers.blogspot.com/2010/08/licensing-server-news -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com http://android-developers.blogspot.com/2010/08/licensing-server-news On Tue, Aug 24, 2010 at 8:26 AM, a1arco...@gmail.com wrote: But I'm not sure that native code is any harder to patch, and there are still identifiable syscalls or calls back up to java for i/o to show where it tries to accomplish verification. First of all it's much harder to bypass especially if you are dealing with optimized code and you will have to do it at least twice (for arm abi and armv7 abi). Event toolchain setup is more complicated. -- Bart Janusz (Beepstreet) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=e -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Service start in Turn on Device
Thanks ... It Works ! i Use this Code in Service Class : Intent mIntent = new Intent(context,MyClass.class); context.startService(mIntent); And Uses Permission in Manifest ! !-- Register in Android Manifest BootReceiver receiver -- receiver android:name=BootReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.HOME / /intent-filter /receiver And : uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / On 12 Ott, 12:04, pramod.deore deore.pramo...@gmail.com wrote: You have to register for the BOOT_COMPLETED intent but also for the intent that will start the actual service.In manifest file use permission as uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / The broadcast action android.intent.action.BOOT_COMPLETED that is sent out once the platform boot is complete. On Oct 12, 2:53 pm, MarcoCanali marco.can...@gmail.com wrote: How start my service when turn on my device in automatic mode ?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error with DB onUpgrade
Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] keep alive xmpp connection
If this is some kind of instant messaging application, then keeping a WakeLock for a long time is probably not a good idea. Your users might like messages being delivered instantly, but dismayed that it only lasts a few hours. You might want to schedule a wake-up alarm with AlarmManager, acquire locks for a period of time, display a notification, and if the user doesn't immediately start reading / responding, let the phone fall back to sleep. -- Kostya 22.10.2010 16:24, Mark Murphy пишет: On Fri, Oct 22, 2010 at 8:12 AM, Jeyjp9894562...@gmail.com wrote: is there any way to keep my connection alive when the screen goes off ? my xmpp connection is disconnected due to ACTION_SCREEN_OFF event, If you are on WiFi, you would need to hold a WifiLock and probably a WakeLock. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Error with DB onUpgrade
Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyev kmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 With Thread !
I use thic Code in a Class Of type Service : class A extends Service { @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub Log.v(AppointmentFinderService, OnBind the Binder ); return mBinder; } @Override public void onCreate() { Context context = getBaseContext(); } @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); serviceHandler.removeCallbacks(myTask); serviceHandler = null; /** Destroy the Thread */ myTask.destroy(); } @Override public void onStart(Intent intent, int startId) { // TODO Auto-generated method stub super.onStart(intent, startId); myTask = new Task(); serviceHandler = new Handler(); serviceHandler.postDelayed(myTask, delayMillis); } class Task extends Thread{ @Override public void run() { try { sleep(timeToSleep); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } The Service Work in Right mode but the other activity of application don't respond to command ...from the sleep command add !! Someone have an Idea of problem with Thread process, the sleep method intact the Application main core i think !!! 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
Re: [android-developers] Error with DB onUpgrade
I am following this http://efreedom.com/Question/1-3505900/SQLiteOpenHelper-OnUpgrade-Confusion-Android What do u mean by saying SQL open helper for all code paths I am using the standard code for public void open() throws SQLException { db = DBHelper.getWritableDatabase(); } The open method is called for each database seperately. On Fri, Oct 22, 2010 at 6:26 PM, Alok Kulkarni kulsu...@gmail.com wrote: Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyev kmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error with DB onUpgrade
No, onUpgrade doesn't delete any data, tables, or databases. It's just a callback in your code that's called by Android when the desired database version doesn't match the existing database version. Your callback can do whatever it needs to bring the database schema up to date - typically, adding columns or tables. So if your code just does ALTER TABLE ADD COLUMN, you don't need to do anything special to preserve existing data. -- Kostya 22.10.2010 16:56, Alok Kulkarni пишет: Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyevkmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Error with DB onUpgrade
Ok.. thanks One more thing .. Here for the problem i am facing.. IS that i need to take care that i access the tables only after onUpgrade completes execution ? On Fri, Oct 22, 2010 at 6:34 PM, Kostya Vasilyev kmans...@gmail.com wrote: No, onUpgrade doesn't delete any data, tables, or databases. It's just a callback in your code that's called by Android when the desired database version doesn't match the existing database version. Your callback can do whatever it needs to bring the database schema up to date - typically, adding columns or tables. So if your code just does ALTER TABLE ADD COLUMN, you don't need to do anything special to preserve existing data. -- Kostya 22.10.2010 16:56, Alok Kulkarni пишет: Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyevkmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error with DB onUpgrade
Yes, that's what I meant. Always call getWritableDatabase, and don't call SQLiteDatabase.openDatabase - are you, perhaps, somewhere in your code? In the link you posted, table upgrades are done by renaming the old table and creating a new table from scratch, then copying the data. So there is the time period when the table doesn't exist. Most likely, this is the reason why you're seeing your error. Since you've said that your code is multithreaded, I think what happens is, one thread starts upgrading the database, while another thread starts to make queires, or perhaps tries to perform an upgrade as well. To fix this issue, you need to add thread synchronization around opening the database, to avoid concurrent access until the database has been fully upgraded. -- Kostya 22.10.2010 17:03, Alok Kulkarni пишет: I am following this http://efreedom.com/Question/1-3505900/SQLiteOpenHelper-OnUpgrade-Confusion-Android What do u mean by saying SQL open helper for all code paths I am using the standard code for public void open() throws SQLException { db = DBHelper.getWritableDatabase(); } The open method is called for each database seperately. On Fri, Oct 22, 2010 at 6:26 PM, Alok Kulkarnikulsu...@gmail.com wrote: Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyevkmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem With Thread !
Don't you need to start the thread? On Oct 22, 2010 9:02 AM, MarcoCanali marco.can...@gmail.com wrote: I use thic Code in a Class Of type Service : class A extends Service { @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub Log.v(AppointmentFinderService, OnBind the Binder ); return mBinder; } @Override public void onCreate() { Context context = getBaseContext(); } @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); serviceHandler.removeCallbacks(myTask); serviceHandler = null; /** Destroy the Thread */ myTask.destroy(); } @Override public void onStart(Intent intent, int startId) { // TODO Auto-generated method stub super.onStart(intent, startId); myTask = new Task(); serviceHandler = new Handler(); serviceHandler.postDelayed(myTask, delayMillis); } class Task extends Thread{ @Override public void run() { try { sleep(timeToSleep); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } The Service Work in Right mode but the other activity of application don't respond to command ...from the sleep command add !! Someone have an Idea of problem with Thread process, the sleep method intact the Application main core i think !!! Thanks in Advance !! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Memory Leak with a ListView revisited
First, let me say that this is just a very simple sample application to illustrate the problem. My real application is far more complex, but exhibits this same behavior. What I need to be able to do is to be able to destroy a given page and then re-create it later. There are several reasons for this, but one of the main ones is that I want to free up the memory of a page which is no longer being actively used. Then when the user loads that page again, I simply re-create it. In Java, of course, there is really no way (that I know of) to free objects, you simply stop referring to them and the the garbage collector magically disposes of them at it's leisure. The problem is that it is simply NOT doing that for my GListView objects. I realize that this application doesn't represent something that you might actually do, but the fact is that if you take this program and run it, the GListView objects are NEVER freed, causing a memory leak. This is what I am trying to address. If I can understand why this is happening in this simple case, I might be able to figure out how to fix it in my actual program. Thanks. On Oct 22, 1:26 am, Doug beafd...@gmail.com wrote: On Oct 21, 9:29 pm, John Gaby jg...@gabysoft.com wrote: There cannot be this kind of leak in general can there? No, there cannot. You strategy looks foreign to me. Can you explain in english what you're trying to do and the strategy you're using to implement it? Why are you calling your CreateLayout twice in onCreate? And even worse, why are you calling it at all in an your onClick handler? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Error with DB onUpgrade
Yeah , thats what probably is the issue.. So i will take a sequential approach over there and update it .. Thanks a lot Kostya.. Regards, Alok. On Fri, Oct 22, 2010 at 6:49 PM, Kostya Vasilyev kmans...@gmail.com wrote: Yes, that's what I meant. Always call getWritableDatabase, and don't call SQLiteDatabase.openDatabase - are you, perhaps, somewhere in your code? In the link you posted, table upgrades are done by renaming the old table and creating a new table from scratch, then copying the data. So there is the time period when the table doesn't exist. Most likely, this is the reason why you're seeing your error. Since you've said that your code is multithreaded, I think what happens is, one thread starts upgrading the database, while another thread starts to make queires, or perhaps tries to perform an upgrade as well. To fix this issue, you need to add thread synchronization around opening the database, to avoid concurrent access until the database has been fully upgraded. -- Kostya 22.10.2010 17:03, Alok Kulkarni пишет: I am following this http://efreedom.com/Question/1-3505900/SQLiteOpenHelper-OnUpgrade-Confusion-Android What do u mean by saying SQL open helper for all code paths I am using the standard code for public void open() throws SQLException { db = DBHelper.getWritableDatabase(); } The open method is called for each database seperately. On Fri, Oct 22, 2010 at 6:26 PM, Alok Kulkarnikulsu...@gmail.com wrote: Yeah ill do my best.. My code is too complicated right now... :P One more thing i need to confirm.. After upgrade , all the old databases are deleted right.. So i need to backup all the tables in the onUpgrade and recreate new ones .. Right ? On Fri, Oct 22, 2010 at 6:20 PM, Kostya Vasilyevkmans...@gmail.com wrote: Sounds like this could be it. Can't you just go through SQL open helper for all code paths? -- Kostya 22.10.2010 16:37, Alok Kulkarni пишет: No. Actually i am accessing another table from my databases at the same time from another thread while onUpgrade is being called.So i think thats where the problem lies.But i need to figure out a way so that i access the SQL tables after the on Upgrade function completes. On Fri, Oct 22, 2010 at 5:58 PM, Kostya Vasilyevkmans...@gmail.com wrote: AFAIK, there is nothing special, except: - onUpgrade may take some time to run - the tables are not updated until after onUpgrade is done Are you accessing the database in any way bypassing your SQL open helper? Is this what you mean by At the start of the application , i initialize all the databases and access columns from the required tables ? If you're relying on SQL open helper and its onUpgrade, then that should be the only way you're accessing the database. -- Kostya 22.10.2010 15:14, Alok Kulkarni пишет: Hi, I have multiple databases in my app.At the start of the application , i initialize all the databases and access columns from the required tables.What i did is , for one of the databases i incremented the version of the DB. So now i have started getting error of No Such table say ABCD while compiling query.This table is in another DB than the updated DB. I dont have any code in the onUpgrade right now.. Is there any thing thats striking anyone why this behavior is happening? Is there anything that happens in the onUpgrade method that causes all the DBs to be inaccessable temporarily. I am saying this because if i place a breakpoint in onUpgrade and debug , then i wait for a few seconds on the 1st stmt in onUpgrade and then everything works fine... -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: Remove TTS for test
Have you considered using different AVDs with different SDK levels (some with TTS and some without) in the emulator? On Oct 21, 4:37 am, Fred J fred.jea...@gmail.com wrote: Hello All ! I would like to test my code which check the availability of the Text To Speech lib on the device before using it. For this I need to remove the TTS service which is already installed on my device (HTC Legend). Do you know how to do this ? (I only found to stop the service not to remove it) ... In advance, thank you for response, Frédéric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: LVL found to be easy to crack
I don't think that you will ever have a solution that will prevent the pirates from stealing. The question is, does LVL prevent the average person from being able to steal the app? For example, on some stores someone can simply forward the email with the download link to the app they just purchased to one or more friends. That is really easy for people to do. I added a simple license check to stop this kind of stealing. I'm sure hardcore pirates could steal my apps but at least I have prevented the common case that just about everyone can figure out. Unfortunately I'm not a big Android expert so I don't know how easy it is to even copy an app on Android. Does the average person have the means share/steal an app they purchased off the market if it doesn't use LVL? On 10/22/2010 8:49 AM, Kostya Vasilyev wrote: The server-side LVL could verify the application signature instead, since anyone (pirates) changing the code would have to re-sign the package. The signature is (I think) available to Market application on the phone, and to the LVL back-end on the server. Android Market's communication with the server and the application are encrypted, and Market is signed with the platform key, which means it can't be tampered with. Don't know if there any vulnerabilities with this (other than rooted phones), but then, I don't work for Google and shouldn't discuss something I know nothing about :) -- Kostya 22.10.2010 12:30, Jose пишет: But you can check for the checksum in dozens of differents places in your (ofuscated of course) code. It´s very easy and very fast This will raising the bar for piracy one step more On Oct 22, 9:18 am, noriatofabri...@gmail.com wrote: So then the check for the checksum could be removed... same problem. Peter On 22 Okt., 07:50, Josetoco...@gmail.com wrote: I think that an easy way to tamper-proof apk would be: 1) Android Market computes a checksum for the apk when the apk is uploaded 2) In the License Response (eg. in one extra), Android Market send this value 3) The aplication computes the same checsum of itself. If the values don`t match, just finis() This could be very easy to do for Android Market developers... Regards, Jose On Aug 24, 8:16 pm, Trevor Johnstrevorjo...@google.com wrote: FYI: We have a blog post up on this topic. It covers many of the points I made earlier, but I figured it's worth pointing out. http://android-developers.blogspot.com/2010/08/licensing-server-news -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com http://android-developers.blogspot.com/2010/08/licensing-server-news On Tue, Aug 24, 2010 at 8:26 AM, a1arco...@gmail.com wrote: But I'm not sure that native code is any harder to patch, and there are still identifiable syscalls or calls back up to java for i/o to show where it tries to accomplish verification. First of all it's much harder to bypass especially if you are dealing with optimized code and you will have to do it at least twice (for arm abi and armv7 abi). Event toolchain setup is more complicated. -- Bart Janusz (Beepstreet) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=e -- Leigh McRae www.lonedwarfgames.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] emulator/ host network setup problems
I am trying to test some udp networking between emulator and host and I have a problem with setup. I assigned address 10.0.2.14 to the host interface with 10.0.2.1 as gateway.. Can't ping 10.0.2.15 from my host, neither can i ping 10.0.2.14 from emulator. Ping from emulator to 10.0.2.2 works fine - I can capture that ICMP traffic on the loopback interface of my host, so ICMP works, but how can i create traffic from the host to emulator? Can someone point me how to make it work? Note: firewall on my host is disabled. Thank you, -V -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: emulator/ host network setup problems
For emulator to computer (and outside world) see: http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking To talk from the computer to the emulator you should set up a port forward and connect to the forwarded port on the development machine's loopback IP - the emulator does not create a dummy network interface in the hosting machine that can be accessed by ip address in the way that virtualbox/vmware/etc often do. On Oct 22, 10:33 am, chcat vlyamt...@gmail.com wrote: I am trying to test some udp networking between emulator and host and I have a problem with setup. I assigned address 10.0.2.14 to the host interface with 10.0.2.1 as gateway.. Can't ping 10.0.2.15 from my host, neither can i ping 10.0.2.14 from emulator. Ping from emulator to 10.0.2.2 works fine - I can capture that ICMP traffic on the loopback interface of my host, so ICMP works, but how can i create traffic from the host to emulator? Can someone point me how to make it work? Note: firewall on my host is disabled. Thank you, -V -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: LVL found to be easy to crack
On Aug 24, 3:31 am, Kostya Vasilyev kmans...@gmail.com wrote: Doing it as part of Market application, with only simple allow/deny passed over RPC is probably more secure. Market app is signed with the platform key, and the firmware checks the signature, right? How many seconds do you think it would take someone to patch out the RPC call? The only way something like LVL will hold up in the long run is if the license checking functionality is intimately and multiply intertwined with the application functionality, such that disentangling the two is more trouble than its worth. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Get soft keyboard to automatically pop up when a dialog is displayed?
I currently pop up a custom dialog with an EditText in it. Currently the keyboard will only pop up when the user clicks into the EditText. Is it possible to get the keyboard to pop up for the EditText as soon as the Dialog loads? I have tried: editText = (EditText) findViewById(R.id.EditTextd); editText.setFocusable(true); editText.requestFocus(); But it hasn't worked. Has anyone any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: appbucket: all apps for $9.99 per year, are we just going to watch?
On Fri, Oct 22, 2010 at 2:22 AM, Pent tas...@dinglisch.net wrote: I asked market help about this about a week ago and they say they've now made some changes which 'may have resolved the problem'. Yeah ... that's kind of their de facto response to anything, honestly. Like the active install problem, which is still not fixed even though they may have resolved the problem weeks ago. Don't get your hopes up. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: LVL found to be easy to crack
On Oct 22, 8:49 am, Kostya Vasilyev kmans...@gmail.com wrote: Android Market's communication with the server and the application are encrypted, and Market is signed with the platform key, which means it can't be tampered with. Don't know if there any vulnerabilities with this (other than rooted phones), but then, I don't work for Google and shouldn't discuss something I know nothing about :) A patched and pirated application would likely have no interaction with the Market application whatsoever (any previous interaction being removed), so Market can't really do anything about it. Or are you suggesting that future devices should only be able to install applications sourced from Market? If so, there's a mobile platform for you, and it isn't Android ;-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LVL found to be easy to crack
On Fri, Oct 22, 2010 at 10:53 AM, Chris Stratton cs07...@gmail.com wrote: The only way something like LVL will hold up in the long run is if the license checking functionality is intimately and multiply intertwined with the application functionality, such that disentangling the two is more trouble than its worth. Now, now, it's not the *only* way. If an attempt to run a cracked app resulted in electrocution, piracy would stop in a jiffy. Of course, there's a *slight* liability issue... :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Detecting when outgoing is accepted
On Sat, Oct 16, 2010 at 12:50 PM, Gergely Juhász jg.sv...@gmail.com wrote: I can detect incoming calls (with PhoneStateListener), outgoing calls by NEW_OUTGOING_CALL intent, but i can not find a way to distinguish the dialing and connected phone states. Never used it, but this seems promising: http://developer.android.com/reference/android/telephony/TelephonyManager.html#CALL_STATE_OFFHOOK - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: appbucket: all apps for $9.99 per year, are we just going to watch?
Yeah ... that's kind of their de facto response to anything, honestly. Like the active install problem, which is still not fixed even though they may have resolved the problem weeks ago. Don't get your hopes up. Yeah, I noticed today I was sliding back again (and only regained a 1/4 of the lost ground after the fix). Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Get soft keyboard to automatically pop up when a dialog is displayed?
On 22 October 2010 16:57, draf...@gmail.com draf...@gmail.com wrote: I currently pop up a custom dialog with an EditText in it. Currently the keyboard will only pop up when the user clicks into the EditText. Is it possible to get the keyboard to pop up for the EditText as soon as the Dialog loads? http://developer.android.com/reference/android/view/inputmethod/InputMethod.html showSoftInput()? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] App comment spam
I've noticed that a lot of comments on top apps are from comment spammers. When is something going to be done about this market wide problem? There are probably less than 20 of these users who hit virtually every top app with comment spam. My app is getting hit every single day by these people. It's really getting annoying. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Detecting when outgoing is accepted
I tried this, and CALL_STATE_OFFHOOK event occurs as soon as you dial the phone number. So it still doesn't help you determine when the other person answers. There is nothing in the public API that can be used to tell you when the phone is answered. I was hoping someone knew another way. Maybe using reflection to get to a hidden method, or having the program check the system logs for a message that appears when the phone is answered. On Oct 22, 10:07 am, TreKing treking...@gmail.com wrote: On Sat, Oct 16, 2010 at 12:50 PM, Gergely Juhász jg.sv...@gmail.com wrote: I can detect incoming calls (with PhoneStateListener), outgoing calls by NEW_OUTGOING_CALL intent, but i can not find a way to distinguish the dialing and connected phone states. Never used it, but this seems promising:http://developer.android.com/reference/android/telephony/TelephonyMan... --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LVL found to be easy to crack
22.10.2010 19:04, Mark Murphy пишет: Now, now, it's not the *only* way. If an attempt to run a cracked app resulted in electrocution, piracy would stop in a jiffy. Of course, there's a *slight* liability issue... :-) I hear Google has good lawyers, they could lobby for some kind of Android Licensing Bill, making this legal... :) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: App comment spam
I've noticed that a lot of comments on top apps are from comment spammers. When is something going to be done about this market wide problem? There are probably less than 20 of these users who hit virtually every top app with comment spam. My app is getting hit every single day by these people. It's really getting annoying. Have you just got back from Siberia ? Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] google API with android
Take a look at the Google Local Search API. If all you wanted was bars, clubs and restaurants I've got a web service API you could use, but Google Local Search has everything Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://bgies.comhttp://nocrappyapps.com http://bistroblurb.com http://forcethetruth.com http://ihottonight.com --- Everything in moderation, including abstinence (paraphrased) Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies Adversity can make or break you... It's your choice... Choose wisely - Brad Gies Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead On 17/10/2010 4:54 PM, skyline wrote: Hi Everyone. I am a new android developer, I am trying to build an application searching the local business based on user's current location. For example: user open the application, it gets user's current location first, then user click on the button within my app, let's say: bar. the app will generate a list of local bars around the user's location with Bar's name, address, phone number, google map direction and so on.. please share this with me if you have some experience with this, thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] [BUG?] Images from drawable-nodpi getting scaled
On Mon, Oct 18, 2010 at 3:35 PM, Wri cyri...@gmail.com wrote: In the old project, I did not specify a target SDK (the manifest did not contain something like: uses-sdk android:minSdkVersion=8 /). Be careful here ... target SDK is NOT the same as minSDK. Was that a typo or are you not clear on this? The new project now uses uses-sdk android:minSdkVersion=8 / in the manifest. So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your target (what you're testing on) is? Why is this happening? How can I load them without scaling while still declaring the minimum SDK? This I don't know - I haven't had to deal with all this screen support stuff as the defaults work out fine for me for now, but I would double check you really want min SDK to 8 and read over this: http://developer.android.com/guide/practices/screens_support.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] horizontalScrollView + TabHost
On Tue, Oct 19, 2010 at 6:23 AM, Tuke mhartikai...@gmail.com wrote: This way intent launhes nicely, but it doesn't load it's content to framelayout as it should. What does this mean? If I change above XML as following (removing the scrollview): I can see the intent again, but i will lose the ability to scroll tabs. What do you mean see the intent? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: emulator/ host network setup problems
How can i make that map permanent? On Oct 22, 10:43 am, Chris Stratton cs07...@gmail.com wrote: For emulator to computer (and outside world) see: http://developer.android.com/guide/developing/tools/emulator.html#emu... To talk from the computer to the emulator you should set up a port forward and connect to the forwarded port on the development machine's loopback IP - the emulator does not create a dummy network interface in the hosting machine that can be accessed by ip address in the way that virtualbox/vmware/etc often do. On Oct 22, 10:33 am, chcat vlyamt...@gmail.com wrote: I am trying to test some udp networking between emulator and host and I have a problem with setup. I assigned address 10.0.2.14 to the host interface with 10.0.2.1 as gateway.. Can't ping 10.0.2.15 from my host, neither can i ping 10.0.2.14 from emulator. Ping from emulator to 10.0.2.2 works fine - I can capture that ICMP traffic on the loopback interface of my host, so ICMP works, but how can i create traffic from the host to emulator? Can someone point me how to make it work? Note: firewall on my host is disabled. Thank you, -V -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Kube example with simple 3D object select
On Tue, Oct 19, 2010 at 3:20 AM, Lukasz.Iwanski lukasz.iwan...@gmail.comwrote: I have done research.. but I have huge problem with that. Huge problem with what? http://www.catb.org/esr/faqs/smart-questions.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dialog change orientation
Hi, Does anyone know if it is possible to change the orientation of a dialog ONLY. So i show a dialog in landscape while the activity remains in portrait. Anyone know 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
Re: [android-developers] getSharedPreferences and static reference to a Context object
On Tue, Oct 19, 2010 at 4:39 AM, pscheven psche...@gmail.com wrote: In my Android application, I have to call the getSharedPreferences in non-activity classes. In order to avoid passing a Context object to each constructor of these classes (and because many of them are classes with only static methods which don't have a constructor) Pass the context or SharedPreferences object itself to the functions that need it. No need to do any of this crazy static activity reference stuff. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android serial port
Check out the Beagle Board and also Andrino. I believe they both have serial ports and Android libs to access 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
Re: [android-developers] orientation problem
On Tue, Oct 19, 2010 at 1:29 AM, anand sadanandgarikap...@gmail.com wrote: i used a vertical linear layout int which i placed some text fields and buttons.but when i am changing to landscape it doesnt display all the view. Is your linear layout in a Scroll View? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to extract class information from code
On Tue, Oct 19, 2010 at 8:07 AM, vick.s souvick.i...@gmail.com wrote: Is there any tool available to construct the class diagram from the code? I would try this: Search for java uml reverse engineeringhttp://www.google.com/search?hl=ensource=hpbiw=1247bih=1035q=java+uml+reverse+engineeringaq=faqi=g2aql=oq=gs_rfai=CUs1WE7bBTNf8JpLwiwO7ioX1BwAAAKoEBU_Q2v4Q - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Distributing free licenses to paid apps
How about if you issue a refund after the 48 hour period in which a user can return the app? On Oct 21, 8:15 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: I'd like to authorize certain people to use my app without buying it. Is there a way to do this? Am I running into issues with my own phone because my Google Apps account is not considered a Gmail address? If I tell them to buy the app, then I immediately issue a refund in Google Checkout, will this somehow affect my standing as a developer or merchant? Does it cost me anything to issue a refund? Unless I miss the point of LVL, issuing refund would cancel license for the users so they won't be able to use it anywy. Google needs to add coupons as this is quite common problem with paid apps -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] User ID of purchaser
Is there a way I can get the Google Marketplace ID of the purchaser of my app? I mean from within the app at runtime. I want to send it to my back-end service database to help detect pirates. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is your activity running?
On Tue, Oct 19, 2010 at 4:21 AM, tanmay@gmail.com tanmay@gmail.comwrote: But When I submit the search button in the Search activity I am getting the erro What does this code look like? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] [BUG?] Images from drawable-nodpi getting scaled
In addition to what was said above, if you study the supports-screens directive carefully and set it properly in your manifest, that will most likely clear things up. On Fri, Oct 22, 2010 at 11:43 AM, TreKing treking...@gmail.com wrote: On Mon, Oct 18, 2010 at 3:35 PM, Wri cyri...@gmail.com wrote: In the old project, I did not specify a target SDK (the manifest did not contain something like: uses-sdk android:minSdkVersion=8 /). Be careful here ... target SDK is NOT the same as minSDK. Was that a typo or are you not clear on this? The new project now uses uses-sdk android:minSdkVersion=8 / in the manifest. So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your target (what you're testing on) is? Why is this happening? How can I load them without scaling while still declaring the minimum SDK? This I don't know - I haven't had to deal with all this screen support stuff as the defaults work out fine for me for now, but I would double check you really want min SDK to 8 and read over this: http://developer.android.com/guide/practices/screens_support.html - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Kube example with simple 3D object select
Luke, Read these. http://groups.google.com/group/android-developers/browse_thread/thread/6243785d31f904d7/155df9bc386bb0ad?lnk=gstq=3d+selection#155df9bc386bb0ad http://groups.google.com/group/android-developers/browse_thread/thread/3b9ab1117971fe11/65e1376de2b698e3?lnk=gstq=3d+selection#65e1376de2b698e3 On Oct 22, 10:52 am, TreKing treking...@gmail.com wrote: On Tue, Oct 19, 2010 at 3:20 AM, Lukasz.Iwanski lukasz.iwan...@gmail.comwrote: I have done research.. but I have huge problem with that. Huge problem with what?http://www.catb.org/esr/faqs/smart-questions.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android memory problem + Surface holder problem (surfaceview game)
Hi. there are 2 ways to let user press home and return back with their status correct : 1. public gameView(Context context, AttributeSet attrs) { super(context, attrs); SurfaceHolder holder = getHolder(); holder.addCallback(this); thread = new gameThread(holder); } public void surfaceCreated(SurfaceHolder holder) { if (!thread.isAlive()) { thread = new gameThread(holder); } thread.start(); thread.runThread = true; } public void surfaceDestroyed(SurfaceHolder holder) { thread.runThread = false; boolean fuck = true; while (fuck) { try { thread.join(); fuck = false; } catch (InterruptedException e) { } } } this is the lunarlander based + a bit improved version. 2. public gameView(Context context, AttributeSet attrs) { super(context, attrs); SurfaceHolder holder = getHolder(); holder.addCallback(this); } public void surfaceCreated(SurfaceHolder holder) { thread = new gameThread(holder); thread.start(); thread.runThread = true; } public void surfaceDestroyed(SurfaceHolder holder) { thread.runThread = false; boolean fuck = true; while (fuck) { try { thread.join(); fuck = false; } catch (InterruptedException e) { } } } EITHER WAY can't let me insert this code in my thread constructor: Bitmap land = Bitmap.createBitmap(2000, 2000, Bitmap.Config.ARGB_); I know it is way too big. But even If I turn it smaller like mapland = Bitmap.createBitmap(1000, 1000, Bitmap.Config.ARGB_); The activity still crush after 3 times of home and return. I have added this line to the modified lunarlander and the famous RockScissorsPaper tutorial to test, they all crashed. I don't understand this : Didn't I release memory since thread.join() was called?? I really need this bitmap for my application and I want to access it in my thread, does anyone have any idea ?? Thanks if there are any clues or suggestions, I would be very glad and thankful. Steven -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] plzz give a clarification
On Tue, Oct 19, 2010 at 1:35 AM, asha ashamala...@gmail.com wrote: I studied some documents n am more interested to know abt monkey tool lyk what it really do? How it does ? This is explained here: http://developer.android.com/guide/developing/tools/monkey.html My major question is “it generates a pseudo random user events”--- right? That's what it says. Who generates these pseudo random events? The monkey. Will they be available and when the user performs an activity the monkey will fetch the corresponding event and throw? I don't understand this question. or the monkey tool by itself generates it and throw when an activity is performed by the user? I don't understand this question. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need to change font color of pop up letter while scrolling through Contact List
On Tue, Oct 19, 2010 at 1:13 AM, Krishnendu Das krishnendu.w...@gmail.comwrote: Please help to solve this issue. You have not provided enough information to help you solve your problem. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Picking an activity
I am using ACTION_PICK_ACTIVITY to have users pick an app from a list. But how do you get the 'Use by default...' checkbox to show up at the bottom of the dialog? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] About the character encoding
Chinese guys, any comments about this? Julio On Thu, Oct 21, 2010 at 6:05 AM, Marcin Orlowski webnet.andr...@gmail.comwrote: On 20 October 2010 21:53, Julio Martins martins.ju...@gmail.com wrote: Friends, I am developing an application that has a module for sending SMS alerts. I'm worried about the character encoding. What better way to encode the string to be sent and the receiver not interpret as funny characters. Has anyone experienced this? Especially characters that are not part of my alphabet as Greek characters or Chinese characters. never sent chinese nor greek, but I'd bet - UTF. At least that's what I use here for polish accented chars. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Keyboard log for reference
On Tue, Oct 19, 2010 at 10:51 PM, Android Test aandroidt...@gmail.comwrote: Is it possible? Write your own keyboard or modify the firmware to hack the built-in one? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Distributing free licenses to paid apps
Jeez, folks. Google can barely keep the Market running as it is and you're asking for more features? I vote they work on making the system they have reasonably reliable first. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] develop mp3 player on android platform
On Tue, Oct 19, 2010 at 10:04 PM, zamesking zames.k...@gmail.com wrote: Can any guide me where to get started? http://developer.android.com/index.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sms that Allow Permission
On Tue, Oct 19, 2010 at 3:11 PM, Dliswa dliswa.andr...@gmail.com wrote: How can I send SMS from Emulator A to Emulator B such that when Emulator B receive a Text message (After the Permission is Granted to emulator B) then Emulator B gets its GPS Coordinates and send it As a SMS in Respond to Emulator A. http://developer.android.com/reference/android/telephony/SmsManager.html http://developer.android.com/reference/android/telephony/SmsMessage.html http://developer.android.com/reference/android/location/LocationManager.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to fill the irregular shape with the red color?
On Tue, Oct 19, 2010 at 11:05 PM, 子航 陈 chenhaichao1990...@gmail.com wrote: can anybody give me some advice? Look at the various drawing options, like this: http://developer.android.com/reference/android/graphics/Path.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android app with a lot of videos
On Tue, Oct 19, 2010 at 7:52 PM, Greg W pilotg...@gmail.com wrote: But ideally I'd like for the videos to be included in the application download from the market. I'm not even sure if that's possible. It's not. There's some threshold limit based on someone's post in the Android Help Forum, though I don't remember what it was. Is there a way to specify resources in your Android project that will not be stored in the application space but instead stored on the sdcard? Don't think so, but regardless the user would have to have the space (and time to download such a behemoth) to install it to begin with. Very few people are going to be willing to download a 600 MB app. Hell, people complain about anything over 1MB. Do the background download as you already suggested, perhaps giving the user the option to choose what they want to download. Even with an SD card, 600 MB is a ridiculous amount of space for a single app to require on a mobile device. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Keyboard log for reference
This sounds like a security problem, since your kb app could pick up passwords and everything else the user typed. You could do this easily within your own app, though, by overriding the onKeyDown methods in the appropriate widgets. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] IntentService and Threads
We are in the process of refitting some of our recievers and services with IntentServices (mostly to address rare ANR issues - and because IntentService is pretty cool...). In one case we are converting a traditional service to an IntentService. The original service fired off a few methods whose job was to download data from our servers. Each of these requests would spawn a thread of their own to do the work (apparently not fast enough to avoid the occasional ANR). So now we have a question concerning the life cycle of these processes. For example, the following situation demonstrates what is happening: - Start Intent Service - Trigger Download1 - Download 1 thread starts - End Intent Service - Download 1 thread continues. - Download 1 thread ends Our question concerns our exposure to the OS shutting down the Download 1 thread because the Intent Service has terminated before it finishes up. Not sure if it is becomes more or less likely that the OS will view it as something that can be flushed. If the Download 1 thread is more likely to be flushed by OS we will need to take a different approach. 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] How to start a background service on install
I have an app which runs as a background service only. I'l like it to start up when its installed. As its just a background service it doesnt show up on the pane of installed apps. So there is no way for the user to manually start it. I've already regietered for the BOOT_COMPLETED intent which works but I dont want the user to have to power off the phone after the app has been installed, just so as they can start it. I've looked at the following intents: ACTION_PACKAGE_ADDED/CHANGED/ REPLACED/RESTARTED/INSTALL, ACTION_SCREEN_ON/OFF, ACTION_USER_PRESENT, ACTION_TIME_TICK, but it doesnt seem that you can register to listen for them from my manifest. Any idea how I can start my background service without a power off/on? 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
Re: [android-developers] IntentService and Threads
On Fri, Oct 22, 2010 at 1:18 PM, Eric Carman ewcarma...@gmail.com wrote: For example, the following situation demonstrates what is happening: - Start Intent Service - Trigger Download1 - Download 1 thread starts IntentService already uses a background thread. Either do not fork one of your own, or do not use IntentService, but rather use your own thread pool (or just AsyncTask, which has a thread pool) in a regular Service. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Inflate layouts with different density
Sorry if I'm hijacking this thread. How do you know (in Java) which of the three densities Android has chosen. Is there a setting in the layout or somewhere that can be checked? Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://bgies.comhttp://nocrappyapps.com http://bistroblurb.com http://forcethetruth.com http://ihottonight.com --- Everything in moderation, including abstinence (paraphrased) Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies Adversity can make or break you... It's your choice... Choose wisely - Brad Gies Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead On 21/10/2010 4:41 PM, Daniel Drozdzewski wrote: On Thu, Oct 21, 2010 at 11:58 PM, Weedsweeds2...@googlemail.com wrote: I'm wondering if it is possible to inflate a layout using a different density value than the default system density. I have a high density layout, which looks good on the Galaxy Tab (1024x600px, hdpi) and I like to use the same layout on another tablet with the same pixel resolution but medium density. The mdpi layout which is used works on the device but the screen just looks really empty and I would prefer to scale things up. So is there a xml argument for scaling the layout, maybe something similar to Bitmap.Options.targetDensity. Or could this be done with a new LayoutInflater class? Thanks Weeds, You cannot scale layout. I am not even sure what would that mean? Layout is resolution independent anyway. I think that you would you like for your UI elements to occupy bigger or smaller proportion of the screen, As you know, Android 'knows' the density of the platform it sits on and this gets classified into 1 of 3 brackets. Since your 2nd tablet has medium screen density, all you have to do, is to provide a mdpi layout that reflects your desired UI sizes and proportions. In other words, simply go and modify your current mdpi layout to make it 'less empty'. And don't forget that images used in your layouts have to be scaled as well in order to achieve the best results. -- Daniel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to start a background service on install
On Fri, Oct 22, 2010 at 1:23 PM, klavin klavin4...@yahoo.com wrote: I have an app which runs as a background service only. I'l like it to start up when its installed. That is not supported. Please let the user choose when to start up your application. As its just a background service it doesnt show up on the pane of installed apps. That is an invitation to a whole lot of one-star ratings on the Market. By most reports, users do not like installing which have no icons in the launcher. So there is no way for the user to manually start it. Then add an activity that adds value to your application, and along the way sets up the alarm for AlarmManager for your periodic background work. For example, you could allow the user to change the frequency of the background work (including never) in the form of a PreferenceActivity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Inflate layouts with different density
On Fri, Oct 22, 2010 at 1:27 PM, Brad Gies rbg...@gmail.com wrote: Sorry if I'm hijacking this thread. How do you know (in Java) which of the three densities Android has chosen. Is there a setting in the layout or somewhere that can be checked? See the DisplayMetrics class for the absolute and logical density values. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] [BUG?] Images from drawable-nodpi getting scaled
If you don't specify supports-screens or minSdk, then your app will run in compatibility mode, meaning that it's given an HVGA (240x320) virtual screen, which is then scaled as a whole. So your images will be scaled. If you specify minSdk = 4, or supports-screens, then scaling should work as expected. Except one case - if you're running on 1.5. Since 1.5 didn't have support for multiple resolutions, it doesn't understand alternative resource qualifiers and might occasionally grab the wrong image. To prevent this, add -v4 at the end of your qualified resource directory names, e.g. drawable-hdpi-v4, drawable-ldpi-v4. This makes those directories invisible to 1.5. -- Kostya 22.10.2010 20:20, Stephen Jungels пишет: In addition to what was said above, if you study the supports-screens directive carefully and set it properly in your manifest, that will most likely clear things up. On Fri, Oct 22, 2010 at 11:43 AM, TreKingtreking...@gmail.com wrote: On Mon, Oct 18, 2010 at 3:35 PM, Wricyri...@gmail.com wrote: In the old project, I did not specify a target SDK (the manifest did not contain something like:uses-sdk android:minSdkVersion=8 /). Be careful here ... target SDK is NOT the same as minSDK. Was that a typo or are you not clear on this? The new project now usesuses-sdk android:minSdkVersion=8 / in the manifest. So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your target (what you're testing on) is? Why is this happening? How can I load them without scaling while still declaring the minimum SDK? This I don't know - I haven't had to deal with all this screen support stuff as the defaults work out fine for me for now, but I would double check you really want min SDK to 8 and read over this: http://developer.android.com/guide/practices/screens_support.html - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue with Catch Handler
I vaguely recall this being mentioned as a feature of the emulator. Seems odd, though, since it should be easy to fix and it makes debugging that much harder. On Oct 21, 9:58 pm, John Moline molinesys...@gmail.com wrote: Thanks Brad. I did narrow it down to my emulator. If I run the same process without using the emulator, it runs fine. It looks like some sort of permissions or framework issue within the emulator. On Thu, Oct 21, 2010 at 7:22 PM, Brad Gies rbg...@gmail.com wrote: I have had the same problem... It's not the Exception that is null, it's that getMessage() returns null. In some catch blocks (I think mainly or only to do with HTTPClient, but it may happen also with JSON Exceptions... I can't remember) calling e.getMessage() returns null since I updated my SDK to 2.2, and it caused major issues because I normally wrote that to a log file, which meant that my catch block was creating an exception Would love to know the reason... And would be even better if it got fixed. In the meantime, I'm doing this in my catch block if I use the message for ANYTHING: String message = ex.getMessage(); if (message == null) message = null; Then I write the message... It's a major pain... I don't have an answer for you either... just letting you know it's not just you :) Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://bgies.com http://nocrappyapps.com http://bistroblurb.com http://forcethetruth.com http://ihottonight.com --- Everything in moderation, including abstinence (paraphrased) Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies Adversity can make or break you... It's your choice... Choose wisely - Brad Gies Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead On 19/10/2010 9:35 PM, Johnny Molina wrote: Hello, I have recently hit a snag using the Android plugin to Eclipse. For some reason, ALL of my errors being thrown don't initialize and show me the error. Has anyone ever seen this issue before and if so, what did you do to correct it? In particular, I am seeing it when I try to invoke the HTTPGet in a HTTPClient object. If I have no connectivity, then I should get an error. The Catch block does fire when this occurs...however, when I check my general Exception object, the object is NULL (NULL Pointer). Why would this happen if the catch is grabbing the exception? My exceptions used to be workingand I was able to see the stack trace. However, I can no longer see any stack trace regardless of the Exception class I am using. Can someone please help me understand what the heck is wrong with Eclipse, Android, or both? Is there something I am missing on the configuration side?...is this a bug? Mind you, I have already used Stack Overflow for this question. It has been viewed 40 times but no answer yet. I hope anybody on here can help me understand why this is occurring. Thanks in advance, John -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en