[android-developers] Re: save and pass date from ane activity to another activity
Hi Convert Date to String and pass though in intent using putExtra(key,value). and on other Activity in onCreate() , use getIntent().getExtra(Key). Regards Imran Ali On Friday, August 3, 2012 4:04:20 PM UTC+5:30, Sadhna Upadhyay wrote: Hi everibidy, i am making an app in which i need to save date,and pass from one activity to another pls help me, thanks sadhana -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: activity is invoking twice
Hi, Your question is not clear, can you post part of code that has been calling another activity. Hope we can help you, if you will post code or correct details of problem. Regards Imran Ali On Thursday, August 2, 2012 12:12:52 PM UTC+5:30, Sadhna Upadhyay wrote: Hi everybody, i hva multiple activities whe i click on button for moving secon all thje activity is starting twice within a second m not able to find out probllem, please anyone can help me. 2- as i told that i have multiple activity when i went from one to another on every click then one time it automatically start activity and all activity start one by one backword and forward without clicking, why is it happening m in trouble pls guys help me if any one have any idea. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Multiple build created using single library project are not working
Hi Log cat indicate that you have nullpointer exception on line number 302 of your OnAir.java class file. Check in file, what are you using on 302 line number? and is that proper instantiated before use? Regards Imran Ali On Friday, July 13, 2012 4:05:53 PM UTC+5:30, Tushar Lal wrote: LOGCAT OUTPUT: 07-13 15:23:23.954: E/AndroidRuntime(655): FATAL EXCEPTION: main 07-13 15:23:23.954: E/AndroidRuntime(655): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.paulinrio.radio/com.paulinrio.radio.OnAir}: java.lang.NullPointerException 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.widget.TabHost.setCurrentTab(TabHost.java:323) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.view.View.performClick(View.java:2408) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.view.View$PerformClick.run(View.java:8816) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.os.Handler.handleCallback(Handler.java:587) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.os.Handler.dispatchMessage(Handler.java:92) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.os.Looper.loop(Looper.java:123) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-13 15:23:23.954: E/AndroidRuntime(655): at java.lang.reflect.Method.invokeNative(Native Method) 07-13 15:23:23.954: E/AndroidRuntime(655): at java.lang.reflect.Method.invoke(Method.java:521) 07-13 15:23:23.954: E/AndroidRuntime(655): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-13 15:23:23.954: E/AndroidRuntime(655): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-13 15:23:23.954: E/AndroidRuntime(655): at dalvik.system.NativeStart.main(Native Method) 07-13 15:23:23.954: E/AndroidRuntime(655): Caused by: java.lang.NullPointerException 07-13 15:23:23.954: E/AndroidRuntime(655): at com.paulinrio.radio.OnAir.checkmediastate(OnAir.java:302) 07-13 15:23:23.954: E/AndroidRuntime(655): at com.paulinrio.radio.OnAir.onCreate(OnAir.java:99) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-13 15:23:23.954: E/AndroidRuntime(655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-13 15:23:23.954: E/AndroidRuntime(655): ... 18 more On Fri, Jun 29, 2012 at 8:05 PM, Justin Anderson magouyaw...@gmail.comwrote: Can anyone tell me what am I doing wrong. Well, for starters, you didn't really give us any information to help you solve the problem. But, for the crash, take a look at the logcat output... It usually gives some pretty good information about the cause of a crash. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, Jun 29, 2012 at 8:20 AM, Tushar Lal tush...@gmail.com wrote: Hi, I have created a library project containing a service. When I first build it and install it on my phone it works fine, but when I create the second build using the same library project and install it on my phone, the first build works fine but the second one crashes. Also when I run the second build and I go into (SettingApplicationRunning Application) the service is running of the first application. That might explain the reason of crashing of second build. Can anyone tell me what am I doing wrong. Regards: Tushar +91-9711577561 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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
Re: [android-developers] Facebook application, with custom device.
Thanks All. Regards Imran Ali On Thu, Jun 28, 2012 at 4:50 PM, Henry Addo add...@gmail.com wrote: On Thu, Jun 28, 2012 at 10:56 AM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Jun 28, 2012 at 1:35 AM, imran ali imran...@gmail.com wrote: Can i get source code of original FB App? You would have to ask FB, whoever you think FB is. if yes How? If FB is Facebook, getting the source code is likely to be impossible by any legal means. or any other help or guide line to improve look and feel as original Facebook application? That would be a question for Facebook. I doubt that they are monitoring this Google Group for such questions. If FB is facebook, their SDK for Android is on github -- https://github.com/facebook/facebook-android-sdk You can thinker with it then. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.7 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards عمر ا ن علی Syed Imran Ali http://sites.google.com/site/alifamilyinfo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Facebook application, with custom device.
Hi All, I have to develop FB application for my custom device. I got some guide line and skd of FB to build an application. My problem is that , most of thing like login is coming in Dialog with web-view. that i don't want, i want look and feel as original FB app. I am unable to give that look and feel in application (basically due to dialog). Can i get source code of original FB App? if yes How? or any other help or guide line to improve look and feel as original Facebook application? Regrads Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Help with App crackers
Hi, Really, it is very shameful. I think best option to apply in-app billing to sell android application. Regards Imran Ali On Friday, June 15, 2012 11:30:37 AM UTC+5:30, Giuseppe wrote: Dear guys, We work about two months, six people to make possible VOICE PROhttps://play.google.com/store/apps/details?id=com.voiceprofeature=more_from_developer#?t=W251bGwsMSwxLDEwMiwiY29tLnZvaWNlcHJvIl0.born. We use PROGUARD and LICENSING together, but the day after the publication, we found the app cracked herehttp://sinfulandroid.com/applications-26/voice-pro-v1-0-apk-android-24441/ We are serious upset, we work to hard for months and now the app become crack in one night. Our opinion is that GOOGLE LICENSING system has failed, Google must find a different solution to protect our work. I know that this group is for developers question, but frankly, what to develop with this premises ? Giuseppe Porcelli -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Database
Hi Arun, Follow this , http://www.helloandroid.com/tutorials/store-imagesfiles-database. store byte array in db and at time of showing image, convert byte array[from db] to bitmap. Regards Imran Ali On Thursday, June 7, 2012 12:38:15 PM UTC+5:30, arun wrote: hai friends.. how to store a image in database use web services.. any one known plz help me.,,, thanks Arunkumkar A -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Error when switch activity at the second time
Hi, Main,java has a start button that run startActivity(new Intent(main.this, CobaGesture.class)); CobaGesture.java has a back button that run finish(); *startActivity(new Intent(CobaGesture.this, main.class)); // No need of this, it is creating one more instance of main Activity in stack.* * * *So remove this line.* * * *other hand check out either are you doing some on other operation on button click listener or only calling CobaGesture Activity?* *if you are calling only CobaGestureActivity then it will work fine.* * * *Regards* *Imran Ali* On Friday, June 1, 2012 2:03:29 PM UTC+5:30, Yefta Meliala wrote: Hi, i am developing an android application and i need help to solve my problem on my application. My application is consist of 2 activity, main.java and CobaGesture.java. Main,java has a start button that run startActivity(new Intent(main.this, CobaGesture.class)); CobaGesture.java has a back button that run finish(); startActivity(new Intent(CobaGesture.this, main.class)); When the app running, i press the start button the activity changed to CobaGesture, and when i press back button in CobaGesture the activity back to main. But, when i press start again the app is forced close and here's logcat of the error: //when i press the start button for the second time 06-01 14:59:51.836: INFO/InputDispatcher(65): Application is not responding: Window{4079d900 coba.gesture/coba.gesture.main paused=false}. 5006.2ms since event, 5005.3ms since wait started 06-01 14:59:51.836: INFO/WindowManager(65): Input event dispatching timed out sending to coba.gesture/coba.gesture.main 06-01 14:59:51.926: INFO/Process(65): Sending signal. PID: 2730 SIG: 3 06-01 14:59:51.926: INFO/dalvikvm(2730): threadid=4: reacting to signal 3 06-01 14:59:51.957: WARN/ActivityManager(65): Activity destroy timeout for HistoryRecord{4068bea0 coba.gesture/.CobaGesture} 06-01 14:59:51.996: INFO/dalvikvm(2730): Wrote stack traces to '/data/ anr/traces.txt' 06-01 14:59:52.025: INFO/Process(65): Sending signal. PID: 65 SIG: 3 06-01 14:59:52.025: INFO/dalvikvm(65): threadid=4: reacting to signal 3 06-01 14:59:52.435: INFO/dalvikvm(65): Wrote stack traces to '/data/ anr/traces.txt' 06-01 14:59:52.435: INFO/Process(65): Sending signal. PID: 122 SIG: 3 06-01 14:59:52.435: INFO/dalvikvm(122): threadid=4: reacting to signal 3 06-01 14:59:52.556: INFO/dalvikvm(122): Wrote stack traces to '/data/ anr/traces.txt' 06-01 14:59:52.576: DEBUG/dalvikvm(65): GC_CONCURRENT freed 993K, 47% free 4456K/8327K, external 2036K/2548K, paused 13ms+31ms 06-01 14:59:52.605: INFO/Process(65): Sending signal. PID: 125 SIG: 3 06-01 14:59:52.605: INFO/dalvikvm(125): threadid=4: reacting to signal 3 06-01 14:59:52.656: INFO/dalvikvm(125): Wrote stack traces to '/data/ anr/traces.txt' 06-01 14:59:53.676: DEBUG/dalvikvm(65): GC_EXPLICIT freed 231K, 46% free 4535K/8327K, external 2036K/2548K, paused 257ms //error log 06-01 14:59:54.406: ERROR/ActivityManager(65): ANR in coba.gesture (coba.gesture/.main) 06-01 14:59:54.406: ERROR/ActivityManager(65): Reason: keyDispatchingTimedOut 06-01 14:59:54.406: ERROR/ActivityManager(65): Load: 0.62 / 0.35 / 0.46 06-01 14:59:54.406: ERROR/ActivityManager(65): CPU usage from 8027ms to -2ms ago: 06-01 14:59:54.406: ERROR/ActivityManager(65): 85% 2730/ coba.gesture: 78% user + 6.6% kernel / faults: 27 minor 06-01 14:59:54.406: ERROR/ActivityManager(65): 13% 65/system_server: 5.9% user + 7.2% kernel / faults: 1 minor 1 major 06-01 14:59:54.406: ERROR/ActivityManager(65): 0.2% 41/adbd: 0% user + 0.2% kernel / faults: 13 minor 06-01 14:59:54.406: ERROR/ActivityManager(65): 100% TOTAL: 84% user + 15% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): CPU usage from 1849ms to 2454ms later: 06-01 14:59:54.406: ERROR/ActivityManager(65): 72% 2730/ coba.gesture: 69% user + 3.3% kernel / faults: 4 minor 06-01 14:59:54.406: ERROR/ActivityManager(65): 72% 2826/Thread-10: 69% user + 3.3% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 1.6% 2735/Compiler: 0% user + 1.6% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 25% 65/system_server: 8.6% user + 17% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 13% 99/ InputDispatcher: 6.8% user + 6.8% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 10% 76/ SurfaceFlinger: 1.7% user + 8.6% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 1.7% 65/ system_server: 1.7% user + 0% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 1.7% 74/Binder Thread #: 1.7% user + 0% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 1.7% 230/Binder Thread #: 0% user + 1.7% kernel 06-01 14:59:54.406: ERROR/ActivityManager(65): 100% TOTAL: 78% user + 21% kernel what is the meaning of the error? what caused the error? thanks in advance. -- You received this message because you
[android-developers] Why mediaRecorder.start(); goes in infinite loop, on some of android phone like S2 with o/s 2.3.6?
Hi, I have been doing call recording it is working fine, but on some android phone one of them is Samsung S2 with o/s 2.3.6 has been giving abnormal behaviour. This is my code snap //mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);// working for this. mediaRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);// infinite loop on .start(). mediaRecorder.setOutputFormat(audioformat); mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); mediaRecorder.setOutputFile(my file path); mediaRecorder.prepare(); Log.d(TAG, Before .start() method); mediaRecorder.start(); Log.d(TAG, After .start() method); with AudioSource VOICE_CALL (value 4), mediaRecorder.start(); is neither executing nor throwing exception. in my log, I am able to see only Before .start() method., neither below one nor catch() logs. Can any one help me to short out problem? is there any trick that I have been missing? Regards Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 mediaRecorder.start(); goes in infinite loop, on some of android phone like S2 with o/s 2.3.6?
Thank you Asheesh. But is working on most of phone, I am having problem with some specific phone only. Regards Imran Ali On Tuesday, May 29, 2012 1:23:11 PM UTC+5:30, asheesh arya wrote: recording is not possible in android!!! its not a part of sdk!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Cross App callback mechanism
Hi, I don't know which request generated that response. while to BroadCast you must have been passing intent, so put your url in that intent using putExtra(Key,your url); on BroadCastReceiver, you will have onReceive( Context c, Intent intent); so extract that from intent, like intent.getString(Key); In that way you can identify the response of particular request. hope will help you. Regards Imran Ali On Tuesday, May 29, 2012 5:29:38 PM UTC+5:30, Oleksandr Kruk wrote: Thanks Kristopher, Actually that's exactly what I have, an API which provides the developer with access to all necessary data structure and manipulation. I made a draft just to explain better whats the problem: https://lh3.googleusercontent.com/-_NG1V3-5Rck/T8S4hnlIxWI/AD4/kGPgsRqkBxE/s1600/requestExec.png The number 1 is a broadcast receiver that reacts on an action of request execution by Queue Manager service. The problem is that in the receiver (1) I have no way to know what I am supposed to do with that response, because I don't know which request generated that response. I guess I must pass some context information from Some App to Queue Manager App and then back after executing. It can be a name of method to execute or something like that. On Tuesday, 29 May 2012 10:31:01 UTC+1, Kristopher Micinski wrote: It sounds like what you want is basically a message queue.. However, for a cross app solution, I think you'd want something that stores the data persistently somewhere, such as on disk. I'd probably make an API backed by a service that apps would interface to implementing this, if I were you... kris On Tue, May 29, 2012 at 5:06 AM, Oleksandr Kruk sanha1...@gmail.com wrote: Thanks for your answer TreKing! I am sorry, that was an unclear expression, by apps offline I meant they are not running. Exactly, you understood well, but I think I failed to explain that the time frame between storing requests and executing them can be anything like an hour, a day, a month, etc.. So in this context, when an application receives a response, lets say through a broadcast intent it wont know for which request that response was received. Thats why having a callback method associated to request would be better than simply an intent with the result. Imagine a situation: You are in a remote area with no network, you take a landscape photo, open facebook app and simply post that photo (without network). This post would remain in my framework until you have network, which is indefinite time. Now, at the moment you connect to network, lets say two days, it will be posted on facebook (by ManagerApp) and facebook app will get a response from ManagerApp. If you send that response as a broadcast to facebook app, how it is supposed to know that that response is related to that specific photo post you made days ago. Remember that I don't want to make developers to maintain mappings between their app requests and future response in order to solve this situation, all the information must be on the side of the framework (it's cleaner I guess). Thanks again On Tuesday, 29 May 2012 09:16:50 UTC+1, TreKing wrote: On Mon, May 28, 2012 at 10:55 AM, Oleksandr Kruk sanha1...@gmail.com wrote: How can this IntentService update each App information using their business logic when the Apps are offline? What do you mean when the apps are offline? If I understand you correctly, you would simply have to launch an intent or trigger a broadcast from your IntentService that has the information the other apps care about. The other apps would have to know the details of the intent or broadcast structure in order to properly listen for it. The intent would contain the data the app in question was requesting, in some known format. You would not have to know anything about their business logic, that would be up to them. - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en On Tuesday, 29 May 2012 10:31:01 UTC+1, Kristopher Micinski wrote: It sounds like what you want is basically a message queue.. However, for a cross app solution, I think you'd want something that stores the data persistently somewhere, such as on disk. I'd probably make an API backed by a service that apps would interface
[android-developers] Re: Difference btwn following methods
Nop, there is no difference, Both are same it is simple java concept. - in first way you are giving name of object of TextView and second way you are making anonymous object. otherwise every thing is same. Regards Imran ali On Monday, May 28, 2012 11:15:27 AM UTC+5:30, Jovish P wrote: I just want to know any difference is there in the following methods like memory allocation , performance issues TextView txtView = (TextView)findViewById(R.id. username); txtView.setText(Method 1); ((TextView) findViewById(R.id.priority_rel_layout)).setText(priorityList[i]); Regards, Jovish -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Can I have a service run as a seperate process?
Hi, use android:process=processName this in AndroidManifest.xml. this will helpful http://developer.android.com/guide/topics/manifest/application-element.html#proc Regards Imran Ali On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote: I have a package, in which I have n activities and 2 services. Out of the two services, I want one service to run as part of the package, whereas the other service, I want to run as part of a different process. Is this possible? On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote: I have a package, in which I have n activities and 2 services. Out of the two services, I want one service to run as part of the package, whereas the other service, I want to run as part of a different process. Is this possible? On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote: I have a package, in which I have n activities and 2 services. Out of the two services, I want one service to run as part of the package, whereas the other service, I want to run as part of a different process. Is this possible? On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote: I have a package, in which I have n activities and 2 services. Out of the two services, I want one service to run as part of the package, whereas the other service, I want to run as part of a different process. Is this possible? On Tuesday, May 29, 2012 10:51:50 AM UTC+5:30, Put_tiMe wrote: I have a package, in which I have n activities and 2 services. Out of the two services, I want one service to run as part of the package, whereas the other service, I want to run as part of a different process. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: launching an app
Hi, You have to use intent filter to lunch first Activity of other application from your application. Regards Imran Ali On Monday, May 28, 2012 11:20:16 AM UTC+5:30, sourabh wrote: Dear All, How to launch an app programmatically. For example I want to launch an skype app on a click of button through my app. Thanks in advance. Sourabh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SQLiteException: no such table
How can it happen that the table does not exist? In one installation of thousands? -- Seems bad installation of app. so, re-install and try. -- Another reason, phone is on low memory and having no space to create db. so DB has not created and your query is going to ask about table. So, conform it, where are you creating DB on phone internal memory/SD-Card, and is there space for it or not? Regards Imran ali Regards Imran Ali On Thursday, May 24, 2012 11:46:15 AM UTC+5:30, Ralph Bergmann wrote: Hello, my app was released a year ago or so, but now one year later, I get the following error message: android.database.sqlite.SQLiteException: no such table: tracking: , while compiling: SELECT _id, ... How can it happen that the table does not exist? In one installation of thousands? The app accesses the db via an SQLiteOpenHelper. This is my implementation, a little bit shortened: public class DatabaseHelper extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 22; private static final String DATABASE_NAME= de.sportscheck.db; private static DatabaseHelper dh; public static synchronized DatabaseHelper singleton(final Context context) { if (dh == null) { dh = new DatabaseHelper(context); } return dh; } private DatabaseHelper(final Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { createTrainingTable(db); createTrainingStepTable(db); createTrackingTable(db); createBreadcrumbTable(db); createKmTable(db); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion == 12) { db.execSQL(ALTER TABLE ... db.execSQL(ALTER TABLE ... } if (oldVersion == 21) { createKmTable(db); } } private void createTrainingTable(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS .concat(TrainingProvider.TABLE_NAME) + ;); String sql = CREATE TABLE .concat(TrainingProvider.TABLE_NAME) ... .concat(TrainingItem.TYP).concat( TEXT);); db.execSQL(sql); } private void createTrainingStepTable(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS .concat(TrainingStepProvider.TABLE_NAME) + ;); String sql = CREATE TABLE .concat(TrainingStepProvider.TABLE_NAME) ... db.execSQL(sql); } private void createTrackingTable(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS .concat(TrackingProvider.TABLE_NAME) + ;); String sql = CREATE TABLE .concat(TrackingProvider.TABLE_NAME) ... db.execSQL(sql); } private void createBreadcrumbTable(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS .concat(BreadcrumbProvider.TABLE_NAME) + ;); String sql = CREATE TABLE .concat(BreadcrumbProvider.TABLE_NAME) ... db.execSQL(sql); } private void createKmTable(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS .concat(KmProvider.TABLE_NAME) + ;); String sql = CREATE TABLE .concat(KmProvider.TABLE_NAME) ... db.execSQL(sql); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: CheckBoxPreference.setChecked() doesn't take effect in Activity Test
Hi, guess you are using PreferenceActivity. so, check your xml, what have you given android:defaultValue=?, either true or false? Hope it will help you. Regards Imran Ali On Thursday, May 24, 2012 2:10:36 PM UTC+5:30, Ira.Han wrote: Hi, I'm writing a test app which have a operation of click on the CheckBoxPreference, here is my code: public class MyActivityTest extends ActivityInstrumentationTestCase2MyActivity{ . @UiThreadTest public void testEnable() { CheckBoxPreference mMyEnable = (CheckBoxPreference)mActivity.getPreferenceScreen().findPreference(my_enabled); mMyEnable.setChecked(false); Log.v(TAG, ===1=isChecked:+mMyEnable.isChecked()); mMyEnable.setChecked(false); Log.v(TAG, ===2=isChecked:+mMyEnable.isChecked()); wait(4); } } in logcat, the isChecked value actually changed: V/MyAppTest(12589): ===2=isChecked:true V/MyAppTest(12589): ===2=isChecked:false However on GUI, this checkbox not be clicked/unclicked... is there anyone have some ideas? Many thanks Regards Ira -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView with Simple adapter
can you post part of code where your doing visible/invisible of buttons. I think you are doing some mistake in getView(...) method of Adapter. and it is going to mess on scroll of listview. Regards Imran Ali On Thursday, May 24, 2012 2:56:38 PM UTC+5:30, shruthi santosh wrote: My feeds list conatins both text feeds and audio feeds. I have a button to view the complete text and a button to play the audio feeds. I am checking the the type of the feed to make the appropriate button visible. The first four feeds in the list gets the proper buttons but the rest are not proper(i mean some text feeds r getting audio button and some audio feeds are getting text button) Pl. help me with this problem shruthi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ListView with Simple adapter
Hi, why are you doing this View row=super.getView(position, convertView, parent); though you are in getView() Method. so you will get convertView that is same. Ok, follow this, if(convertview==null){ 1. inflate view, 2. check type of data and set visibility 3.set tag of view. }else{ // getTag value } //set values in fields of view. hope it will help you. Regards Imran Ali On Thursday, May 24, 2012 4:22:42 PM UTC+5:30, shruthi santosh wrote: here is the code for getView(), public View getView(int position, View convertView, ViewGroup parent) { View row=super.getView(position, convertView, parent); ViewHolder holder=(ViewHolder)row.getTag(); if (holder==null) { String type=T; holder=new ViewHolder(row); row.setTag(holder); String blog_type = ((TextView)row.findViewById(R.id.type)).getText().toString(); if(blog_type.equals(type)) { holder.button.setVisibility(Button.GONE); holder.text.setVisibility(TextView.VISIBLE); holder.text1.setVisibility(TextView.GONE); holder.button1.setVisibility(Button.VISIBLE); } holder.button.setTag(row); holder.button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub View r=(View)v.getTag(); String type=A; String blog_data = ((TextView)r.findViewById(R.id.blog_data)).getText().toString(); String blog_id = ((TextView)r.findViewById(R.id.blog_id)).getText().toString(); String blog_type = ((TextView)r.findViewById(R.id.type)).getText().toString(); if(blog_type.equals(type)) { playMessage(Integer.parseInt(blog_id)); } } }); holder.button1.setTag(row); holder.button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub View r=(View)v.getTag(); String type=T; String blog_data = ((TextView)r.findViewById(R.id.blog_data)).getText().toString(); String blog_id = ((TextView)r.findViewById(R.id.blog_id)).getText().toString(); String blog_type = ((TextView)r.findViewById(R.id.type)).getText().toString(); String annotation = ((TextView)r.findViewById(R.id.annotation)).getText().toString(); String url = ((TextView)r.findViewById(R.id.url)).getText().toString(); if(blog_type.equals(type)) { Intent message=new Intent(FeedsActivity.this, BlogMessage.class); message.putExtra(blog_data, blog_data); message.putExtra(annotation, annotation); message.putExtra(flag,false); message.putExtra(url, url); startActivity(message); } } }); holder.text1.setTag(row); holder.text1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub View r=(View)v.getTag(); String type=A; String blog_data = ((TextView)r.findViewById(R.id.blog_data)).getText().toString(); String blog_id = ((TextView)r.findViewById(R.id.blog_id)).getText().toString(); String blog_type = ((TextView)r.findViewById(R.id.type)).getText().toString(); String annotation = ((TextView)r.findViewById(R.id.annotation)).getText().toString
[android-developers] Re: How to adjust the downloaded image to multiple screens
HI Ganesh, You can use bitmap scaling according to resolution of screen. //To get resolution Display display=getWindow(). getWindowManager().getDefaultDisplay(); int height=display.getHeight(); int width=display.getWidth(); //To scale bitmap Bitmap scaledBigmap=Bitmap. createScaledBitmap(originalBitmap, width, height, true); or Matrix matrix=new Matrix(); matrix.postScale(width, height); Bitmap scaledBigmap=Bitmap.createBitmap(originalBitmap, 0, 0, width, height, matrix, true); originalBitmap.recycle(); and use scale bitmap. Hope this will help you to resolve issue. Regards Imran Ali On Tuesday, 22 May 2012 11:53:49 UTC+5:30, Ganesh Vadlakonda wrote: Hi all, I am working on android applications. I am getting some images from server. And I am downloading those images to cache memory for offline also. Later I am applying downloaded image to image view by converting as bitmap. But the issue is When the screen sizes changes the image is not changing according to the screens so that for smaller screens its showing very big , for larger screens its showing very small. Can any body give me the solution to scale my downloaded image for multiple screens. thanks in advance Ganesh v -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to adjust the downloaded image to multiple screens
Hi Ganesh, User this Bitmap originalBitmap=BitmapFactory.decodeFile(pathName); imageVew.setImageBitmap(scaledBigmap); Regards Imran Ali On Tuesday, 22 May 2012 12:59:42 UTC+5:30, Ganesh Vadlakonda wrote: Thank you for reply, I would like to do like the following.. Drawable bitmapdrawable=BitmapDrawable.createFromPath((new File(EventsListActivity.logoPath.getAbsolutePath(), logo.png)).getAbsolutePath()); img_view.setImageDrawable(bitmapdrawable); then can you please give me solution that how to scale the image as drawable . my image file is located in application cache memory. On May 22, 12:05 pm, imran ali imran...@gmail.com wrote: HI Ganesh, You can use bitmap scaling according to resolution of screen. //To get resolution Display display=getWindow(). getWindowManager().getDefaultDisplay(); int height=display.getHeight(); int width=display.getWidth(); //To scale bitmap Bitmap scaledBigmap=Bitmap. createScaledBitmap(originalBitmap, width, height, true); or Matrix matrix=new Matrix(); matrix.postScale(width, height); Bitmap scaledBigmap=Bitmap.createBitmap(originalBitmap, 0, 0, width, height, matrix, true); originalBitmap.recycle(); and use scale bitmap. Hope this will help you to resolve issue. Regards Imran Ali On Tuesday, 22 May 2012 11:53:49 UTC+5:30, Ganesh Vadlakonda wrote: Hi all, I am working on android applications. I am getting some images from server. And I am downloading those images to cache memory for offline also. Later I am applying downloaded image to image view by converting as bitmap. But the issue is When the screen sizes changes the image is not changing according to the screens so that for smaller screens its showing very big , for larger screens its showing very small. Can any body give me the solution to scale my downloaded image for multiple screens. thanks in advance Ganesh v On Tuesday, 22 May 2012 12:59:42 UTC+5:30, Ganesh Vadlakonda wrote: Thank you for reply, I would like to do like the following.. Drawable bitmapdrawable=BitmapDrawable.createFromPath((new File(EventsListActivity.logoPath.getAbsolutePath(), logo.png)).getAbsolutePath()); img_view.setImageDrawable(bitmapdrawable); then can you please give me solution that how to scale the image as drawable . my image file is located in application cache memory. On May 22, 12:05 pm, imran ali imran...@gmail.com wrote: HI Ganesh, You can use bitmap scaling according to resolution of screen. //To get resolution Display display=getWindow(). getWindowManager().getDefaultDisplay(); int height=display.getHeight(); int width=display.getWidth(); //To scale bitmap Bitmap scaledBigmap=Bitmap. createScaledBitmap(originalBitmap, width, height, true); or Matrix matrix=new Matrix(); matrix.postScale(width, height); Bitmap scaledBigmap=Bitmap.createBitmap(originalBitmap, 0, 0, width, height, matrix, true); originalBitmap.recycle(); and use scale bitmap. Hope this will help you to resolve issue. Regards Imran Ali On Tuesday, 22 May 2012 11:53:49 UTC+5:30, Ganesh Vadlakonda wrote: Hi all, I am working on android applications. I am getting some images from server. And I am downloading those images to cache memory for offline also. Later I am applying downloaded image to image view by converting as bitmap. But the issue is When the screen sizes changes the image is not changing according to the screens so that for smaller screens its showing very big , for larger screens its showing very small. Can any body give me the solution to scale my downloaded image for multiple screens. thanks in advance Ganesh v On Tuesday, 22 May 2012 12:59:42 UTC+5:30, Ganesh Vadlakonda wrote: Thank you for reply, I would like to do like the following.. Drawable bitmapdrawable=BitmapDrawable.createFromPath((new File(EventsListActivity.logoPath.getAbsolutePath(), logo.png)).getAbsolutePath()); img_view.setImageDrawable(bitmapdrawable); then can you please give me solution that how to scale the image as drawable . my image file is located in application cache memory. On May 22, 12:05 pm, imran ali imran...@gmail.com wrote: HI Ganesh, You can use bitmap scaling according to resolution of screen. //To get resolution Display display=getWindow(). getWindowManager().getDefaultDisplay(); int height=display.getHeight(); int width=display.getWidth(); //To scale bitmap Bitmap scaledBigmap=Bitmap. createScaledBitmap(originalBitmap, width, height, true); or Matrix matrix=new Matrix(); matrix.postScale(width
Re: [android-developers] How to implement Google Drive in Android application?
Hi, I have been trying to insert a file on google drive,I have followed documents. but while to insert every time i am getting Exception. *The authenticated user has not installed the app with client id 442575845966-mde4be7eingpb5pntfs839jipsetro6s.apps.googleusercontent.com* what is doing wrong? any guess? Note: I am trying from Android and my Drive API and Drive SKD both are on for my Android project. Regards Imran Ali On Friday, May 18, 2012 6:37:29 PM UTC+5:30, JTeagle wrote: So I am trying Google Drive, but I did not found any suitable APIs or example to implement. I have gone through API documentation of Google Drive, but not able to implement. It seems you have to use the Document List API, as Drive is currently aimed at Chrome. See: http://stackoverflow.com/questions/10330053/google-drive-docs-api-for-android/10330497#10330497 and: http://stackoverflow.com/questions/10306456/android-api-for-google-drive -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Deleting from item from listview using OnItemLongClickListener
Hi Tadas, It is simple. 1. onLongClick you will get Item position, remove that position data from ArrayListDay object. 2. Then Notified Listview adapter data has changed as listAdapter.notifyDataSetChanged(); . Hope it will resolve your issue. If not then let me know. Regards Imran Ali On Friday, 18 May 2012 17:17:08 UTC+5:30, Tadas Martinkus wrote: Hello, In code I have listview which is saving in ArraylistDay. Everything with item adding work, but i want to delete it using long click listener. I use some tutorials but it doesn't work - when i run program it get froce close. i use this source code. listView_monday = (ListView) findViewById(R.id.myListview_monday); listView_monday.setAdapter(new ArrayAdapterDay(this,R.layout.list_view_monday, SilentClockActivity.listas_monday)); listView_monday.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView? arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub return false; } }); If i understand good i need to get postition of lsitview item, and romeve it, but how to do it? P.S Later i save all my list in file, but know i just want to delete it from listview after long press. https://lh5.googleusercontent.com/-CLaBX-eFbkY/T7Y0r8bDZvI/ABM/kf45jhiYBa0/s1600/Untitled.jpg This is picture of my project, i think it will be easier to understand for you. If you need more info or source code, write here :) I hope someone helps for me! Thanks ! :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: call an Activity by intend and callbyvalue
Hi I think It will give compile time error, how you are calling like this? 1. Intent dosth = new Intent(ThisActivity.this, * NextActivity(integervalue).class*); if you want similar you can try like this 1. Intent dosth = new Intent(ThisActivity.this,*(new NextActivity(integervalue)).getclass()*); Hope it will satisfy your desire, but better way is Raghav advice. To pass String/integer/boolean from one Activity to another activity , pass via Intent. Regards Imran Ali On Wednesday, 16 May 2012 13:23:58 UTC+5:30, superpsycho wrote: Hi, i´ll want to call the NextActivity, give an integer to its creation and identify whats to create by the given int. My existing code is like: 1. Intent dosth = new Intent(ThisActivity.this, NextActivity.class); 2. startActivity(dosth); what i simply want to have is: 1. Intent dosth = new Intent(ThisActivity.this, NextActivity(integervalue).class); 2. startActivity(dosth); The called activity looks like this at the moment: 1.public class NextActivity extends ListActivity{ 2.private final int idoflist; 3. 4.public NextActivity(Integer idoflist) { 5.this.idoflist = idoflist; 6.} 7. @Override 8.public void onCreate(Bundle savedInstanceState) { 9.super.onCreate(savedInstanceState); 10.final String[] text = getResources().getStringArray(R.array.text_array); 11.setListAdapter(new ImagedArrayAdapter(this, beverages, idoflist)); 12. 13.ListView listView = getListView(); 14.listView.setTextFilterEnabled(true); 15. 16.listView.setOnItemClickListener(new OnItemClickListener() { 17.public void onItemClick(AdapterView? parent, View view, int position, long id) { 18.System.out.println(id); 19.} 20.}); 21. 22.} 23.} the actual problem is that the 1. Intent dosth = new Intent(ThisActivity.this, NextActivity(integervalue).class); doesn´t work like expectet cause i don´t know what i have to do :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 implement Google Drive in Android application?
Hi All, Has any one implemented Google Drive in android project? In one of my application I have to keep some of audio files of application on Could to save phone/sdcard memory. So I am trying Google Drive, but I did not found any suitable APIs or example to implement. I have gone through API documentation of Google Drive, but not able to implement. If any one know/has implemented then please help me. Regards Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: CPU leak android application
Thanks Kris, yes, i am not using any thing either service or background thread computation, but still it has been consuming approx 2% CPU, i have been looking it through another application Android assistant. is there any way to know running thread of application from eclipse? so that i can understand that, which thread is running and using CPU. Regards imran ali On Oct 31, 4:13 pm, Kristopher Micinski krismicin...@gmail.com wrote: If you're not doing anything compute intensive in a service or something else like that, just using foreground UI, this sounds like perfectly normal operation that you can't do anything about. kris On Mon, Oct 31, 2011 at 7:09 AM, imran ali imran...@gmail.com wrote: Hi all, In one of myapplicationi have been using TabHost-(4-tab, so )4- ActivityGroup-{lots of Activity in every ActivityGroup}. i fond that myapplicationhas been usingCPUat least 2% of system, though theapplicationis in background. i observed that, at first time when i am startingapplicationwith new process (after killing old one from settings), then it has been consuming approx 30% ofCPUwhenapplicationis in background, after some time approx 5 to 10 mint, it comes to approx 2% automatically, there up-one it has been consuming approx 2% to 10% while i am switchingapplicationbackground to foreground and foreground to background, till i don't start again with new process(as i stated with new process it is approx 30% ofCPU). if any body have any idea then pleas help me. regards Imran ali -- You received this message because you are subscribed to the Google Groups AndroidDevelopers group. To post to this group, send email toandroid-develop...@googlegroups.com To unsubscribe from this group, 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] CPU leak android application
Hi all, In one of my application i have been using TabHost-(4-tab, so )4- ActivityGroup-{lots of Activity in every ActivityGroup}. i fond that my application has been using CPU at least 2% of system, though the application is in background. i observed that, at first time when i am starting application with new process (after killing old one from settings), then it has been consuming approx 30% of CPU when application is in background, after some time approx 5 to 10 mint, it comes to approx 2% automatically, there up-one it has been consuming approx 2% to 10% while i am switching application background to foreground and foreground to background, till i don't start again with new process(as i stated with new process it is approx 30% of CPU). if any body have any idea then pleas help me. regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] cursor.moveToFirst() cursor.moveToLast() time consuming issue with sqlite database.
Hi all, in my one application,using sqlite database i have to show approx 17000 data from database one by one, on backward forward buttons.For that i have been using cursor.moveToFirst(), cursor.moveToNext(), cursor.moveToPrevious(), cursor.moveToLast(), and showing desired result. every thing is working fine except on cursor.moveToFirst() cursor.moveToLast(), it has been consuming more time that is unacceptable. i also tried with cursor.moveToPosition(int p); but face same problem. can any one help with some other good idea, that can optimize time to move backward as well as forward? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Removing unused resources.
I don't think so... according to me, better to remove all images, then looks error, and add one by one images according to error, that will remove all unused images. On Sep 1, 10:45 am, Akhilesh Mani coffeewitha...@gmail.com wrote: I am looking for an efficient way to find out if a resource (mostly a drawable) is used in java or in an XML file.The problem is, that on my current project the drawables are changed often and now I have some drawables, which might never be used.Is there a tool/way to find those unused drawables without search each filename in the whole project? Best Regards. Mani. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 emulator , HeapWorker may be wedged, what will be solution?
07-26 18:37:52.005: INFO/DEBUG(28): #14 pc 0001 /system/ lib/libc.so 07-26 18:37:52.005: INFO/DEBUG(28): #15 pc fad4 /system/ lib/libc.so 07-26 18:37:52.005: INFO/DEBUG(28): code around pc: 07-26 18:37:52.005: INFO/DEBUG(28): ad035440 4808ecb6 6b9b5823 d0002b00 4b064798 07-26 18:37:52.005: INFO/DEBUG(28): ad035450 701c2426 ed28f7d9 0004ab1c fffe57c4 07-26 18:37:52.005: INFO/DEBUG(28): ad035460 fffe8c30 0354 deadd00d b510b40e 07-26 18:37:52.005: INFO/DEBUG(28): code around lr: 07-26 18:37:52.005: INFO/DEBUG(28): afe142cc 220ce008 2b005eab 1c28d003 47889901 07-26 18:37:52.005: INFO/DEBUG(28): afe142dc 35544306 d5f43f01 2c006824 b003d1ee 07-26 18:37:52.005: INFO/DEBUG(28): afe142ec bdf01c30 00024b44 00b4 1c0fb5f0 07-26 18:37:52.005: INFO/DEBUG(28): stack: 07-26 18:37:52.005: INFO/DEBUG(28): 51d3bc18 0015 07-26 18:37:52.005: INFO/DEBUG(28): 51d3bc1c afe1334d /system/ lib/libc.so 07-26 18:37:52.005: INFO/DEBUG(28): 51d3bc20 afe3902c /system/ lib/libc.so 07-26 18:37:52.005: INFO/DEBUG(28): 51d3bc24 afe38fd8 /system/ lib/libc.so 07-26 18:37:52.005: INFO/DEBUG(28): 51d3bc28 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc2c afe142dd /system/ lib/libc.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc30 51d3bc44 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc34 afe1331d /system/ lib/libc.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc38 ad065714 /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc3c ad07ff50 /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc40 400091e8 /dev/ ashmem/mspace/dalvik-heap/zygote/0 (deleted) 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc44 ad065714 /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc48 003a9990 [heap] 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc4c afe1337f /system/ lib/libc.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc50 df002777 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc54 e3a070ad 07-26 18:37:52.015: INFO/DEBUG(28): #00 51d3bc58 ad06ccd7 /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc5c ad0440dd /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): #01 51d3bc60 2760 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc64 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc68 516161ad /data/ dalvik-cache/system@framew...@framework.jar@classes.dex 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc6c 516802a7 /data/ dalvik-cache/system@framew...@framework.jar@classes.dex 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc70 003a9990 [heap] 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc74 0170 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc78 ad080f8c /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc7c afe0f3b0 /system/ lib/libc.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc80 0099d227 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc84 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc88 0354 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc8c 400091e8 /dev/ ashmem/mspace/dalvik-heap/zygote/0 (deleted) 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc90 ad07ff50 /system/ lib/libdvm.so 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc94 0354 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc98 0013 07-26 18:37:52.015: INFO/DEBUG(28): 51d3bc9c ad016810 /system/ lib/libdvm.so 07-26 18:37:53.206: DEBUG/Zygote(30): Process 358 terminated by signal (11) 07-26 18:37:53.216: INFO/WindowManager(72): WIN DEATH: Window{629eed08 com.altaworks.kokaihop.ui/com.altaworks.kokaihop.ui.LandingActivity paused=false} 07-26 18:37:53.226: INFO/ActivityManager(72): Process com.altaworks.kokaihop.ui (pid 358) has died. 07-26 18:37:53.276: INFO/UsageStats(72): Unexpected resume of com.android.launcher while already resumed in com.altaworks.kokaihop.ui 07-26 18:37:53.336: WARN/InputManagerService(72): Got RemoteException sending setActive(false) notification to pid 358 uid 10028 Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 stop scrolling TabWidget with keyboard ?
Hi All, In one on my application i am using TabWidget, inside activity i have EditText when i have been clicking on EditText then TabWidget has also been scrolling up with keyboard that i don't want this. Note:- I observed when i have been using ScrollView in Activity then i am facing problem, without scrollview it is working fine. if any body have solution please reply this post. Regards Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 implement UniqueFieldValueConstraint in db4o on Android ?
Hi All, in one of my application i have been downloading lots of data from server and then saving in to db4o. in my case i am saving 200 objects of Recipe class in loops, and on every 200 store, i am using commit(). in Recipe Class i have define id as unique as follows configuration.common().add(new UniqueFieldValueConstraint(Recipe.class, id)); when i have been commiting after 200 stor,e it has been throwing exception,code at comit is as follows public void commitdb() { try { oc.commit(); // oc is object of objectContainer } catch(UniqueFieldValueConstraintViolationException exp) { oc.rollback(); } } Still i am getting exception as follows, (i am using db4o on Android) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): com.db4o.events.EventException 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.events.EventRegistryImpl.withExceptionHandlingInCallback(EventRegistryImpl.java: 283) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.events.EventRegistryImpl.commitOnStarted(EventRegistryImpl.java: 121) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.LocalTransaction.dispatchCommittingCallback(LocalTransaction.java: 90) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.LocalTransaction.commit(LocalTransaction.java:65) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.LocalTransaction.commit(LocalTransaction.java:59) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.LocalObjectContainer.commit1(LocalObjectContainer.java: 104) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.IoAdaptedObjectContainer.commit1(IoAdaptedObjectContainer.java: 171) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.ObjectContainerBase$3.apply(ObjectContainerBase.java: 403) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.ObjectContainerBase$3.apply(ObjectContainerBase.java: 401) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.ObjectContainerBase.asTopLevelCall(ObjectContainerBase.java: 427) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.ObjectContainerBase.commit(ObjectContainerBase.java: 401) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.ExternalObjectContainer.commit(ExternalObjectContainer.java: 39) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.altaworks.kokaihop.db4o.RecipeProvider.commitdb(RecipeProvider.java: 42) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.altaworks.kokaihop.ui.TakeoffActivity$4.run(TakeoffActivity.java: 707) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at java.lang.Thread.run(Thread.java:1096) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): Caused by: java.lang.NullPointerException 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.constraints.UniqueFieldValueConstraint $1.ensureSingleOccurence(UniqueFieldValueConstraint.java:59) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.constraints.UniqueFieldValueConstraint $1.onEvent(UniqueFieldValueConstraint.java:96) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.events.Event4Impl.trigger(Event4Impl.java:78) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.events.EventRegistryImpl $4.run(EventRegistryImpl.java:123) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.foundation.DynamicVariable.with(DynamicVariable.java:54) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.InCallback.run(InCallback.java:24) 06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at com.db4o.internal.events.EventRegistryImpl.withExceptionHandlingInCallback(EventRegistryImpl.java: 279) What should be solution, i have to store all 200 objects, and if already object is present with same id, then over-write with new object? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] db4o SODA query giving result null on ordering descending
Hi all, I have been using db4o in my project,i have to search result and arrange in Descending order according to particular filed. I follow below code, but am getting null value. public ListRecipe getRecipiesByString(String searchValue) { ListRecipe list=null; Query query=db().query(); query.constrain(Recipe.class); Constraint constraint= query.descend(_title).constrain(searchValue).contains(); query.descend(_description).constrain(searchValue).contains().or(constraint); query.descend(_rating).orderDescending(); list= query.execute(); return list; } I have Class Recipe there, _title _description are string fields and _rating is double type field. when i try to do in descending order with the fields _rating, it has been giving null value, and after comment of this line query.descend(_rating).orderDescending(); then value is coming properly. what is solution to get result in Desceding order according to _rating. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] SODA query throwing exception :-com.db4o.internal.query.ObjectSetFacade
Hi , In one of my project i am doing SODA query in db4o, i used this code to retrieve object of Recipe. public ListRecipe getRecipiesByString(String searchValue) { ListRecipe list=null; Query query=db().query(); query.constrain(Recipe.class); Constraint constraint= query.descend(_title).constrain(searchValue).contains(); query.descend(_description).constrain(searchValue).contains().or(constraint); list= query.execute(); return list; } Where _title _description are field of Recipe class of type String. it has been throwing com.db4o.internal.query.ObjectSetFacade and i am getting zero size of list. can any one sort out issue? what does it mean ObjectSetFacade in db4o? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Animation transition between activities in ActivityGroup?
it is not working for Activity group. As i found after google, in case of ActivityGroup we have to do some thing with localActivityManager. that i am unable to do presently. Regards Imran ali On May 27, 3:19 am, TreKing treking...@gmail.com wrote: On Thu, May 26, 2011 at 8:15 AM, imran ali imran...@gmail.com wrote: I am using ActivityGroup and in that i have been using activities, how can i animate activities at the time of setContentView(view)? Maybe this:http://developer.android.com/reference/android/app/Activity.html#over..., int) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: inflating xml and adding dynamically
Thanks, It work for me. Regards Imran ali On May 25, 10:11 pm, TreKing treking...@gmail.com wrote: On Wed, May 25, 2011 at 4:29 AM, imran ali imran...@gmail.com wrote: i am getting this exception The specified child already has a parent. You must call removeView() on the child's parent first. what is will be solution?? When you specify a ViewGroup as the second parameter of inflate, that's the group the inflated view gets added to. So you're adding your inflated view to linearlayout. You then immediately add the child you inflated to second ViewGroup, IL. So, as the error clearly indicates, you're adding a View to a new ViewGroup when it already has a parent set. Do one or the other, but not both. In this case you probably just need to remove the call to IL.addView(). - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Animation transition between activities in ActivityGroup?
Hi, I am using ActivityGroup and in that i have been using activities, how can i animate activities at the time of setContentView(view)? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] inflating xml and adding dynamically
Hi all, i have recipe_comment_sample.xml of LinearLayout i have been inflating it, and i want to add this dynamically multiple times in another Linearlayout lL, as follows for(int i=0;isize;i++) { View commentsView = (LinearLayout)layoutInflater.inflate(R.layout.recipe_comment_sample,linearlayout ); /* some operations on commentsView */ lL.addView(commentsView, i); } i am getting this exception The specified child already has a parent. You must call removeView() on the child's parent first. what is will be solution?? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: inflating xml and adding dynamically
Thanks for reply, i also tried with null vale, in this case it has been show last one only, though my need to show all. Regards Imran ali On May 25, 2:35 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Wed, May 25, 2011 at 6:29 PM, imran ali imran...@gmail.com wrote: Hi all, i have recipe_comment_sample.xml of LinearLayout i have been inflating it, and i want to add this dynamically multiple times in another Linearlayout lL, as follows for(int i=0;isize;i++) { View commentsView = (LinearLayout)layoutInflater.inflate(R.layout.recipe_comment_sample,linearlayout ); /* ... what is will be solution?? Pass null as the second parameter of inflate(). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] has ActivityGroup issue of overridePendingTransition(x,y);
Hi All, in one of application i have been using TabView and inside that ActivityGruop, there i want to use overridePendingTransition( , ); onActivityResult(int requestCode, int resultCode, Intent data); both has not work for me, TabView--ActivityGroup--Activities. is there issue, or i am doing some thing wrong? i am using overridePendingTransition( ... , ...); when i am calling Another Activity,other hand it is working when i used with Activity in Another project, but did not Work with ActivityGroup. Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] db4o SODA query with multiple Constraint
Hi all, i have database of db4o, and i have to implemnt query according to 3- values, and i want to get size of object. like i have object of Recipe- class and Reicpe class having there different ids, according to all ids i have to find number of objects of Recie form db. can any one help me?i want to use SODA query for fast execusion. i am trying to do like this, but not getting correct value,even compli time error public int getRecipeByMaching(int dishTypeID,int coockingMethodID,int cuisineID) { Constraint distypeCon, coockingCon,cuisineCon; Query query=oc.query(); query.constrain(Recipe.class); distypeCon=query.descend(_dishTypeID).constrain(dishTypeID).equal(); query.constraints().and(distypeCon); coockingCon=query.descend(_cookingMethodID).constrain(coockingMethodID).equal(); query.constraints().and(coockingCon); cuisineCon=query.descend(_cuisineID).constrain(cuisineID).equal(); query.constraints().and(cuisineCon); int noOfRecipe= query.size(); } Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] db4o SODA query with multiple Constraint
Hi all, i have database of db4o, and i have to implemnt query according to 3- values, and i want to get size of object. like i have object of Recipe- class and Reicpe class having there different ids, according to all ids i have to find number of objects of Recie form db. can any one help me?i want to use SODA query for fast execusion. i am trying to do like this, but not getting correct value,even compli time error public int getRecipeByMaching(int dishTypeID,int coockingMethodID,int cuisineID) { Constraint distypeCon, coockingCon,cuisineCon; Query query=oc.query(); query.constrain(Recipe.class); distypeCon=query.descend(_dishTypeID).constrain(dishTypeID).equal(); query.constraints().and(distypeCon); coockingCon=query.descend(_cookingMethodID).constrain(coockingMethodID).equal(); query.constraints().and(coockingCon); cuisineCon=query.descend(_cuisineID).constrain(cuisineID).equal(); query.constraints().and(cuisineCon); int noOfRecipe= query.size(); } Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Application crashes when downloding long data in from server and in loop.............
i am saving whole data to database after parsing using Json parsar. -- As i think there is some thing limitation in doInBackground() Method. Regards Imran ali On May 20, 4:35 pm, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Imran, Any debug info? Listing of your doInBackground() perhaps? Are you saving the whole 10MB of text into memory or do you save it to a file via some buffer? Daniel On Fri, May 20, 2011 at 12:22 PM, imran ali imran...@gmail.com wrote: Hi all I have been using AsyncTaskContext, Integer, String to download data from server, in between it has been crashing with message in DDMS. 05-20 16:37:11.656: DEBUG/Zygote(33): Process 9489 terminated by signal (11) can any one has idea, what would be solution, i am downloading big size of data approx 10MB of text. Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Application crashes when downloding long data in from server and in loop.............
Hi all I have been using AsyncTaskContext, Integer, String to download data from server, in between it has been crashing with message in DDMS. 05-20 16:37:11.656: DEBUG/Zygote(33): Process 9489 terminated by signal (11) can any one has idea, what would be solution, i am downloading big size of data approx 10MB of text. Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Odp: DB4O Native query time issue
Hi Tomasz, i tried with index on dishTypeId, also follow this link http://developer.db4o.com/Documentation/Reference/db4o-7.12/java/reference/html/reference/tuning/native_query_optimization/optimization_at_query_execution_time.html but did not get, so finally i moved for SODA query, that give me better performance. -- but again my question is, if we have native query with bad performance then what's use? or may be something i am doing wrong? Regards Imran ali On May 6, 4:06 pm, Tomasz Adamski tomasz.adam...@gmail.com wrote: I think that creating an index on dishTypeId will drastically reduce query time. In db4o 8.0 and above it will probably look something like this: (while creating configuration for ObjectContainer) EmbeddedConfiguration embeddedConfiguration = Db4oEmbedded.newConfiguration(); embeddedConfiguration.common().objectClass(Recipe.class).objectField(dishTypeId).indexed(true); In older versions of db4o it looks very similar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: JSon parsing has been taking more time on Android
-- Hi All, Thanks for your advice, i got solution though i did not get Json from input-stream. the problem was with my db4o commit(). i was doing commit() with saving of every object that was consuming more time. Thanks again for your cooperation. Imran ali On Apr 28, 11:01 pm, Igor Konforti con...@gmail.com wrote: This is interesting question, can you keep as updated @imran ali ? On Thu, Apr 28, 2011 at 20:34, Indicator Veritatis mej1...@yahoo.comwrote: The Jackson JSON parser is reputed to be quite fast. I believe it is faster than the one built into Android. Download the JAR from http://jackson.codehaus.org/, include it in Eclipse ADT under the project's properties, i.e. ProptertiesJava Build PathLibrariesAdd External JARs. On Apr 27, 10:28 pm, imran ali imran...@gmail.com wrote: Hi all, i have big data approx 10MB, that i have to parse and save in to database of db4o. i have been downloading date and making it in to string then i am parsing and setting all values of class object, that object i have been saving in to db4o. the above process has been taking more time, to parse and save one object it has been taking approx 10 sec. i want to reduce parsing time, how can i achieve on android? same thing on iPhone has been taking less time. is there any json parser that has been taking input-stream in spite of String to make Json Object? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- P *Please consider the environment before printing this email.* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] DB4O Native query time issue
Hi all, presently i am getting problem to retrieve data from db4o, it has been consuming much more time than sqlite . is i am doing something wrong or it is due to db4o? i have object of Recipe Class, for testing i have approx 1000 objects of Recipe, but in real world it will go approx 5 objects or more. in my testing with 1000 objects, when i have been retrieving Recipe by it's one field, it is consuming approx 181293ms. my query code is below. public ListRecipe getRecipebyDishType(final int dishType) { ListRecipe recipelist=null; long t1=System.currentTimeMillis(); recipelist= db().query(new PredicateRecipe() { public boolean match(Recipe recipe) { return recipe.get_dishTypeID() == dishType; } }); long t2=System.currentTimeMillis(); Log.e(Time consume to retrive recipe by Dish type ***,Time consume to retrive recipe by Dish type =+(t2-t1)+ms); return recipelist; } 1. is i am doing any thing wrong? 2, can we have a query to retrieve random recipe (single object) by dishTypeID fields? Thanks imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] JSon parsing has been taking more time on Android
Hi all, i have big data approx 10MB, that i have to parse and save in to database of db4o. i have been downloading date and making it in to string then i am parsing and setting all values of class object, that object i have been saving in to db4o. the above process has been taking more time, to parse and save one object it has been taking approx 10 sec. i want to reduce parsing time, how can i achieve on android? same thing on iPhone has been taking less time. is there any json parser that has been taking input-stream in spite of String to make Json Object? Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: HttpURLConnection responsecode 414-url too long issue
Thank you Hari, i found helpful suggestion. Regards Imran ali On Apr 8, 9:24 pm, Hari Edo hari@gmail.com wrote: As another poster was hinting, this is a job for HTTP POST, not HTTP GET. GET puts all arguments into the URL. POST puts a short URL, and then adds all of the arguments to the hidden handshaking conversation that follows the network connection. The good news is that many CGI programs don't even notice that you've made the request in a different way. The program just gets its arguments and is happy. The bad news is that this is not guaranteed. (A side benefit of POST is that all of these ugly or semi- private facts don't show up in the URL.) If you can't accept HTTP POST arguments this way for some reason but you can modify the CGI script (recipeBatch in your example), then you may get a little farther by compacting the arguments a bit. You have a couple hundred copies of the characters 'ids='. Make it one argument with + separators, and split it on the CGI side. That gives you a little bit of room, but it's not unlimited by URL length like POST is. I am hoping that those 7-digit numbers are not phone numbers. I'd hate to think I was helpful AT ALL to someone building an annoying telemarketing system. On Apr 8, 3:18 am, imran ali imran...@gmail.com wrote: Hi all, i have to download data but having big ur,l it's character is going to increase more than 4048, for small url it is working fine but for big url it has been giving response code 414- url too long. what would be feasible way to handle this issue? example of url is http://www.someserver.com/api/recipeBatch? ids=4851525ids=4853720ids=4856090ids=4856180ids=4856578ids= ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: OutOfMemoryError- while to download big data and storing in db4o
Hi Streets, Thanks for reply, i have been following your both advice still i am having problem after some time. i am doing download and save data in loop, that is approx more than 100 times to download that much of data and in every loop i have been giving Sleep to thread too. it has been working for 9-10 loops after that it is giving outOfMemory. so, i think it is due to db4o, because to save data i have to make lots of objects, there i may not be handling in proper way to clear memory. further any more suggestion? Thanks Imran ali On Apr 13, 7:17 pm, Streets Of Boston flyingdutc...@gmail.com wrote: My first answer would be: use less memory by chopping up the large text file in chunks. My second answer is this: Apart from setting null values to your (temporary) objects, try to call System.gc() as well. It *may* improve your situation somewhat, since Android's (DalvikVM's) garbage collector is non-compacting. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] OutOfMemoryError- while to download big data and storing in db4o
Hi all, in my application i have to download big data approx 20MB text and after parsing i have to save in db4o for that i have been making lots of object of classes, i am doing all thing in separate thread and after use of object immediately i am giving null vales to all objects. still after approx 8MB it has been giving error java.lang.OutOfMemoryError. can any one tell me what I have to do to fix it? Thanks Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HttpURLConnection responsecode 414-url too long issue
=6220336ids=6226968ids=6228287ids=6228488ids=6228655ids=6229246ids=6235343ids=6239121ids=6242895ids=6246134ids=6256036ids=6256213ids=6261779ids=6270564ids=6270640ids=6270911ids=6271085ids=6292934ids=6308167ids=6310004ids=6335975ids=6336706ids=6337002ids=6347585ids=6351051ids=6351233ids=6351374ids=6351684ids=6352030ids=6359057ids=6360892ids=6377114ids=6377278ids=6377978ids=6384012ids=6391749ids=6396952ids=6399827ids=639ids=6401601ids=6402306ids=6402394ids=6407638ids=6412743ids=6415537ids=6421664ids=6427273ids=6429915ids=6430903ids=6435170ids=6435182ids=6450116ids=6467073ids=6468028ids=6468133ids=6468369ids=6468501ids=6469098ids=6472989ids=6483335ids=6483698ids=6484596ids=6492030ids=6493953ids=6494336ids=6498895ids=6508558ids=6508726ids=6509112ids=6510732ids=6516923ids=652ids=6522509ids=6522731ids=6522840ids=6528946ids=6533053ids=6539261ids=6539694ids=6567942ids=6571929ids=6574272ids=6574641ids=6574817ids=6595728ids=6596555ids=6596823ids=6599272ids=6599576ids=6600541ids=6605335ids=6605425ids=6605677ids=6605791ids=6605876ids=6606009ids=6606320ids=6606526ids=6606662ids=6609449ids=6610190ids=6610386ids=6616252ids=6618366ids=6630405ids=6641925ids=6647060ids=6661605ids=6570519ids=6663482ids=6679799ids=6681215ids=6686502ids=6696842ids=6699656ids=6711536ids=6713592ids=6716261ids=6719616ids=6719734ids=6722992ids=6723157ids=6723341ids=6730687ids=6734527ids=6742039ids=6750769ids=6751509ids=6759936ids=6760067ids=6761213ids=6761987ids=6762370ids=6762435ids=6762583ids=6763299ids=6763380ids=6764938ids=6765208ids=6767837ids=6768086ids=6771359ids=6773874ids=6773931ids=6779102ids=6784839ids=6785145ids=6811280ids=6821092ids=6837761ids=6845753ids=6849773ids=6851101ids=6851739ids=6852848ids=6853471ids=6853806ids=6867516ids=6867935ids=6872439ids=6872986ids=6876498ids=6879322ids=6883317ids=6883533ids=6883555ids=6883791ids=6884262ids=6884448ids=6885722ids=6887547ids=6895597ids=6887377ids=6903295ids=6904639ids=6904839ids=6472980ids=6910420ids=6912261ids=6918736ids=6919087ids=6948952ids=6948990ids=6952104ids=6958631ids=6959113ids=6964591ids=6967911ids=6977308ids=6966181ids=6981109ids=6981748ids=6977375ids=6986067ids=6986184ids=6986296ids=6986490ids=6986615ids=6986801ids=6987484ids=6987705ids=6987961ids=6988312ids=6988500ids=6988620ids=6988736ids=6989988ids=6991450ids=6993680ids=6994112ids=6996751ids=7001350ids=7006123ids=7008913ids=7010005ids=7019254ids=7026519ids=7036432ids=7041381ids=7054764ids=7066683ids=7067227ids=7071418ids=7067935ids=7092767ids=7093048ids=7093670ids=7096016ids=7096863ids=7098267ids=7100766ids=7107485ids=7107668ids=7107641ids=7117360ids=7117666ids=7124473ids=7126192ids=7126254ids=7131340ids=7136328ids=7140663ids=7144179ids=7150680ids=7158760ids=7160413ids=7169372ids=7170342ids=7172498ids=7172815ids=7172843ids=7178289ids=7160371ids=7194740ids=7211093ids=7214990ids=7224993ids=7100842ids=7232337ids=7240867ids=7067758ids=7082119ids=7260508ids=7260696ids=7260842ids=7260947ids=7266083ids=7266272ids=7267038ids=7267124ids=7267265ids=7268102ids=7268356ids=7270595ids=7271877ids=7273064ids=7274856ids=7275040ids=7275593ids=7280615ids=7291403ids=7291556ids=7296608ids=7297864ids=7307983ids=7325204ids=7326691ids=7344599ids=7360034ids=7360734ids=7143170ids=7366103ids=7335432ids=7378342ids=7389066ids=7390246ids=7399682ids=7419690ids=7419970ids=7420334ids=7420821ids=7420892ids=7420963ids=7435636ids=7449470ids=7450008ids=7471221ids=7473680ids=7487651ids=7487819ids=7500186ids=7505251ids=7505456ids=7508792ids=7517201ids=7519861ids=7520175ids=7522346ids=7524590ids=7530390ids=6761055ids=6760903ids=6760758ids=6760662ids=6760607ids=6760534ids=6760438ids=7533835ids=7537901ids=7539224ids=7539959ids=7546021ids=7549484ids=7552924ids=7553203ids=7565275ids=7565859ids=7566172ids=7572343ids=7572527ids=7573284ids=7580091ids=7582082ids=7588040ids=7588426ids=7608431ids=7612032ids=7612610ids=7612846ids=7612968ids=7613120ids=7613190ids=7617425ids=7626416ids=7627653ids=7635724ids=7636134ids=7639022ids=7639361ids=7646600ids=7646920ids=7648751ids=7649757ids=7657309ids=7658158ids=7666576ids=7682909ids=4300745ids=7687310ids=7688741ids=7693316ids=7701046ids=7702471ids=7703758ids=7704058ids=7706184ids=7707207ids=7718867ids=7718893ids=7718916ids=7722745ids=7741214ids=7741453ids=7755445ids=7765970ids=7767339ids=7773423ids=7779044ids=7779667ids=7780064ids=7780244ids=7780154ids=7780807ids=7780796ids=7780818ids=7787606ids=7790206ids=7790586ids=7794481ids=7798785ids=779ids=7799000ids=7810269ids=7811938ids=7824648apiKey=xyz123 Thanks Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 parse dynamic Json tag in Android
Hi all, In one of my application i have been getting big json that i have to parse, in that i have one part there is dynamic json tag, so can you please help to parse it in proper way. i am providing simple code so, that you can under stand problem. {recipeRows:[{amountFormatted:300,ingredient: {name:mandelmassa, grovt riven},unit:{id:10}}, {amountFormatted:1,ingredient:{name:äggvita},unit:{id: 1}},{title:Fyllning:},{amountFormatted:100,ingredient: {name:smör},unit:{id:10}},{amountFormatted:1,ingredient: {name:florsocker},unit:{id:8}}, {amountFormatted:2,ingredient:{name:vaniljsocker},unit: {id:4}},{amountFormatted:1,5,ingredient: {name:kakao},unit:{id:4}},{title:Glasyr:}, {amountFormatted:125,ingredient:{name:mörk choklad (70 %) finhackad},unit:{id:10}},{amountFormatted:1,ingredient: {name:smör},unit:{id:5}}]} the above code is my json and i have to parse, the problem is here that, in the reicpeRows, some member has only title. it has either title or reset other structure. so this is my problem to parse. Thanks S.I.ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ORMs for Android
Hi all, i have to save some complex data in to database, so for that i don't want to use sqlite3, instead of that i want to use any ORM supported by Android, I found db4o, i am try to implement that, in between i want to know from your side, is here any other ORM that Android has been supporting and having better performance in terms of speed execution? Thanks Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Imsdroid account setting issue with HTC desire [resolution 480*800]
Hi All, Tomorrow i bought new Android HTC desire with higher resolution 480*800 but when i tried to do sip setting for Imsdroid then every time it has been giving message Unregistered. though on another phone HTC desire with resolution 320*480 is working fine. so, is it issue due to resolution, or is it issue with new HTC phone {my phone is Made in Tiwan} or some thing else. -- Note:- i have checked all setting properly. if any one know then kindly reply me. --Thanks Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 reduce xml parsing time
hi all, in my application i have to read xml from web-service, it is working fine, but major problem is it is taking more time to parse data, though same data is taking less time on iPhone and Blackberry. i have similar code on blackberry it is taking less time to parse. is any fast parsing process in Android? if any body know kindly reply me. my code simple is as follow. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); doc = db.parse(in); NodeList nodes = doc.getElementsByTagName(Member); if(nodes.getLength() 0){ for (int i = 0; i nodes.getLength(); i++) { Member mem = new Member(); Element memelement = (Element) nodes.item(i); NodeList member = memelement.getElementsByTagName(MemberID); Element memberText = (Element) member.item(0); String MemberID = getCharacterDataFromElement(memberText); mem.setMemberID(MemberID); member = memelement.getElementsByTagName(FirstName); memberText = (Element) member.item(0); mem.setFirstName(getCharacterDataFromElement(memberText)); member = memelement.getElementsByTagName(LastName); memberText = (Element) member.item(0); mem.setLastName(getCharacterDataFromElement(memberText)); member = memelement.getElementsByTagName(MailingAddress1); memberText = (Element) member.item(0); mem.setMailingAddress1(getCharacterDataFromElement(memberText)); ... ... ... } Thanks and regards Syed Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] problem to install .apk on phone
Hi all, i have to install third-party application on my android LG GW620, i have installed the USB driver, phone is showing usb connected, but when i am giving command adb devices then it is giving only emulator on command prompt, and when i am giving command adb install .apk-path then it is failing, if you understand the problem then give me the reply or tell me what is correct way to install application on Android phone? Thanks and regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] selection color and text color in whole project
Hi all, is there any process to change the default text color white to Black and default selection color of android orange to Blue for whole project. i am using Eclipse for Android development. if any one know then please reply me. Thanks and regards Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 with checkbox
hi all, i have problem to get event of list view field when i am adding checkbox in listview. my problem is to get the status of check box form every row of the list view, either it is check or not, according to that i have to do operation. so, if any one know solution or good tutorial then please reply me, Thanks and Regards Imran ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 with button on same activity
Hi all, i tried a lot but i did not success, my problem is i want to add first one button and below that one listview. for that i divided my xml in two Linearlayout as below in code but it is not working when i am hiding button code then list view is coming other wise only button is coming on the screen. please find out my error in xml or any thing i have to do in .java file my xml code is. ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent style=@style/MainBody AbsoluteLayout android:layout_width=fill_parent android:layout_height=80px android:gravity=top android:padding=10px TextView android:layout_width=fill_parent android:layout_height=wrap_content android:textColor=#00 android:textSize=20sp android:layout_x=15px android:layout_y=10px android:textStyle=bold android:text=Inspection / ImageButton android:id=@+id/button_add android:layout_width=wrap_content android:layout_height=wrap_content android:layout_x=175px android:layout_y=1px android:background=@drawable/add_plus /ImageButton /AbsoluteLayout LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content android:layout_x=10px android:layout_y=90px android:padding=10px android:gravity=bottom android:background=@drawable/myhelper_border ListView android:id=@+id/listview_insp android:layout_width=fill_parent android:layout_height=fill_parent android:layout_x=10px android:layout_y=190px android:background=@drawable/myhelper_border / /LinearLayout /LinearLayout Thanks and regards Syed Imran Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] seek bar implementing problem
hello Dear friends! i am trying to implement seekbar or progress bar, but i am getting problem to synchronize with file. so, if any body has code for seekbar/progress bar in media player kindly send me.. or give me process to implement. Thanks and regards Er. Syed Imran Ali --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---