[android-developers] Sending office 2007/2010 files over bluetooth
I am having problem with send option for Office 2007/2010 files. Mime type i am using is: String mimeType2007 = application/vnd.openxmlformats- officedocument.spreadsheetml.sheet; while it works with2003 mime type String mimeType = application/vnd.ms-excel; INTENT_ACTION=ACTION.SEND What could be the problem with Mime-type here ? Any alternate available or anything to do with Android ? I checked with one of the other open source app installed on my device, it is showing up Bluetooth option for 2007 files. Not sure, if 2003 mime-type is used as quick-fix. But not convinced with this fix. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Queries on Internal Storage - device space
Hello, I explored storing temp/supporting files on Internal storage i.e. SharedPrefs (private to app) and Internal Storage of device. Now, when i try to create a file on Internal Storage, it by default creates and stores file on /data/data/app_home/files/ . My intent was to store a file on some centrally located area i.e some device storage path which is accessible to all applications, and whose file permissions can be restricted using different modes like we have as - MODE_PRIVATE, MODE_WORLD_READ,etc. Quesn is : Is there a way to create a file on such centralized storage location (if it exists on android device) so that it is accessible to multiple apps ? Or provide a path while creating file using FileOutputStream fos = openFileOutput(FILENAME, Context.MODE); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to verify whether song is playing or not
If u r able to hear the song , then it is playing :D On Jun 21, 3:15 pm, Bharathiraja R bharathiraja.andr...@gmail.com wrote: Hi All, I am starting song through startActivity() method and when phone receives call how to verify whether song is playing or not. If anyone know how to verify please share me the code. Regards, Bharathiraja R -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Queries on Internal Storage - device space
Thank you Sir. I would implement better ways as suggested :) On Jun 21, 4:48 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jun 21, 2011 at 6:42 AM, Kacee komal...@gmail.com wrote: I explored storing temp/supporting files on Internal storage i.e. SharedPrefs (private to app) and Internal Storage of device. Now, when i try to create a file on Internal Storage, it by default creates and stores file on /data/data/app_home/files/ . My intent was to store a file on some centrally located area i.e some device storage path which is accessible to all applications, and whose file permissions can be restricted using different modes like we have as - MODE_PRIVATE, MODE_WORLD_READ,etc. Quesn is : Is there a way to create a file on such centralized storage location (if it exists on android device) so that it is accessible to multiple apps ? Only on external storage. Not on internal storage. Or provide a path while creating file using FileOutputStream fos = openFileOutput(FILENAME, Context.MODE); No, you cannot supply a path here. Savvy programmers create components that expose an API (service, content provider) that help provide security and process synchronization to the data. Apps sharing data by files is *so* 1980's. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Debugging Killed Activity
You said your debugger detaches as soon as your activity gets killed. Check if activity for camera and activity for your usual app runs in separate process. You can check that in DDMS view in eclipse. If thats the case, then you would need to do Debug Configurations - New remote Application - Set up port no on which your process runs, then your debugger wont get detach. First confirm if your complete app runs in multi process environment. On May 23, 6:57 am, Zsolt Vasvari zvasv...@gmail.com wrote: Log.v() is your friend. I tend to use it more than the debugger since half the time I change any xml, my app crashes due to the Eclipse plug- in problem. Since it's so useful, I went back to the primitive way of debugging unless I really can't figure out what's going on. On May 23, 9:46 am, Kevin khant...@hotmail.com wrote: I have an activity that launches the built in camera activity to capture a picture. My activity is often killed while the camera is running, so I'm using onSaveInstanceState and onRestoreInstanceState to save field values. Anyway, it crashes while restoring the state, but when it's killed the debugger detaches, so when it's restarted after the camera is done, I don't have a debugger to see what's causing the crash. I know what function is causing the crash but I can't see the problem just looking at it. Any ideas? Is there a way to get a core dump after the crash and run the debugger on that? 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: Changing application description shown in option list when multiple apps can do same job
Ok.. But I have seen applications that do not appear with their package name in the list created by intent (dont know what to call this dialog box ) That means there is a way to atleast hide package name. Package name looks bit ugly, I only want to show a meaningful string (eg. app name ) that makes sense even to a layman. Is there a way just to show app name or a single string text ? On May 13, 9:31 pm, Dianne Hackborn hack...@android.com wrote: Yes you can't, this is a security feature to help the user if apps are trying to spoof other apps. You should give the activity that is handling this Intent a more descriptive label so the user better knows what it does. On Fri, May 13, 2011 at 8:29 AM, Justin Anderson magouyaw...@gmail.comwrote: AFAIK you can't... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, May 13, 2011 at 5:38 AM, Kacee komal...@gmail.com wrote: Hello there, I have a viewer app. There are other apps installed on my device as well doing same job. So when i open a document, android as usual shows a list of apps that can do that job (which is file open here). In my app, along with App name, just beneath it, package name gets displayed. I want to set App description instead of package name. I tried with application android:description=@string/app_description its not working. Where to set this custom string ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Changing application description shown in option list when multiple apps can do same job
Hello there, I have a viewer app. There are other apps installed on my device as well doing same job. So when i open a document, android as usual shows a list of apps that can do that job (which is file open here). In my app, along with App name, just beneath it, package name gets displayed. I want to set App description instead of package name. I tried with application android:description=@string/app_description its not working. Where to set this custom string ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Development Patterns
Please read little more from http://developer.android.com Once you'll start writing Android code, these queries will go off On May 11, 2:08 pm, Cory Kaufman allspirits...@gmail.com wrote: Hi, Has anyone started cataloging common design patterns that arise when developing Android apps? For example: It's worked out well for me to create a base class that extends Activity that all of my other activities extend, so I have a central place to put common functionality. When should strings be listed in values/strings.xml and when should they be hard coded? What kind of conventions should be used when giving views ids? Should there not be views in different layouts with the same name? Etc. Cory -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Failed to install xxx.apk on device emulator
can u paste adb logcat here ? On Apr 17, 2:53 pm, ady ady...@gmail.com wrote: I am new to android development. I am writing Hello World program . But when i run it the emulator loads after say 5-10 mins it will give the following error : [2011-04-17 14:26:35 - HelloAndroid] Installing HelloAndroid.apk... [2011-04-17 14:29:10 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554! [2011-04-17 14:29:10 - HelloAndroid] (null) [2011-04-17 14:29:13 - HelloAndroid] Launch canceled! i tried looking into android troubleshooting tips in official android website. But those steps didnt help can anybody plz help me in this. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with reopening the activity
Your question is though not very clear, but i am getting an impression that you are dealing with more than one activity and then facing problem on pressing back button or at re-start. If thats the case, then you can check Activity stack and see the order of activities getting launched. Use this command: adb shell dumpsys activity Hope that helps. On Apr 18, 10:15 pm, Josue Fuentes Gutierrez forever...@gmail.com wrote: Im Use a dialod progress in activity, the problem is when I press Home, when I return to the application, I return to the activity, I reloaded the application, but if I press back, it shows me the activity that was from the beginning. Help please Sorry for my English -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 for encryption of sd card storage?
I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? On Apr 14, 12:51 am, Streets Of Boston flyingdutc...@gmail.com wrote: If your file is not huge, why not store it in your app's sandbox? Take a look at these methods of Context: getDir(...) and getCacheDir(...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 for encryption of sd card storage?
To answer original question of HitendraSinh - Here is one very simple encryption algo: http://www.ecestudents.ul.ie/Course_Pages/Btech_ITT/Modules/ET4263/More%20Samples/CEncrypt.java.html Simpler than you can imagine :) On Apr 14, 11:07 am, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? On Apr 14, 12:51 am, Streets Of Boston flyingdutc...@gmail.com wrote: If your file is not huge, why not store it in your app's sandbox? Take a look at these methods of Context: getDir(...) and getCacheDir(...) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 for encryption of sd card storage?
Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 for encryption of sd card storage?
Thanks Dianne... I think I have not put it in write way. In my particular case, SharedPreferences, Database are not applicable due to large file(.xml, html,etc) size My temp files may consume 1MB to say 10MB space. However, app deletes them as soon as they r not needed. Since temp filesize is little more, i am not sure if its a good option to store on device internal Storage. Hence one option left is SDCARD, but there to protect data, encryption needs to be applied...which probably i'll be doing now. On Apr 14, 12:40 pm, Dianne Hackborn hack...@android.com wrote: You are mixing up all kinds of things. Each application has a directory on internal storage where its *private* data goes. This is shared with all apps on internal storage; there is no per-app quota, though if the overall storage starts getting low a notification will displayed to the user which takes them to a list of apps sorted by how much storage each one is taking, for them to deal with the culprits. SharedPreferences is *one* way to put data in your private internal storage area. It is in no way shape or form intended for large amounts of data. It is for small settings data. Databases are another way to put data in your private internal storage. This also is not intended for big blobs of binary data, but works well for large amounts (megabytes) of structured data. Or you can just put whatever files you want in your internal storage, in whatever format you want. The sd card / external storage is generally for *shared* data that does not need to be protected from other apps. That said, you *can* protect it basically as well as you can protect your private data if you do some work -- for example generate a random key that you put in your internal storage (so other apps can't get to it) which you use to encrypt the data on external / sd card storage. This is basically how apps on SD card works -- the system generates a random key for created encrypted filesystems on the SD card in which it installs an application. On Thu, Apr 14, 2011 at 12:17 AM, Kacee komal...@gmail.com wrote: Yes to avoid memory issues later with preferences, we are storing temp files(in MB) on sdcard which then crops up problems of encryption/ file permissions/ etc. Aah... we can not expect desktop facilities from a device :) On Apr 14, 11:25 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Thu, Apr 14, 2011 at 3:07 PM, Kacee komal...@gmail.com wrote: I was wondering if there is any size limit for storing on shared preferences. Could not find any such info on developer.android.com. Is anyone aware of such space limit on internal storage ? Interesting question. Since each app is a different user, you'd have to use quotas to do this. I haven't checked, but I doubt Android's kernel has support for this. So unless the frameworks is imposing some restrictions (does it?), your xml files can grow until there is internal storage left. Depending on how parsing is done, though, you might run into memory problems with big preferences files. You'd better use separate files and/or a database if you need to store a lot of data. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help for encryption of sd card storage?
I have a similar situation, where my application stores some file on SDCARD and dont want anyone else to be able to see the contents or use the file. Encryption is one solution. However I was thinking if there is any way to restrict file permission on SDCARD. Since the file is created by my application, which has a unique UserId, is there any way to set permissions like chmod on file ? Cheers, Kacee On Apr 11, 12:17 pm, Xun Sun xun.sun...@gmail.com wrote: Hi, On Mon, Apr 11, 2011 at 2:47 PM, Hitendrasinh Gohil hitendra.virtuei...@gmail.com wrote: hi, I am downloading file from server and write this file to sd card.now i want to encrypt this file so that only my application can access this file. i) if i can encrypt the file path only that can be access on decrypting it? Are you looking into encrypting individual files? org.bouncycastle.* have the crypto functions that you can use to encrypt a file. You might also want to check this policy: http://developer.android.com/reference/android/app/admin/DeviceAdminI... which is the best encryption algorithem i can use for? There are symmetric ones and asymmetric ones. You are likely more interested in symmetric encryption, where the keys used for encryption and decryption are the same. DES and ASE are the most popular ones. thankx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks regards Xun Sun -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 for encryption of sd card storage?
I agree , Sdcard has FAT32. But since , android linux kernel accesses FAT32 to create file on it, isnt there any way to supply more information (like permissions) along with creating a file command ? I checked this post but cudnt get how to do it or even if it is of any use. http://groups.google.com/group/android-developers/browse_thread/thread/7ca63e1dd9a71ce2 CAn anything be done with /etc/fstab ? On Apr 13, 3:56 pm, Kostya Vasilyev kmans...@gmail.com wrote: The memory card uses FAT32, which does not support Unix-style owner and permission info. -- Kostya 13.04.2011 13:35, Kacee пишет: Encryption is one solution. However I was thinking if there is any way to restrict file permission on SDCARD. Since the file is created by my application, which has a unique UserId, is there any way to set permissions like chmod on file ? -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Getting a delay between starting current activity after returning from startActivityForResult()
Removed Cleartop flag, no luck. ... Problem is second activity is getting finished, before the first actvity can resume, which is creating a delay. Any more suggestions... On Apr 8, 9:41 pm, TreKing treking...@gmail.com wrote: On Fri, Apr 8, 2011 at 5:44 AM, Kacee komal...@gmail.com wrote: Please help :( Try removing the Clear Top flag. - 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: how to change behavior of default application in android
My intent is to customize an existing in-built app, say Phone app. Like when i end a call, I want to show some msgs/pictures at the end of call. I know it sounds wierd... but just giving an example. So is there any way that for such a small customization, I dont have to re- write full app and instead just get some event when call ends to do the customization ? On Mar 23, 7:15 pm, Hari Edo hari@gmail.com wrote: I think you're confused about how Android picks apps (activities) to handle various commands (intents) that the user invokes. Roughly: * the phone radio kit receives a call * Android asks, hey, which app is able to answer calls? + If one app says it can, that app is assumed the default. + If more than one app says it can, and one has been marked as the default, that app is used. + If more than one app says it can, and no default is marked, the user is shown a list of choices. + The user can make a choice and use it this time. + The user can make a choice and mark it as default for future situations as well. * Android uses the chosen app to display a receive call UI. This scenario is not just for receiving calls. It also works for responding to the Home button, and many many many other situations in the Android system. You don't get hooks or callbacks for when applications finish-- even the app itself may not be notified that it's being killed. You cannot disable this search for intent handlers mechanism. It is at the core of what makes Android... Android. On Mar 23, 9:58 am,Kaceekomal...@gmail.com wrote: Hello All, I want to change default behavior of one of the in-built application like Phone/SMS/etc. I got to search on forums that there is an option in SettingsLaunch By Default There Clear defaults The Clear default button on right is disabled for both in-built and any other downloaded app. 1) Are there any special settings to disable it from custom(non in- built) app? 2) If once I change Clear Default using ClearDefault app available on market , is it possible to set the original default application back to active/defaults ? I want to change behavior of app after it is just about to complete. Can i get some event/ack that abc app has finished so that I can start my app after that ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 change behavior of default application in android
May be customization is not the right word, but I want to perform this task. Is this thing possible ? On Apr 10, 2:50 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: * http://webnetmobile.com/twitter/* On 10 April 2011 11:31, Kacee komal...@gmail.com wrote: My intent is to customize an existing in-built app, say Phone app. Like when i end a call, I want to show some msgs/pictures at the end of call. I know it sounds wierd... but just giving an example. So is there any way that for such a small customization, I dont have to re- write full app and instead just get some event when call ends to do http://developer.android.com/reference/android/telephony/PhoneStateLi... the customization ? This is *not* a customization of existing app. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 change behavior of default application in android
Sadly... I can not make such changes ... I thought with android there must be some way to do so.. Thanks for all the replies On Apr 10, 4:17 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Apr 10, 2011 at 6:37 AM, Kacee komal...@gmail.com wrote: May be customization is not the right word, but I want to perform this task. Is this thing possible ? You can create your own firmware that incorporates such changes to a built-in app. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in Oslo:http://bit.ly/fjBo24 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting a delay between starting current activity after returning from startActivityForResult()
Hello guyz, I am facing problem with starting MainActivity again and perform remaining tasks, after returning from startActvityForREsult() My code structrue goes like: MainActivity{ // this method calls different activities of my application based on the result of onActivityResult startCustomActivity() ; } //Code goes like : Class MainActivity extends Activity{ startCustomActivity() { if( Condition1) { Intent subIntent = new Intent(); subIntent.setClassName(getApplicationContext(),com.android.SubActivity); subIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActvityForResult(subIntent); startActivityForResult(subIntent,Constant.REQUEST_SUB_SCREEN); // REQUEST_SUB_SCREEN = 20; } else if (Condition 2) { //start activity 2 startActivityForResult(,..,..,); } else if (Condition3) { //start activity 3 startActivityForResult(,..,..,); } else if (Condition 4) { //start activity 4 } } onActivtyResult(,..,..,) { if(requestCode == Constant.REQUEST_SUB_SCREEN) { if(responseCode == RESULT_OK) { startCustomActivity(getIntent().getAction(), getIntent()); } } } AndroidManifest.xml activity android:name=com.android.SubActivity android:theme=@android:style/ Theme.Translucent.NoTitleBar.Fullscreen android:screenOrientation=sensor android:label=@string/ app_name1 android:icon=@drawable/qo !--android:noHistory = true this is not working as well -- intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity SubActivity.java //Here on GoBack button, I want to send control back to calling Activity ii.e. MainActivity /// code starts GoBackButton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { setResult(RESULT_OK); finish(); causing problem } }); //code ends Whats happening is ... My control is going back to MainActiivty on pressing GOBack button, but the problem is since I am finishing SubAcitivty in GoBackButton itself, it takes some time for control to go back to onActivityResult() and do remaining task and launch another activity say Activity 2, as a result of which on pressing GoBack button, for few seconds , homeScreen (device homescreen) is dispalyed and then later, my activity2 gets launched. I want to remove that delay between GoBack button and launch of Activity2 I wan to end SubAcitivty as soon as user navigates away from this activity and send back control to calling activity. I also tried setting android:noHistory = true instead of calling finish() but nothing is working. Please help :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to change behavior of default application in android
Hello All, I want to change default behavior of one of the in-built application like Phone/SMS/etc. I got to search on forums that there is an option in SettingsLaunch By Default There Clear defaults The Clear default button on right is disabled for both in-built and any other downloaded app. 1) Are there any special settings to disable it from custom(non in- built) app? 2) If once I change Clear Default using ClearDefault app available on market , is it possible to set the original default application back to active/defaults ? I want to change behavior of app after it is just about to complete. Can i get some event/ack that abc app has finished so that I can start my app after that ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: security of the framework
Encrypting / decrypting an XML file is just as same as in Java. Get the contents of xml file , apply Encrypt algo, write back to a file named abc.xml Do reverse for Decrypting. On Mar 23, 3:06 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: On 23 March 2011 10:50, madushanka chamilhewag...@gmail.com wrote: Hi, I am handling the security module of a framework that will designed to develop real time applications for as my final year project. I am new to android and i need help on this. At the moment i need to know how to encrypt an XML file using an algorithm and how to decrypt it when needed, in android. Please Help me. You can't do RT app in Android Regards, Marcin Orlowski Tray Agenda http://bit.ly/trayagenda - keep you daily schedule handy... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Optimization - Memory - Garbage collection
Hi all, I have a static instance singleton class object. I want that object to be garbage collected/null as soon as I close my application using back button. Whats happening is - My Object is alive, between two launch of application and hence retains the state. However,I am taking care of all instance variables by resetting them after their use by my own class.reset() method. What I want is to make my Class object eligible for gc as soon as I have come out of my applciation using back button. I dont want my object to stay on heap between two launches. As there may be a gap of few hrs / days between two launches of app on actual device. So dont want the object to be alive unnecessarily. I know, android will take care of gc when it will call ondestroy() at its own, but I think one should not rely on ondestroy(). Can anyone please suggest any way to destroy objects right after application is stopped ? (although process is still visible in ddms) Thansk in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: R cannot be resolved
Try creating a helloAndroid project in Eclipse and run it. If it runs successfully, then there is no problem with yr set up. The problem might be only with tutorial apps Let us know. Cheers, Kacee On Jul 21, 10:56 pm, Satya Komatineni satya.komatin...@gmail.com wrote: It is a basic question, but let me ask you anyway, do you have the ADT installed in Eclipse? When you expand the project do you see an R.java in a sub directory similar to what is at the following url? http://www.satyakomatineni.com/akc/filestorage/satya/documentfiles/32... Perhaps, give your directory structure in that project and probably the contents of the R.java file. Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.com On Tue, Jul 20, 2010 at 6:31 PM, Marc marc.d.pa...@gmail.com wrote: Hi. I'm an Android development newb, and I got a problem with Eclipse. I tried a few tutorials, but I can't run the tutorial-apps because it pops up with this error: R cannot be resolved . I've searched a lot of different fora, where people describes the same problem, but I just can't fix it. A lot of people recommend unchecking Build automatically, Cleaning and rechecking Build automatically, people also suggest that it's a line that says import R. that causes the problem, but it feels like I've tried everything and I still can't make it work... I use this SDK :http://developer.android.com/sdk/index.html along with 3 different versions of Eclipse, but it's the same error- message i get in every version. NB.: I don't have a .classpath file, nor do I have a .project file. Could that cause the problem ? Help is greatly appreciated. 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- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is there a graphs utility?
Seems there are no direct APIs availbale in android. One can use drawable , surface manager ,etc to draw different components of graphs. On Jul 5, 5:01 am, Dmitri Snytkine d.snytk...@gmail.com wrote: Just wondering, is there a way to create pie charts and other types of graphs in your application without using web based google graphs API? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Whether to use a Service or Thread for Http Connection?
Very good suggestion by John :) Thanks Good class to know. AsynTask seems to simplify the cumbersome handling of UI and worker thread. In short, it is just a fancy variant of Thread implementation. So, if i am geting it right, the answer to Sagar's question is Thread on top of Service for http connection. Plz correct if requried. Kacee On Jul 5, 6:11 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: The consensus seems to be AsyncTask, try that. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Whether to use a Service or Thread for Http Connection?
Say, if i have to display the content of this blog in my application , then 1. I have a UI thread 2. From this UI thread, I should create an intent to call a Service which would then implement ASynckTask 3. This AsyncTask will make http connection and download any blog updates, will pass on the update to the UI activity for display. Please correct me if i am wrong somewhere. Thanks, Kacee On Jul 6, 3:34 pm, Sudeep sudeep.neti...@gmail.com wrote: Hi Sagar, Use AsycTask class if u want to publish the result or response in the UI thread. i.e. from the activity u called http connection . If you want to listen for any updates say stock value,then use a service which is like a background thread always running .almost:) On Jul 6, 3:12 pm, sagare sagar.ekb...@gmail.com wrote: Hi All, Thanks for your replies AsynTask seems to be what I should use but I am still not clear with the difference between service and Thread for Http communication. Thanks, Sagar On Jul 6, 12:43 am, Frank Weiss fewe...@gmail.com wrote: Only people who want to punish themselves use Java threads on Android:-) But you also asked about Service. You can use an AsyncTask in an Activity if the task has to happen while the activity is active. If the task needs to happen also when the acitivity is not active, (like when the user goes to other activities while the task is downloading stuff) use an AsyncTask in a Service.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Change Text color and text size in listview
You are using same color for background and text RelativeLayout android:background=#00 ListView android:textColor=#00 /ListView RelativeLayout Try changing that say to #00 Cheers, Kacee On Jul 7, 9:33 am, mike hasitharand...@gmail.com wrote: hi ena, you have to create a custom adapter. private class ShowCategory extends BaseAdapter { //implement getView public View getView(int position, View convertView, ViewGroup parent) { //in here define your textBoxes and others ViewHolder holder = new ViewHolder(); holder.text = (TextView) convertView.findViewById(R.id.catName); } class ViewHolder { TextView text; ImageView icon; } }- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en