[android-developers] How to serve streaming data via ContentProvider?
Hello Experts, We now need to implement a custom ContentProvider to serve streaming data from local wifi network connection, those data will be used by other apps like a media player. But we found that current ContentProvider only support serving database table data or local files, are there any methods we can use to serve streaming data via ContentProvider? Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Optional permissions
Hello experts, I have a app that could use NFC as one of the communication methods. Bu that is optionally, users still could use other alternative ways to communicate. To use NFC my app needs to add permission android.permission.NFC on my manifest.xml file. But if I do this I believe that users who doesnt has a NFC-enabled phones cannot access my app on the market because market has a filter mechanism to prevent those devices to see the apps. So I need a solution that will allows users to see my apps, but my apps also need NFC permission. I want to know: 1. Is there a way to add a permission dynamically at runtime? 2. If there's no such a method to add a dynamic permission, is there a way to declare a permission as Optional Permission so that users still could see download this app from market even if they dont have a NFC hardware on their phone because NFC is just a optional requirement? Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Optional permissions
Thanks Dianne, I will have a try! On Aug 25, 12:09 pm, Dianne Hackborn hack...@android.com wrote: Permissions don't prevent your app from being available. Required features may be inferred from permissions you request. If you don't actually require the feature, then explicitly request the feature with uses-feature setting the attribute android:required=false. You can always see the features your app is requesting with aapt dump badging path-to-apk. Be sure to use the most recent aapt; that is the one Market uses to analyze your app when it is uploaded. On Wed, Aug 24, 2011 at 8:40 PM, Alex Xin xinxi...@gmail.com wrote: Hello experts, I have a app that could use NFC as one of the communication methods. Bu that is optionally, users still could use other alternative ways to communicate. To use NFC my app needs to add permission android.permission.NFC on my manifest.xml file. But if I do this I believe that users who doesnt has a NFC-enabled phones cannot access my app on the market because market has a filter mechanism to prevent those devices to see the apps. So I need a solution that will allows users to see my apps, but my apps also need NFC permission. I want to know: 1. Is there a way to add a permission dynamically at runtime? 2. If there's no such a method to add a dynamic permission, is there a way to declare a permission as Optional Permission so that users still could see download this app from market even if they dont have a NFC hardware on their phone because NFC is just a optional requirement? Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Many apps disappeared in Android Market this morning
Our app disappears in Android Market in China. We found that Adobe Reader and many more apps also disappears. I write to Google for help but they said that Android Market is running well and has no problems Alex On May 17, 9:06 am, john huang john.h...@gmail.com wrote: It's all fine several hours ago, but this morning (+0800 zone), I open Market app again, and I found many apps disappeared in the market. For example, the top 1 app Document to Go in Business category. And only 3 apps of mine still can be found, other apps such like Remote web desktop, Invisible Protector are all disappeared. But they still can be found in web site market. I didn't do any changes for my phone, could any one tell me why and how to restore it? Thank you very much, 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
Re: [android-developers] Re: Free app's visibility in Android Market problem
I'm from China and seems that Google removes some popular free apps availability in China. It's stupid! On 5/17/11, Zsolt Vasvari zvasv...@gmail.com wrote: So does anyone has the same issue? No, actually I just stopped offering the free version of my app now that the Market is in all the important countries of the world -- with the exception of China. Do you know why this happen? No, and the people who do know don't come on here, or at least they never post.But we are talking about the Android Market -- nothing is surprising. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Free app's visibility in Android Market problem
Hi, Today I found that my app doesn't appear in Android Market as normal, I cannot found it any more. Firstly I thought that there must be something wrong with my app, but when I sign to the developer console website, I found that my app's status is Published. I then try to find another device to see it could saw my app in the market, yes, it could. Then I found that devices with capabilities to access paid app could access my free app without problems, but all the devices in my country that cannot access paid app also cannot access my free app! I then verified that I choose the distribution channel to match all the world, including the last option Rest of the World. But most devices still cannot see my app. I also found that some of other apps has the same issue, including some most popular apps like Adobe Reader. So does anyone has the same issue? Do you know why this happen? Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Market question: Why there's no related applications shown for my app on the market?
Hi, I have an app listed on Android Market, those days I noticed that the download times per day is decreasing very fast, so I started to find why, I found that there's no related applications for my app now. On related section of my app on the market, I saw a message said that Android Market could not find applications related to this one. I'm so confused that my app really had related applications before but why it hasn't now? This caused my app very hard difficult to find by users!! Then I went to see my related apps, I found that my app also disappears on their's related sections. It seems that my app lost all connections to all related apps. Does anyone has the same issue or know why this happened? Thanks BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Market question: Why there's no related applications shown for my app on the market?
I tried to write a support email to Google then I received a reply told me that the related apps is depends on some factors. It's useless for me because I never changes my app's description or something like that. On Wed, Feb 2, 2011 at 5:04 AM, TreKing treking...@gmail.com wrote: On Tue, Feb 1, 2011 at 2:58 PM, Greg Donald gdon...@gmail.com wrote: You got that mapped to a hot key, right? :) LOL - that and http://lmgtfy.com/ =D - 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
[android-developers] How to start media player to play HTTP stream?
Hi, I want to use Media Player to play a file which stored on HTTP server, I use following code to play it, but the browser came up and then the browser start the media player to play the file. Intent i = new Intent(Intent.ACTION_VIEW,Uri.parse( http://domain.name/test.mp4;)); startActivity(i); Does anybody know how to directly call the media player to play HTTP streaming content? Thanks, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Comments lost in the developer console and market app
Hi, I don't know why, but some of my app comments lost in the developer console. I cannot find themAll comments after 2010/12/20 is lost. But it seems that comments total number is right. Does any body has the same problem? I also used Market to see my app's comments, same issue. Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Streaming MP3 from HTTP using MediaPlayer
Hi, I'm trying to stream MP3 audio file from HTTP by using MediaPlayer class. I found only few of MP3 files could be played. Most of them cannot stream. MediaPlayer will go into Error state while trying to play. Here's my code: mp.reset(); try { mp.setDataSource(this, src_uri); } catch (Exception e) { mp.release(); FeUtil.showToast(this, Can not play: + src_uri.getPath()); return; } mp.setOnCompletionListener(this); mp.setOnErrorListener(this); mp.setOnPreparedListener(this); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.prepareAsync(); @Override public void onPrepared(MediaPlayer mp) { mp.start(); } I found that on Android 1.6/2.1, the default system media player app also cannot play those MP3 files from HTTP just like what I met here, but on Froyo the default system media player app can play all MP3 files from HTTP. So does anyone know how to stream MP3 from HTTP? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get MAC address?
Hi, guys I'd like to know how to get WIFI MAC address on Android system? Does anyone know how to do this? Thanks in advance! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get notified when list view is displayed
Hi, I have a list view with array adapter to show user some information that retrieved from Internet, As we all know reading data from Internet requires some time to finish, but if I try to read data on getView(), it means user must wait and he/she cannot see anything at that time, the screen is black for long a time because it will cost too much time to finish. This is unacceptable. So I think maybe I can show user a empty list view first and then display a progress dialog to let user know I'm now just reading data. The background task will read data and send message to UI thread when job is done. But there's one problem: I don't know how to get notified when list view is displayed. I mean, I want to know when where to show that progress dialog when I first show user an empty list? Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can not update app on the Market now
Hi, guys I found that I cannot update my app now, today I found that market start to support Recent Changes feature, but when I want to use that feature, I found that I cannot update my app, the publish button is now a gray button. How about you? What's happened? thanks, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Always getting java.lang.VerifyError on 1.6 but fine on 2.1 and 2.2
Hi, I have an app that runs perfect on 2.2 and 2.2 but always getting VerifyError on 1.6 while startup, I don't think that my app cannot run under 1.6 because I don't call any APIs that don't support 1.6. I'm really confused, does anybody has the same issue? How do you solve this problem? Thanks, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Always getting java.lang.VerifyError on 1.6 but fine on 2.1 and 2.2
Hi, thanks for helping me, here's the logcat, you could see it crashes prior to call my onCreate() method. 10-20 07:32:27.490: ERROR/AndroidRuntime(204): java.lang.VerifyError: xcxin.mysecret.mainSecretActivity 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.Class.newInstanceImpl(Native Method) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.Class.newInstance(Class.java:1472) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.os.Handler.dispatchMessage(Handler.java:99) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.os.Looper.loop(Looper.java:123) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.main(ActivityThread.java:4203) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.reflect.Method.invokeNative(Native Method) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.reflect.Method.invoke(Method.java:521) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at dalvik.system.NativeStart.main(Native Method) On Wed, Oct 20, 2010 at 7:11 AM, fadden fad...@android.com wrote: On Oct 19, 2:25 am, Alex Xin xinxi...@gmail.com wrote: I have an app that runs perfect on 2.2 and 2.2 but always getting VerifyError on 1.6 while startup, I don't think that my app cannot run under 1.6 because I don't call any APIs that don't support 1.6. Post the output from logcat. Right above the exception trace should be some arcane-looking messages with VFY in 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.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: Always getting java.lang.VerifyError on 1.6 but fine on 2.1 and 2.2
Thank you! Now I know where I can get those messages. 10-20 09:18:14.973: WARN/dalvikvm(210): VFY: unable to resolve static field 0 (CONTENT_URI) in Landroid/provider/ContactsContract$CommonDataKinds$Phone; 10-20 09:18:14.982: WARN/dalvikvm(210): VFY: rejecting opcode 0x62 at 0x0012 10-20 09:18:14.982: WARN/dalvikvm(210): VFY: rejected Lxcxin/mysecret/mainSecretActivity;.processContact (Landroid/database/Cursor;)V 10-20 09:18:14.982: WARN/dalvikvm(210): Verifier rejected class Lxcxin/mysecret/mainSecretActivity; Now I know where I am wrong, ContactsContract.CommonDataKinds is only available on API Level 5 or higher. Thank you all Alex On Wed, Oct 20, 2010 at 7:39 AM, DanH danhi...@ieee.org wrote: Right ***above*** the exception trace should be some arcane-looking messages with VFY in them. On Oct 19, 6:36 pm, Alex Xin xinxi...@gmail.com wrote: Hi, thanks for helping me, here's the logcat, you could see it crashes prior to call my onCreate() method. 10-20 07:32:27.490: ERROR/AndroidRuntime(204): java.lang.VerifyError: xcxin.mysecret.mainSecretActivity 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.Class.newInstanceImpl(Native Method) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.Class.newInstance(Class.java:1472) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.os.Handler.dispatchMessage(Handler.java:99) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.os.Looper.loop(Looper.java:123) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at android.app.ActivityThread.main(ActivityThread.java:4203) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.reflect.Method.invokeNative(Native Method) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at java.lang.reflect.Method.invoke(Method.java:521) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 10-20 07:32:27.490: ERROR/AndroidRuntime(204): at dalvik.system.NativeStart.main(Native Method) On Wed, Oct 20, 2010 at 7:11 AM, fadden fad...@android.com wrote: On Oct 19, 2:25 am, Alex Xin xinxi...@gmail.com wrote: I have an app that runs perfect on 2.2 and 2.2 but always getting VerifyError on 1.6 while startup, I don't think that my app cannot run under 1.6 because I don't call any APIs that don't support 1.6. Post the output from logcat. Right above the exception trace should be some arcane-looking messages with VFY in 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get notified when there's an incoming call or SMS?
Hi, I'd like to implement a feature that monitors incoming calls and SMS, and blocks them if necessary. But I don't know how to capture such events, could someone tell me how to do that? Thank you very much. Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Market app version question
Hi, In fact I'm now implementing an app mgr, so I want to check all apps latest version that user installed on his/her phone. That's why I must login to Google server :) Thanks BRs, Alex On Wed, Aug 25, 2010 at 11:37 PM, { Devdroid } webnet.andr...@gmail.comwrote: Why you do not make your app quering *your* server then? And your server querys google. To make things clear - I do not mean your server to offer same API google maket does. All you need is to expose recent version number of your app. It can be in any form you app would be able to query and parse (text file, static XML file, whatever). Your app gets that data from your server and compares with versionCode and you're done. It's not importat if you get that info on the server by hand or any other way -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: Service start intent problem
I also want to know why, random FCs on Nexus One. On Mon, Aug 23, 2010 at 7:03 PM, anders anders.hedstr...@gmail.com wrote: Hi, I've got the same issue, here's my code snapshot: (code from the Activity that starts the service) Bundle bundle = new Bundle(); bundle.putString(key1, val1); bundle.putString(key2, val2); Intent intent = new Intent(TheActivity.this, TheService.class); intent.putExtras(bundle); startService(intent); (code from the service that throws the random NPE) @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); bundle = intent.getExtras(); // throws random NPE } I've never gotten the NPE on my HTC Hero with Android 2.1 update1, but I've received 13 crash reports in Market Developer Console, 10 from OTHERS, 3 from Nexus One and 3 from Droid. What is going on here? //Anders On Aug 12, 3:35 am, Alex Xin xinxi...@gmail.com wrote: Hi, Frank I can give it a try. Above code snapshot works perfect and on my Android 1.6 based phone, but random FC on Nexus One. Alex On Thu, Aug 12, 2010 at 9:26 AM, Frank Weiss fewe...@gmail.com wrote: Does it FC when you use getIntent() instead of the parameter to onStart? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] Market app version question
Hi, I've check out the android-market-api, it's great but I have a problem: It requires me to use my Google account to login, I can do that, but if I ask my user to to the same thing, are there any risks for my users that their google account may banned because too many connections to Google server? Thanks On Mon, Aug 23, 2010 at 9:52 PM, { Devdroid } webnet.andr...@gmail.comwrote: On 23 August 2010 15:41, Alex Xin xinxi...@gmail.com wrote: oh, sorry for my poor English, I mean, if I know a app's package name and that app is listed on Android Market, are there any ways I can get its version from market using SDK? then I could know if I need a software update http://code.google.com/p/android-market-api/ -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Market app version question
oh, sorry for my poor English, I mean, if I know a app's package name and that app is listed on Android Market, are there any ways I can get its version from market using SDK? then I could know if I need a software update On Mon, Aug 23, 2010 at 8:44 PM, TreKing treking...@gmail.com wrote: On Sun, Aug 22, 2010 at 11:49 PM, Alex Xin xinxi...@gmail.com wrote: Are there any ways I could use to get the installed app's latest version from Market? Just like some version tracking app. Can you elaborate? I'm not quite sure what you're asking. - 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
[android-developers] Market app version question
Hi, Are there any ways I could use to get the installed app's latest version from Market? Just like some version tracking app. Thanks BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to install package without asking user just like market app?
Sorry for my poor English. I'm from China, speaking English is always a difficult task for me. I mean, if I try to use Intent to install a package, an install activity will activate and ask user if it could install that app, but market will ask user only once, no that install activity shown up. Can I implement a same feature? Thanks and BRs, Alex On Fri, Aug 13, 2010 at 9:25 AM, Indicator Veritatis mej1...@yahoo.comwrote: That is possible, but the OP really needs to state more clearly what problem he is trying to solve. Until he does, responding to him is a waste of time and bandwidth. On Aug 12, 11:29 am, TreKing treking...@gmail.com wrote: On Thu, Aug 12, 2010 at 9:04 AM, Alex Xin xinxi...@gmail.com wrote: How to install package without asking user just like market app? You can't. Well, maybe if you build your own firmware. On Thu, Aug 12, 2010 at 12:13 PM, Frank Weiss fewe...@gmail.com wrote: Where do you see Market app installing packages without asking user? I'm assuming he means how the Market App auto-updates itself. - 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
[android-developers] How to install package without asking user just like market app?
Hi, How to install package without asking user just like market app? Thanks BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Service start intent problem
Hi, I've found a problem that may random FCs on some certain phones, Here's the code snapshot: Intent i = new Intent(); i.setClasss(this, MyService.class); i.putExtra(tag, test); startService(i); public void onStart(Intent intent, int startId ){ String str = intent.getExtras().getString(tag); ... } Now if I try to get string that I passed in service startup routine, it will random FCs, system will throw a Null Pointer Exception. Does anyone has the same issue? Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Service start intent problem
Hi, Frank I can give it a try. Above code snapshot works perfect and on my Android 1.6 based phone, but random FC on Nexus One. Alex On Thu, Aug 12, 2010 at 9:26 AM, Frank Weiss fewe...@gmail.com wrote: Does it FC when you use getIntent() instead of the parameter to onStart? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Do we need to call System.gc() ?
Hi, Do we need to call System.gc() to indicate that system should do a garbage collection or just let system to choose when to collect garbage and free it? Because my app will random FCs on certain phones, but if I add some calls to System.gc(), then there were no FCs. Thanks BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ERROR IN C:\Users\lenovo\Desktop\android-sdk_r06-windows\android-sdk-windowsSDK Setup.exe
Try http, it works for me On Tue, Aug 10, 2010 at 12:25 PM, Bob Kerns r...@acm.org wrote: Has this (https) ever worked for anyone, ever? On Aug 9, 4:05 pm, Kwan Cheng yukwanch...@gmail.com wrote: I think you can fix it by turning force http its on the getting started page On Aug 9, 2010 4:46 PM, izzet.ulas izzet.u...@gmail.com wrote: I've been taking Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: Connection timed out: connect error for 2 weeks. I am getting crazy.. =(( What shoul I do? Please help... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: Does all Android Devices support Map API
Are there any ways that we can install Google API and apps on those devices? On Mon, Aug 9, 2010 at 6:47 AM, Jonas Petersson jonas.peters...@xms.sewrote: Hi again Nithin, Sorry, for the somewhat late response On 08/07/2010 07:36 AM, Nithin wrote: Sony's first release (X3) have lot of bugs. [...] So, X3 have lot of bugs and your application won't work properly in X3. Maybe because of that your application is rejected. I am not sure any other issue is there. Are you saying this X3 was ever actually properly released? It is my understanding that X3 (aka Rachael) was only every used internally and by the time it was actually released it was called X10. In any case you misunderstood: my application was NOT rejected at all. As I said, Sony Ericsson even used it for their own promotional video and I had several unofficial positive messages from people at SonyEricsson in Lund, happily using it around the time the YouTube video was put up. No doubt you are right that some early builds were broken, but I've heard of no official X10 releases having problems installing my application. Personally, I wouldn't worry about early non-released firmwares being incomplete - that's their purpose. Anyone STILL using them can hardly expect everything to work. Best / Jonas On Aug 5, 12:08 pm, Jonas Peterssonjonas.peters...@xms.se wrote: On 08/05/2010 08:19 AM, Nithin wrote: Sony Xperia first release don't have google Map API, now they updated google Map API in X10 Could you clarify what you mean? My app Prisjakt uses the map API and was demoed by internal Sony Ericsson people in this demo from Nov 19 last year:http://www.youtube.com/watch?v=e9l7eXhcnvM This was long before the release of X10 which was their first Android phone and it certainly worked already then (although the map usage isn't shown in this video it certainly was in the application). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] Does all Android Devices support Map API
The answer is NO. For example, Lenovo LePhone is an Android 1.6 based device, but it doesn't support any of Google APIs, it even doesn't support Google search, the default search engine on this phone is Baidu not Google, you cannot install GTalk/GMail/Market and other Google apps on this phone. On Tue, Aug 3, 2010 at 12:06 PM, Jingwen Xiong jeanie_...@hotmail.comwrote: Hi all, I am currently developing an android application that uses android google map API. I am wondering does all android devices support this add-on api?? If not, how could I detect wheter the device support or doesn't support map API programatically. Any comments and suggestion are welcome. Thanks very much! Jingwen -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] How to unload image from memory?
Hi, Are there any ways that I can unload unused images from memory? For example I want to unload background pictures in order to save memory when my activity is going to background? I want to this because my app will force close on Nexus One, from the logcat I found it was caused due to out of memory. Thanks Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] renaming a image file on sd card
That what I used in my code: public static boolean rename(String orig_name, String new_name, String path) { File Operator1 = new File(path, orig_name); File Operator2 = new File(path, new_name); if (Operator1.exists() == false) { return false; } if (Operator2.exists() == true) { return false; } try { boolean r = Operator1.renameTo(Operator2); return r; } catch (Exception e) { return false; } } On Thu, Jun 17, 2010 at 2:49 PM, focode programarun...@gmail.com wrote: i have to change the name of a jpg file , for that i have written the following code sdcard = Environment.getExternalStorageDirectory(); from = new File(sdcard,imagePath.substring(8).toString()); to = new File(sdcard,/DCIM/RoseVille_+Info.getText() +_+Amount.getText()+_+timeStampFormat.format(n ew Date())+.jpg); if(from.renameTo(to)==true) { /// if renamming is successfull; } this code creates a new file with the required name while the file which i wanted to change is still their on sd card , if i remount the sd card then the old file gets deleted and the renamed file remains their. so my problem is how to rename the file without remounting the sd card thanks and regards focode -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Strange out of memory issue on Nexus One
Hi, I'm using DDMS to track my app's allocation event and heap memory size. I found that my app only use 2M-4M heap memory, so it's impossible to have out of memory issue. thanks BRs Alex On Thu, Aug 5, 2010 at 2:17 AM, Romain Guy romain...@android.com wrote: The amount of RAM your phone has doesn't matter. One a WVGA device, the maximum amount of memory you can use in your app is 24 MB. You are using too much memory (or leaking memory) in yoru app. On Wed, Aug 4, 2010 at 11:14 AM, Alex Xin xinxi...@gmail.com wrote: Hi, All I'm now facing a very strange out of memory issue on Nexus One. I have a user leaves a comment in market said that my app always got force closed on his Nexus One, then I try to contact that user and ask for the logcat. Here's the logcat: E/AndroidRuntime( 4016): FATAL EXCEPTION: main E/AndroidRuntime( 4016): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 4016): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 4016): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 4016): at android.content.res.Resources.loadDrawable(Resources.java:1767) E/AndroidRuntime( 4016): at android.content.res.Resources.getDrawable(Resources.java:588) E/AndroidRuntime( 4016): at android.widget.ImageView.resolveUri(ImageView.java:489) E/AndroidRuntime( 4016): at android.widget.ImageView.setImageResource(ImageView.java:274) E/AndroidRuntime( 4016): at xcxin.filexpert.FileAdapter.getView(FileAdapter.java:273) E/AndroidRuntime( 4016): at android.widget.AbsListView.obtainView(AbsListView.java:1294) E/AndroidRuntime( 4016): at android.widget.GridView.makeAndAddView(GridView.java:1219) E/AndroidRuntime( 4016): at android.widget.GridView.makeRow(GridView.java:265) E/AndroidRuntime( 4016): at android.widget.GridView.fillDown(GridView.java:218) E/AndroidRuntime( 4016): at android.widget.GridView.fillGap(GridView.java:185) E/AndroidRuntime( 4016): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) E/AndroidRuntime( 4016): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2485) E/AndroidRuntime( 4016): at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime( 4016): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 4016): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4016): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 4016): at dalvik.system.NativeStart.main(Native Method) As we all could see, we have an out of memory issue here, here's the code that cause this exception: vh.iv.setImageResource(R.drawable.zip); I try to render a item with image. The problem is that this app works great on other phones, include HTC Dream, which only has 192MB of RAM, but Nexus One has 512MB of RAM. So if it's really the memory leak issue, why it's not in Dream? Does anyone has the same issue? How do you solve that? Thank you BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android
Re: [android-developers] Re: Strange out of memory issue on Nexus One
Hi Mathias, Thanks for the link, it's very useful. I'm so confused why this issue only happens on Nexus One? On Thu, Aug 5, 2010 at 6:11 PM, Mathias Lin m...@mathiaslin.com wrote: Alex, see this: http://stackoverflow.com/questions/3238388/android-out-of-memory-exception-in-gallery/3238945#3238945 On Aug 5, 2:54 pm, Alex Xin xinxi...@gmail.com wrote: Hi, I'm using DDMS to track my app's allocation event and heap memory size. I found that my app only use 2M-4M heap memory, so it's impossible to have out of memory issue. thanks BRs Alex On Thu, Aug 5, 2010 at 2:17 AM, Romain Guy romain...@android.com wrote: The amount of RAM your phone has doesn't matter. One a WVGA device, the maximum amount of memory you can use in your app is 24 MB. You are using too much memory (or leaking memory) in yoru app. On Wed, Aug 4, 2010 at 11:14 AM, Alex Xin xinxi...@gmail.com wrote: Hi, All I'm now facing a very strange out of memory issue on Nexus One. I have a user leaves a comment in market said that my app always got force closed on his Nexus One, then I try to contact that user and ask for the logcat. Here's the logcat: E/AndroidRuntime( 4016): FATAL EXCEPTION: main E/AndroidRuntime( 4016): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 4016): at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 4016): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 4016): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 4016): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 4016): at android.content.res.Resources.loadDrawable(Resources.java:1767) E/AndroidRuntime( 4016): at android.content.res.Resources.getDrawable(Resources.java:588) E/AndroidRuntime( 4016): at android.widget.ImageView.resolveUri(ImageView.java:489) E/AndroidRuntime( 4016): at android.widget.ImageView.setImageResource(ImageView.java:274) E/AndroidRuntime( 4016): at xcxin.filexpert.FileAdapter.getView(FileAdapter.java:273) E/AndroidRuntime( 4016): at android.widget.AbsListView.obtainView(AbsListView.java:1294) E/AndroidRuntime( 4016): at android.widget.GridView.makeAndAddView(GridView.java:1219) E/AndroidRuntime( 4016): at android.widget.GridView.makeRow(GridView.java:265) E/AndroidRuntime( 4016): at android.widget.GridView.fillDown(GridView.java:218) E/AndroidRuntime( 4016): at android.widget.GridView.fillGap(GridView.java:185) E/AndroidRuntime( 4016): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) E/AndroidRuntime( 4016): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2485) E/AndroidRuntime( 4016): at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime( 4016): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 4016): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4016): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4016): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 4016): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 4016): at dalvik.system.NativeStart.main(Native Method) As we all could see, we have an out of memory issue here, here's the code that cause this exception: vh.iv.setImageResource(R.drawable.zip); I try to render a item with image. The problem is that this app works great on other phones, include HTC Dream, which only has 192MB of RAM, but Nexus One has 512MB of RAM. So if it's really the memory leak issue, why it's not in Dream? Does anyone has the same issue? How do you solve that? Thank you BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group
Re: [android-developers] Thread
Try AsyncTask On Wed, Aug 4, 2010 at 4:43 PM, perumal316 perumal...@gmail.com wrote: Hi All, I want to write a separate Thread within my application(to do Bluetooth connection). Any idea where I can find any reference for help to write Threads in Android? I searched online but could not find any proper reference. Thanks In Advance, Perumal -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Strange out of memory issue on Nexus One
Hi, All I'm now facing a very strange out of memory issue on Nexus One. I have a user leaves a comment in market said that my app always got force closed on his Nexus One, then I try to contact that user and ask for the logcat. Here's the logcat: E/AndroidRuntime( 4016): FATAL EXCEPTION: main E/AndroidRuntime( 4016): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 4016):at android.graphics.Bitmap.nativeCreate(Native Method) E/AndroidRuntime( 4016):at android.graphics.Bitmap.createBitmap(Bitmap.java:468) E/AndroidRuntime( 4016):at android.graphics.Bitmap.createBitmap(Bitmap.java:435) E/AndroidRuntime( 4016):at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) E/AndroidRuntime( 4016):at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) E/AndroidRuntime( 4016):at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) E/AndroidRuntime( 4016):at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) E/AndroidRuntime( 4016):at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) E/AndroidRuntime( 4016):at android.content.res.Resources.loadDrawable(Resources.java:1767) E/AndroidRuntime( 4016):at android.content.res.Resources.getDrawable(Resources.java:588) E/AndroidRuntime( 4016):at android.widget.ImageView.resolveUri(ImageView.java:489) E/AndroidRuntime( 4016):at android.widget.ImageView.setImageResource(ImageView.java:274) E/AndroidRuntime( 4016):at xcxin.filexpert.FileAdapter.getView(FileAdapter.java:273) E/AndroidRuntime( 4016):at android.widget.AbsListView.obtainView(AbsListView.java:1294) E/AndroidRuntime( 4016):at android.widget.GridView.makeAndAddView(GridView.java:1219) E/AndroidRuntime( 4016):at android.widget.GridView.makeRow(GridView.java:265) E/AndroidRuntime( 4016):at android.widget.GridView.fillDown(GridView.java:218) E/AndroidRuntime( 4016):at android.widget.GridView.fillGap(GridView.java:185) E/AndroidRuntime( 4016):at android.widget.AbsListView.trackMotionScroll(AbsListView.java:2944) E/AndroidRuntime( 4016):at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:2485) E/AndroidRuntime( 4016):at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime( 4016):at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime( 4016):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 4016):at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 4016):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4016):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 4016):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 4016):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 4016):at dalvik.system.NativeStart.main(Native Method) As we all could see, we have an out of memory issue here, here's the code that cause this exception: vh.iv.setImageResource(R.drawable.zip); I try to render a item with image. The problem is that this app works great on other phones, include HTC Dream, which only has 192MB of RAM, but Nexus One has 512MB of RAM. So if it's really the memory leak issue, why it's not in Dream? Does anyone has the same issue? How do you solve that? Thank you BRs, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: A very strange ServerSocket.accept problem
Hi Arjun I'm now trying to implement a Web server, and I use IE and Chrome to connect to my server. On Wed, Aug 4, 2010 at 3:38 AM, Arjun arjunf...@gmail.com wrote: Can you please show some more information from the log cat.. and at the same time need to see the client code where it gets connected to the server port. I think it is sucefully creating the server socket, the problem seems with the client and where client is not polling to the server port. Thanks, Arjun. On Aug 3, 8:26 am, Alex Xin xinxi...@gmail.com wrote: Hi Oscar I have no firewall installed.. Alex On Tue, Aug 3, 2010 at 11:11 PM, Oscar oscar...@gmail.com wrote: Do you have a firewall or something like that, it´s maybe the problem On Aug 3, 8:56 am, Alex Xin xinxi...@gmail.com wrote: Hi, I have asked this question before but no answers, so I post again hope that someone might help me, thank you. I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start();} catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break;} } } } My target device is running on Android 1.6 2.1 When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. I found that if I establish any connections from my phone to computer, then my phone could be successfully found that there're incoming connections and of course, accept them. In emulator, above code works fine, has no this strange problem. Is that my phone's bug or I have something wrong in my code? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Why is Android so buggy?
Android is buggy, yes, I totally agree with you. The most buggy release is Froyo, in Froyo, I cannot use Java NIO selector anymore, but it works fine in previous releases. On Mon, Jun 7, 2010 at 5:25 AM, blahblah...@gmail.com blahblah...@gmail.com wrote: It seems that Android is very buggy compared not only to the iPhone, but to pretty much any other software. It's not just minor bugs either - pretty much every developer will come across many serious bugs. Some examples: - When you run the sdk setup.exe, the very first thing that happens is that it informs you that it can't connect using https, so you have to change the options to use 'http' instead. This appears to be a bug in the .exe rather than any kind of user issue because the https url works fine in the browser and this error seems to affect everyone. Sure, it's trivial to work around (just do a google search and you figure it out in 5 seconds), but the user shouldn't have to do that. It makes it look unprofessional. - When you view a TabWidget in the layout editor it crashes. - Every time you run an app in the emulator, it starts off with the screen locked so you need to press the Menu key. - Various socket bugs (or perhaps all the same bug) related to IOException not happening. Even something as simple as just trying to connect to a remote host that is not listening will cause it to hang instead of immediately returning an error. All of these bugs have been logged for months (some by me, some by other people) with no indication of any fix. At the moment I'm just using the emulator, but I'm wondering if the phones themselves are this buggy or if all the bugs are just in the development environment and emulator. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] A very strange ServerSocket.accept problem
Hi, I have asked this question before but no answers, so I post again hope that someone might help me, thank you. I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6 2.1 When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. I found that if I establish any connections from my phone to computer, then my phone could be successfully found that there're incoming connections and of course, accept them. In emulator, above code works fine, has no this strange problem. Is that my phone's bug or I have something wrong in my code? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: A very strange ServerSocket.accept problem
Hi Oscar I have no firewall installed.. Alex On Tue, Aug 3, 2010 at 11:11 PM, Oscar oscar...@gmail.com wrote: Do you have a firewall or something like that, it´s maybe the problem On Aug 3, 8:56 am, Alex Xin xinxi...@gmail.com wrote: Hi, I have asked this question before but no answers, so I post again hope that someone might help me, thank you. I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start();} catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break;} } } } My target device is running on Android 1.6 2.1 When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. I found that if I establish any connections from my phone to computer, then my phone could be successfully found that there're incoming connections and of course, accept them. In emulator, above code works fine, has no this strange problem. Is that my phone's bug or I have something wrong in my code? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] why application size increase in market
If you use copy protection, that's true. Market needs extra space to store those security related information. On Mon, Aug 2, 2010 at 12:17 PM, aswani kumar tholeti ensisinf...@gmail.com wrote: Hi Folks, i developed one application its apk file size is 1.x mb.i uploaded apps into android market when i check application on market it's size 2.x.why my application size is increase on android market. is there any possibility to reduce the size of apps on android market. Thanks in Advance Aswan -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Upload large files on the web server on android
See this project, that may help you: http://commons.apache.org/fileupload/ http://commons.apache.org/fileupload/ On Sat, Jul 31, 2010 at 8:12 PM, mudit mudit.a...@gmail.com wrote: I am using javax.microedition.io.HttpConnection class for making a connection and then setting the request method as 'Post'. On Jul 30, 9:44 pm, Alex Xin xinxi...@gmail.com wrote: Do you use HTTP POST to upload your file to android phone? On Fri, Jul 30, 2010 at 7:27 PM, mudit mudit.a...@gmail.com wrote: Hi I want to upload files on a web server in my android app.Currently i am able to upload files around 5mb from the device but more than this gives a outofmemory exception and also makes app very unstable. i am looking for a method using which we can upload the data in the app background plus of bigger size. Any tutorials/ code is highly appreciated. 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Upload large files on the web server on android
Do you use HTTP POST to upload your file to android phone? On Fri, Jul 30, 2010 at 7:27 PM, mudit mudit.a...@gmail.com wrote: Hi I want to upload files on a web server in my android app.Currently i am able to upload files around 5mb from the device but more than this gives a outofmemory exception and also makes app very unstable. i am looking for a method using which we can upload the data in the app background plus of bigger size. Any tutorials/ code is highly appreciated. 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
Re: [android-developers] Re: Media streaming on Android
Which format you tried to stream? If it's MP4, you need to hint that video in order to make it stream ready for RTP/RTSP/HTTP streaming. Use MP4Box to do that work On Mon, Jul 26, 2010 at 7:23 PM, arsalank2 arsala...@gmail.com wrote: Thanks for the link, but the encoded video is not decoded by the Mediaplayer on some devices. Do you know precise details on codec which is correctly decoded by the Mediaplayer on every Android device? On Jul 19, 8:34 pm, nation-x shawn.payme...@gmail.com wrote: Themediaplayer streams videos just fine but they have to be encoded properly for it to work. Try using VLC to encode the video. http://www.youtube.com/watch?v=G7itfBXq6ns Shawn On Jul 19, 5:32 am, arsalank2 arsala...@gmail.com wrote: Hi Android developers, I am trying to stream a video on an Android device, but default Mediaplayer is not able to play the stream. The video can be played offline from SD card. I have tried various codec (H.264, H.263, MPEG-4, AAC etc..) with different profiles, but unable to come up with correct format that is streamable. Can someone please point me to officially supported codec with profile information for networkstreamingon Android devices? Please don't send me the following link, because this list only works in offline mode: http://developer.android.com/guide/appendix/media-formats.html Alternatively, please suggest an application with settings to encode the video. Thanks, Arsalan -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] How to get scroll position in a GridView? getScrollY always return 0
Anyone who could help me on this issue? Thanks a lot!! On Sat, Jul 24, 2010 at 3:34 PM, Alex Xin xinxi...@gmail.com wrote: Hi, I have a GridView in my activity, and I want to save current scroll position while user goes to another place and restore it while user comes back. I try to use GridView.getScrollY and GridView.scrollTo methods, but getScrollY method always return 0 instead of right scroll position. Am I using this method in a wrong way? Could anyone who can teach me how to retrieve the scroll position in a GridView? I searched the Internet found that someone said we can use getSelectedItemPosition and setSelection methods, but this requires user to select at least one item, how about the case that no items is selected? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get scroll position in a GridView? getScrollY always return 0
Hi, I have a GridView in my activity, and I want to save current scroll position while user goes to another place and restore it while user comes back. I try to use GridView.getScrollY and GridView.scrollTo methods, but getScrollY method always return 0 instead of right scroll position. Am I using this method in a wrong way? Could anyone who can teach me how to retrieve the scroll position in a GridView? I searched the Internet found that someone said we can use getSelectedItemPosition and setSelection methods, but this requires user to select at least one item, how about the case that no items is selected? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Hi YuviDroid So this method is just a workround? I still need to find out why my app will crash while orientation changes? On Sat, Jul 24, 2010 at 5:02 PM, YuviDroid yuvidr...@gmail.com wrote: When you specify orientation in configChanges you are telling the OS not to deal with orientation changes in your activity. Therefore, when you now rotate the phone you activity will not be recreated and the layout file will not be inflated again. On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote: Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Portrait Inflate problem
Hi, I've met a very strange issue that my app will crash if user first switch to landscape, then back to portrait. I found that Activity.setContentView() will throw an inflate exception. It said: android.view.InflateException: Binary XML file line #29: Error inflating class unknown This crash will happens on Android 1.6/2.1/2.1-update1, but doesn't happen in 2.2 Froyo. In Froyo, everything works fine. If the XML I used is invalid, it should happens every time when I try to inflate. But why it's okay on the first time of running and switching to landscape? This also only happens on some devices. For example, there two HTC G1 with same software installed on it and has the same configuration, one has this issue and the other one works fine. Could someone help me? I really don't know how to start to solve this issue? Thanks very much! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Portrait Inflate problem
Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - 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] Portrait Inflate problem
Hi, I found that if I add android:configChanges=keyboardHidden|orientation in mainfest.xml for each activities, then everything works fine, no crashes, no reset. Does anyone know why? Thanks a lot On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote: Hi TreKing I stored in my layout file at Project Folder\res\layout\main.xml, I have only one layout for different orientations and screen densities. Thanks Alex On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote: Could someone help me? I really don't know how to start to solve this issue? Where are you storing the layout file? Which folder? Do you have different layouts for different orientations and / or different screen densities? - 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
[android-developers] Are there any ways that allows a developer to leave a reply to the comments in the market?
Hi, I have a free app that has 64% of ratings at 5 starts, but still has 9% of ratings at only 1 start, some of them even said that my app is an useless garbage, so I think maybe I need to leave a reply to those users to explain something or answer their questions. So are there any ways that we could do such thing? Thanks a lot Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Are there any ways that allows a developer to leave a reply to the comments in the market?
You're right, I've already saw that happened. 2010/7/20 Kostya Vasilyev kmans...@gmail.com Especially when you get contradicting comments on the day some new device becomes available. 'Doesn't work on .. - 1 star followed by 'Works on .. - 5 stars' from a different user a while later. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 20.07.2010 19:10 пользователь Pent tas...@dinglisch.net написал: Yes I'm starting to detest those market comments because it's extremely detrimental to my blood pressure not being able to answer them. Pent -- You received this message because you are subscribed to the Google Groups Android Developers ... -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] How to uninstall application?
Hi, there I'm now implementing an app management tool, but I don't know how to uninstall an application using SDK? Could anyone tell me this? Thanks a lot Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: 回复: [android-developers] How to uninstall application?
Thanks for the reply! It's very useful. I have another question: How to export apk file of a selected package? 2010/7/17 YuviDroid yuvidr...@gmail.com I don't think you can uninstall an app without user confirmation. I found a couple of other posts about this that might be useful to you here: http://android.amberfog.com/?p=98 http://android.amberfog.com/?p=98 http://osdir.com/ml/AndroidDevelopers/2009-08/msg01409.html http://osdir.com/ml/AndroidDevelopers/2009-08/msg01409.htmlHope it helps! Yuvi 2010/7/17 Taoyi Guo taoyi@gmail.com i am interest in this too 在 2010-7-17 下午2:07,Alex Xin xinxi...@gmail.com编写: Hi, there I'm now implementing an app management tool, but I don't know how to uninstall an application using SDK? Could anyone tell me this? Thanks a lot Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- YuviDroid http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Does anybody know why PackageManager.getApplicationIcon() doesn't work in Android 2.2 Froyo?
Hi, all We found that PackageManager.getApplicationIcon always return default app icon in Android 2.2 Froyo. But works perfect in previous Android release like 1.6/2.1 Does anybody knows why? Does Google change this API's behavior in 2.2? Thanks! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Socket connection question
Thanks for explanation. Are there possibles if I use NDK to do that? On Fri, Jul 9, 2010 at 5:12 PM, Indicator Veritatis mej1...@yahoo.comwrote: The normal Java socket classes (Socket, DatagramSocket, SocketImpl, DatagramSocketImpl, ServerSocket) do force you to choose between TCP (stream) and UDP (datagram). They give you no control over choosing the layers below IP, so you cannot choose between WiFi and cellular. On Jul 8, 5:20 pm, piwaf j...@ahg.net wrote: But you can defenitly open sockets, use the normal java socket classes. But I don't know if you can choose the network type to use. On Jul 8, 11:41 am, Kostya Vasilyev kmans...@gmail.com wrote: Alex, If you mean 3G vs. Wifi - I think the answer is no. I believe Android maintains only one data connection option at a time, although it can be either Wifi, or, in its absence, cellular (HSDPA / 3G / EDGE / GPRS, depending on the phone and the network). -- Kostya 08.07.2010 19:34, JoksanCPEN пишет: I don't think so. I think that the problem here is that carriers doesn't want people using direct port connections over their network. If you find something let me know, Ohh and if you know how to read socket on android let me know also. On Jul 5, 1:48 am, Alex Xinxinxi...@gmail.com wrote: Hi, Are there any methods which I can use to establish a socket connection that only use 3G network? Thank you a lot! Alex -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problems while working with Android 2.2 Froyo - Need help - Thanks very much!
Does anybody have the similar issues? Are there any guidelines about how to solve compatibility problems while trying to let app works on different Android platforms? My app use Java NIO as core functions, I cannot imagine if I can't use that class anymore.. Thanks a lot... Alex On Mon, Jul 5, 2010 at 4:11 PM, Alex Xin xinxi...@gmail.com wrote: *Hi,* * * *I have a problem while trying to run my app in new Android 2.2 Froyo emulator and real device Nexus One.* *The problem is that when I try to call java.nio.channels.Selector.wakeup() method, it will throw a runtime exception NullPointerException. But this code works very well on all previous releases of Android platform.* * * *Does anybody know why in Froyo this method doesn't work as expected?* * * *thanks very much* * * *Alex* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Making Video files Android ready for playback over HTTP
Thank you!! This post is very useful for me!! On Fri, Jul 9, 2010 at 9:43 PM, Samuh samuh.va...@gmail.com wrote: Mark: Thank you! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com 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] Problems while working with Android 2.2 Froyo - Need help - Thanks very much!
*Hi,* * * *I have a problem while trying to run my app in new Android 2.2 Froyo emulator and real device Nexus One.* *The problem is that when I try to call java.nio.channels.Selector.wakeup() method, it will throw a runtime exception NullPointerException. But this code works very well on all previous releases of Android platform.* * * *Does anybody know why in Froyo this method doesn't work as expected?* * * *thanks very much* * * *Alex* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: paypal mobile payment allowed?
Some Paypal employees in China told me that I can list my app in market as free but use their payment library in my app to ask user to pay for it. They even told me that Google allow this. Those Paypal employees said that because Google doesn't allow Chinese developers to publish paid apps in market so their solution is a very good alternative method to avoid using of Google Checkout and get revenue from free apps. I don't think it's legal so I refused this suggestion. But I still want to know why Google has this discrimination policy that doesn't allow developers from China or other countries to publish their apps as paid app? Apple has no this policy and we can list our apps as paid in Apple market. On Tue, Jul 6, 2010 at 12:57 PM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: Another issue is the pay-once-support-forever model. Personally, I'd rather give the app out for free and run ads than sell it once and have to support the darn thing forever. Until the Android market supports a subscription model, I won't be selling any apps. -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.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] Socket connection question
Hi, Are there any methods which I can use to establish a socket connection that only use 3G network? Thank you a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can I put a donation link in my free app?
Hi, Chandana Thanks for this very useful post! From the post one of Google employee wrote: *Our policies are intended to protect users from a situation where an app is listed for free, but then actually requires a payment inside the app in order for it to function. * * * *My question:* *User can use my free app in full function mode without any payment required. There's no any notification to user that they should donate in order to use my app, just a donation link in app's About dialog. What I want to add is just a donation, so my case is not the situation that they try to prevent. Does Google allow this?* * *thank you Alex On Sun, Jun 27, 2010 at 10:36 PM, Chandana Napagoda cnapag...@gmail.comwrote: Hi, I think you need to go through these post's. They said you dev account might be banned. http://www.google.com/support/forum/p/Android+Market/thread?tid=588c37c3f334107dhl=en Chandana On 27 June 2010 18:46, Alex Xin xinxi...@gmail.com wrote: Hi, folks I want to login my app as free app, but I think maybe I can put a donation link in my app, of course, my users can use my app without any donations. I don't sell my app. Does Google allow developer to do this? Thanks a lot Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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.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] How to keep android phone both connected to WIFI and 3G network?
Hi, folks I have a application that requires both connected to WIFI and 3G mobile network, but I found that if I switch to WIFI, I'll automatically lost 3G data connection, all connection I made now routes to WIFI. Does anybody know how to keep phone both connected to those networks, and how to choose which network I'll use to connect? thanks Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: rtsp client?
Hi, folks Are there any media player in Android can play HTTP stream media files? thanks On Tue, Jun 29, 2010 at 9:10 AM, Andy Savage a...@bluewire.net.nz wrote: With certain types of well formed RTSP streams the mediaplayer class can play it directly. http://m.youtube.com is a great example of some well formed feeds, but most RTSP feeds from the net seem to work fine. I've also managed to get ffserver streaming fine to it using H.264. On Mon, Jun 28, 2010 at 7:28 PM, MobDev developm...@mobilaria.com wrote: afaik you can directly feed that trsp url to the MediaPlayer class... On 28 jun, 12:33, chas__123 charlie.nug...@gmail.com wrote: Hi could someone say if android supports an RTSP stack? We've an RTSP server that we'd like to stream video to an android rtsp client if thats possible thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%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.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] Can I put a donation link in my free app?
Hi, folks I want to login my app as free app, but I think maybe I can put a donation link in my app, of course, my users can use my app without any donations. I don't sell my app. Does Google allow developer to do this? Thanks a lot Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ServerSocket problem
Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ServerSocket problem
more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ServerSocket problem
thanks for reply. It's not an IP problem, my real device and client computer are all connected to local network through a WIFI router, they can connect to each other directly. My phone has IP address: 192.168.0.176 and computer's IP is 192.168.0.126, assigned by DHCP. I found that if I establish any connection from my phone to computer before I start to listen on port, then my phone could be successfully noticed that there're incoming connections and of course, accept them. Why it has this strange network connection behavior? thanks a lot On Sat, Jun 26, 2010 at 1:27 AM, social hub shubem...@gmail.com wrote: do you know what's the ip address you got on the real device. There are chances the real device is on NAT network. In such a case you wont be able to talk directly to the device. On Fri, Jun 25, 2010 at 12:04 PM, Alex Xin xinxi...@gmail.com wrote: more on this problem... it works great in emulator, but always failed on real device On Sat, Jun 26, 2010 at 1:03 AM, Alex Xin xinxi...@gmail.com wrote: Hi, folks I'm now facing a very strange server socket problem, I have a server that will listen on a TCP port, I use the following code to do this work. public class RequestListenerThread extends Thread { private final ServerSocket serversocket; public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); setDaemon(true); } public void run() { Log.v(FE, SMB Server Listening on port + this.serversocket.getLocalPort()); while (!Thread.interrupted()) { try { // Setup incoming client connection Socket socket = this.serversocket.accept(); Log.v(FE, Incoming connection from + socket.getInetAddress()); // Start worker thread Thread t = new WorkerThread(socket); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { Log.v(FE, Network I/O error: + e.getMessage()); break; } } } } My target device is running on Android 1.6. When I run this code, it can start to listen on port but can't accept any incoming connections. When it runs into serversocket.accept function, it never return, just like dead lock. Does anybody has the same issue? How do you solve this problem? Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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.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] ListView and CheckedTextView questions - help me, thanks!!!!
Hi, guys I'm now developing an application that uses a ListView with a CheckedTextView on every item that managed by an ArrayAdapter to support multiple chooses. The contents in my ListView are dynamic, that means, can be changed during runtime. Now I try to use ListView.getCheckedItemPositions() to get all checked items, Because I want to save all the checked positions and auto-check them when user go back to this page again. So I need to save checked results for every page. Here is code that I uses to retrieve the checked item positions: public void addDirSel(String dir, ListView lv) { ListInteger l = null; SparseBooleanArray positions = lv.getCheckedItemPositions(); for(int index =0 ; index lv.getCount(); index++) { if (positions.get(index, false) == true) { if (l == null) { l = new ArrayListInteger(); } l.add(index); } } addDirSel(dir, l); } My questions is: For the first page everything works fine as expected. But when user goes to another page and make some chooses, the result array that ListView returned contains some positions that are never checked. I don't why ListView has this strange behavior. Even for a page that in fact no checked happens but ListView gives me a result that indicates there's one item has been checked. Thanks for your help Alex, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ListView and CheckedTextView questions - help me, thanks!!!!
Or could anyone who can teach me how to get the position of CheckedTextView in its OnClickListener callback? If I can do this it means I can monitor user actions by my own. On Tue, Jun 22, 2010 at 8:41 PM, Alex Xin xinxi...@gmail.com wrote: Hi, guys I'm now developing an application that uses a ListView with a CheckedTextView on every item that managed by an ArrayAdapter to support multiple chooses. The contents in my ListView are dynamic, that means, can be changed during runtime. Now I try to use ListView.getCheckedItemPositions() to get all checked items, Because I want to save all the checked positions and auto-check them when user go back to this page again. So I need to save checked results for every page. Here is code that I uses to retrieve the checked item positions: public void addDirSel(String dir, ListView lv) { ListInteger l = null; SparseBooleanArray positions = lv.getCheckedItemPositions(); for(int index =0 ; index lv.getCount(); index++) { if (positions.get(index, false) == true) { if (l == null) { l = new ArrayListInteger(); } l.add(index); } } addDirSel(dir, l); } My questions is: For the first page everything works fine as expected. But when user goes to another page and make some chooses, the result array that ListView returned contains some positions that are never checked. I don't why ListView has this strange behavior. Even for a page that in fact no checked happens but ListView gives me a result that indicates there's one item has been checked. Thanks for your help Alex, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ListView questions
Hi, folks I have a ListView that contains a custom view looks like this: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal CheckBox android:id=@+id/cb_select android:checked=false android:layout_width=wrap_content android:layout_height=wrap_content android:paddingRight=10px / ImageView android:id=@+id/iv_list_file_icon android:adjustViewBounds=true android:scaleType=fitStart android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=top android:maxWidth=64px android:maxHeight=64px / /LinearLayout My Activity implements OnItemClickListener interface to handle the item click event. Now my question is: If there's no that CheckBox, I can handle the OnItemClickListener.OnItemClick callback, but if I add CheckBox to my custom view, there's no OnItemClickListener.OnItemClick event occurred anymore. But I can touch CheckBox to change its state. That's not what I need, I also want to handle item click event to allow my users chooses a single item and perform specific operations. Does anybody know how to handle item click event in this case? Thanks a lot! Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to launch applications installed in a phone?
Hi, Here's an example, hope this will be useful for you: Intent i = getPackageManager().getLaunchIntentForPackage(ai.packageName); startActivity(i); where ai is an instance of ApplicationInfo object, you can use following call to get all ApplicationInfo instances: Context.listAllApplication(); thanks Alex On Mon, Jun 14, 2010 at 11:10 PM, guich guiha...@gmail.com wrote: Hi, I would like to launch some applications, like the Calculator, the alarm clock, the notepad, the calendar, the camcorder, the camera, the dialer, etc, from my application. Is there an easy way to do that? Is there any place with a list of what are the intent names to launch them? thanks guich -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Content provider implementation questions
Thanks Mark Moto :) my final goal is that I want to provide video/audio/image data to right handlers, of course those data are stored on network file server running SMB sharing service or local file systems. Sorry I still have questions: From Mark's reply I know that maybe I need to implement my own openFile(), this function will return an instance of ParcelFileDescriptor object, in my case I don't know how to create this object. On Mon, Jun 14, 2010 at 10:58 PM, Mark Murphy mmur...@commonsware.comwrote: You can use a ContentProvider to serve files. See the openFile() method. On Mon, Jun 14, 2010 at 10:51 AM, Moto medicalsou...@gmail.com wrote: From what I searched before, ContentProvider is only for allowing Database access to your app from other apps... In your case I'm not sure you would want to use a ContentProvider to access files... You might be able to hack it but I wouldn't recomend it... Try a service... Maybe inside the service open a proxy to listen for incoming requests... :) -Moto On Jun 13, 12:35 pm, Alex Xin xinxi...@gmail.com wrote: Hi, All I'm now trying to implement my own content provider. My original data was stored on network or local/remote file systems, so I want to provide data via input stream. I know that client may call ContentResolver.getnputStream to retrieve the input stream to access data. But I don't know how to implement content provider in this situation, I searched the Internet but all the tutorials for content provider are talks about how to expose data that stored on local database. Could anyone please help me on this or give me some code snippets to show how to expose data that stored on file systems using a content provider? Also could anyone please tell me what happened when client call ContentResolver.getnputStream? I want to know how to return an input stream to my client. Thank you Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy CommonsWare mmur...@commonsware.com http://commonsware.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Content provider implementation questions
Hi, All I'm now trying to implement my own content provider. My original data was stored on network or local/remote file systems, so I want to provide data via input stream. I know that client may call ContentResolver.getnputStream to retrieve the input stream to access data. But I don't know how to implement content provider in this situation, I searched the Internet but all the tutorials for content provider are talks about how to expose data that stored on local database. Could anyone please help me on this or give me some code snippets to show how to expose data that stored on file systems using a content provider? Also could anyone please tell me what happened when client call ContentResolver.getnputStream? I want to know how to return an input stream to my client. Thank you Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How global is the app market?
First of all, I'm a Chinese adn I want to tell you guys the truth about this fast growing market. I know that most of android powered phones sells in this market has no google market pre-installed in their device. In my Lenovo LePhone, which is a Android 1.6 based system, even has no google search built-in but with a baidu search instead. You may ask why, see Google's statement in the previous months, they have already closed their website in China. That's why we cannot see google market in some of phones. There's too many “illegal phones in China, I mean, they'r all smuggled to China. So some of Chines users could see google market in those phones and of course, buy apps there. On Thu, Jun 10, 2010 at 6:18 PM, Kaj Bjurman kaj.bjur...@gmail.com wrote: I don't know why, where or how, but I know that my free Android app, that I only have published on Android market has Chinese users, so they must be able to see my app. On 9 Juni, 20:27, Neilz neilhorn...@gmail.com wrote: Hi. I'm UK based and I'm wondering how much of the world can see and download my apps from the market? For example, the chinese market, which I believe is quite large, can they see UK or US based apps? Or does some kind of specific translation need to be done for this to happen? Or is it a separate market place? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 global is the app market?
Ok, Google has decided to close their local website http://www.google.cn/due to the Internet censorship in China. You could still use google global service site like google.com or gmail.com. But if you try to search some keywords within China you'll find that google.com cannot access for some minutes. Do you know that http://developer.android.com/ is completely blocked in China? So our Chinese developer couldn't update our SDK using the normal ways It's Google's official announcement for this, by David Drummond, SVP, Corporate Development and Chief Legal Officer http://www.google.com/press/new-approach-to-china/update.html FYI On Thu, Jun 10, 2010 at 8:27 PM, Kaj Bjurman kaj.bjur...@gmail.com wrote: What do you mean when you say that google closed their site. What site? I used gmail, google search and google reader when I visited China last month (and I didn't use a proxy) On 10 Juni, 13:12, Alex Xin xinxi...@gmail.com wrote: First of all, I'm a Chinese adn I want to tell you guys the truth about this fast growing market. I know that most of android powered phones sells in this market has no google market pre-installed in their device. In my Lenovo LePhone, which is a Android 1.6 based system, even has no google search built-in but with a baidu search instead. You may ask why, see Google's statement in the previous months, they have already closed their website in China. That's why we cannot see google market in some of phones. There's too many “illegal phones in China, I mean, they'r all smuggled to China. So some of Chines users could see google market in those phones and of course, buy apps there. On Thu, Jun 10, 2010 at 6:18 PM, Kaj Bjurman kaj.bjur...@gmail.com wrote: I don't know why, where or how, but I know that my free Android app, that I only have published on Android market has Chinese users, so they must be able to see my app. On 9 Juni, 20:27, Neilz neilhorn...@gmail.com wrote: Hi. I'm UK based and I'm wondering how much of the world can see and download my apps from the market? For example, the chinese market, which I believe is quite large, can they see UK or US based apps? Or does some kind of specific translation need to be done for this to happen? Or is it a separate market place? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: How global is the app market?
All connections to google.cn now forward to google.com.hk On Thu, Jun 10, 2010 at 10:19 PM, Alex Xin xinxi...@gmail.com wrote: Ok, Google has decided to close their local website http://www.google.cn/due to the Internet censorship in China. You could still use google global service site like google.com or gmail.com. But if you try to search some keywords within China you'll find that google.com cannot access for some minutes. Do you know that http://developer.android.com/ is completely blocked in China? So our Chinese developer couldn't update our SDK using the normal ways It's Google's official announcement for this, by David Drummond, SVP, Corporate Development and Chief Legal Officer http://www.google.com/press/new-approach-to-china/update.html FYI On Thu, Jun 10, 2010 at 8:27 PM, Kaj Bjurman kaj.bjur...@gmail.comwrote: What do you mean when you say that google closed their site. What site? I used gmail, google search and google reader when I visited China last month (and I didn't use a proxy) On 10 Juni, 13:12, Alex Xin xinxi...@gmail.com wrote: First of all, I'm a Chinese adn I want to tell you guys the truth about this fast growing market. I know that most of android powered phones sells in this market has no google market pre-installed in their device. In my Lenovo LePhone, which is a Android 1.6 based system, even has no google search built-in but with a baidu search instead. You may ask why, see Google's statement in the previous months, they have already closed their website in China. That's why we cannot see google market in some of phones. There's too many “illegal phones in China, I mean, they'r all smuggled to China. So some of Chines users could see google market in those phones and of course, buy apps there. On Thu, Jun 10, 2010 at 6:18 PM, Kaj Bjurman kaj.bjur...@gmail.com wrote: I don't know why, where or how, but I know that my free Android app, that I only have published on Android market has Chinese users, so they must be able to see my app. On 9 Juni, 20:27, Neilz neilhorn...@gmail.com wrote: Hi. I'm UK based and I'm wondering how much of the world can see and download my apps from the market? For example, the chinese market, which I believe is quite large, can they see UK or US based apps? Or does some kind of specific translation need to be done for this to happen? Or is it a separate market place? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] How to listen on socket port 80?
Hi, guys I'm new to Android development, now I'm working on a simple HTTP server project. I try to use ServerSocket to listen on port 80 but I failed. There will have an exception if I did this. I have already set INTERNET premission in manifest. I found that everything is Okay if I use port 8080, that's strange for me, why I cannot use port 80? I don't want my users to use another port to connect my server. Thanks very much Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en