Android :: FileObserver Not Returning File Changes Within Subfolders?
The FileObserver class doesn't appear to be working as advertised.
I created a class extending the FileObserver class. I initialize the class to watch the path of the sdcard as returned from the Android Environment.getExternalStorageDirectory function. Everything seems to work perfectly as long as the files are in the ROOTof the sdcard. Any files within SUB-FOLDERS of the sdcard are NOT returned to my public void onEvent(int event, String path) callback in my FileObserver class.
The docs say files in subfolders should be returned to the onEvent() callback but it's not happening. Note, I've only tested on the Android simulator (v2.2) since I do not yet have access to a device. Maybe this is a bug specific to the simulator?
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Android :: Returning An XML File From Web Service To Device
I have a set of mp3 files on my computer which i want to be the server. Now i have a web service(Songs_Collection). This web service returns the list of all songs present on the server to the user.The user can download the desired file directly from the server. I have a small problem : How does my web service get the list of audio files kept on the server in the folder c:Audio Files. Someone suggested that i need to keep the names in a "Web Content" folder, but can anyone suggest how should i approach it? I worked out on this part . But now how do I send it to the client on device ? Can i send it directly as an array? I guess then some seriliazation-deserialization needs to be done. Or If send it as an XML file then how should I proceed? (This is more important)
View Replies!
View Related
HTC Incredible :: How To Create Subfolders
Does anyone know how to create subfolders? I created a folder to locate all of my Directions & Navigations shortcuts. I'd like to create subfolders to organize them. I can't seem to figure this out. I also tried searching for the folder name using Astro and making sure I was pointed at the device not the sdcard and came up empty. That actually brings up another questions. If I create a directory on one of the home screens. What is the path to that directory?
View Replies!
View Related
HTC EVO 4G :: Folders And Subfolders With Evo And Froyo
I have a folder labeled "Music Videos" for all my music videos. I want to make sub folders for each band (ac/dc/, beatles, etc) I can do it on the sd card when my phone is connected to the computer, but when I disconnect it and look in gallery on the phone, the Music Videos folder does not appear. So, I had to make a folder for each band instead Videos - Beatles, Videos - ac/dc etc) its a pain. Has anybody tried the sub folder route? or isn't Froyo sophisticated enough to do this?
View Replies!
View Related
Android :: New Resources Added / Subfolders Showing In R Class?
I don't understand why Eclipse doesn't know how to resolve the color resources I've defined. Am I doing something wrong? R.color.notepad_lines cannot be resolved MyNewTextView.java. I've had problems before too with eclipse being able to find images in my /res/drawable directory /res/values/colors.xml <?xml version="1.0" encoding="utf-8"?> <resources> <color name="notepad_paper">#AAFFFF99</color> <color name="notepad_lines">#FF0000FF</color> <color name="notepad_margin">#90FF0000</color> <color name="notepad_text">#AA0000FF</color> </resources> MyNewTextView.java private Paint marginPaint; private Paint linePaint; private int paperColor; private float margin; private void init(){ //Get Reference to Resource Table.......
View Replies!
View Related
HTC Hero :: Sync Subfolders With ActiveSync?
I just received my Sprint Hero in the mail, love it so far, but I am not able to sync up my outlook subfolders. I had the HTC Tocuh Pro 2, was able to sync my subfolders, but it was too sluggish and I only got it because it had Microsoft outlook. I have certain rules set that allow me to have certain incoming emails sent to certain folders so that I can keep up with them. Seems like the only way for me to get the emails from certain individuals on my phone is to take the rules off from my desktop and have them come in with all my other mail. I would hate to do this.
View Replies!
View Related
HTC Incredible :: Activesync With Multiple Subfolders
I was wondering if any one encountered the same issue. I connected my phone to a corporate exchange server via activesync and everything is working fine for all the generic folders(inbox,send,deleted etc...), but i have outlook rules set up that emails get routed to various subfolders under inbox(NOT PST) based on who the sender is and I never receive any notifications for those messages. so i have to manually browse all those folders to see if i have any new mail. i tried touchdown for exchange, but really didn't like its look and feel...
View Replies!
View Related
HTC Desire :: Exchange Subfolders - Alternatives To Touchdown?
I need my Exchange subfolders to synchronise automatically, and I need to receive notifications when a new mail arrives in any of the subfolders. So far, the only app I've found that manages this properly is Touchdown. I'm in the trial period, and may end up buying it, but I'm hoping that there's another application out there that works as well, but has better design and UI. Does anyone know of one? I used RoadSync on my Nokia, and was looking for the Android version on the market (it does exist, apparently), but can't find it. It might have been taken off, or perhaps doesn't work with v2.1.
View Replies!
View Related
Android :: Geocoder Not Returning Result
My application that uses geocoding was working fine till last week and now all of a sudden am not getting proper data from the same. I used getLocality() , which was returning CITY name previously. But now it is returning NULL. Is something changed? or Has someone faced the same issue? My application is on SDK 1.0
View Replies!
View Related
Android :: Catching NullPointerException And Returning 0?
I am (supposedly) catching NullPointerException and returning 0 if that happens. But occasionally I get NullPointerException failure anyway. Is catching it this way no enough to prevent this failure? private char getCharBehindCursor (int offset){ // get a single char behind cursor + offsett CharSequence cSeq; InputConnection inputConnection = getCurrentInputConnection(); if (inputConnection != null){ try { cSeq = inputConnection.getTextBeforeCursor (offset + 1, 0); } catch (NullPointerException npe) { /* failure*/ return (char)0; } if (cSeq.length() == offset+1){ return cSeq.charAt(0); } } return (char)0;
View Replies!
View Related
Android :: Returning Null Pointer
The line "return db.insert(DATABASE_TABLE, null, initialValues);" is returning a null pointer and I cant figure out why! I'd be grateful for any help public class Database extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); DBAdapter db = new DBAdapter(this); if(db != null){ long id = db.insertUser("test", "test"); Cursor c = db.getUser(id); Log.d("DB", c.getString(1)); Log.d("DB", c.getString(2)); db.close();.......
View Replies!
View Related
Android :: ReverseGeocode Is Returning Null In 2.2
Looks like reverseGeocode ( getFromLocation()) is not working in android 2.2. It is not able to fetch the address from the coordinates. It returns null and crashing my app. In general 2.2 is not stable - 2.1 was much better. UI response , UI rotation when rotate the phone etc doesn't work reliably....
View Replies!
View Related
Android :: EditText Not Returning Content On GetText
The code snippet below displays a Dialog with a simple login-form. The problem is that when the user hits the login-button, the text that was entered into the EditTexts are not returned on the getText()-call. However, if I set android:setText="foo" on the EditTexts in the xml-layout "foo" is returned on getText(). why the text entered at runtime won't stick? CODE:.............. and the XML: CODE:.....................
View Replies!
View Related
Android :: BitmapFactory.decodeByteArray() Returning NULL
I am using the previewCallback from the camera to try and grab images. Here is the code I am using private Camera.PreviewCallback mPrevCallback = new Camera.PreviewCallback() { public void onPreviewFrame( byte[] data, Camera Cam ) { Log.d("CombineTestActivity", "Preview started"); Log.d("CombineTestActivity", "Data length = " + data.length ); currentprev = BitmapFactory.decodeByteArray( data, 0, data.length );....................................
View Replies!
View Related
Android :: Droid Not Returning Valid DeviceID / Way To Fix?
I have an application that utilizes the phones DeviceID in various ways. I am now getting emails from users who have the HTC Droid Incredible phone that they are getting the error message I have added to the app that is showing the DeviceID being returned is not valid - which means it is either empty/null or the default ID used in the emulator. I require a valid DeviceID to use my app, and the permissions are all set fine in the XML. It works just fine on every other device, and now suddenly it seems to stop working on this phone. Anyone else having this issue? Anyone find out what is causing it? Does HTC now block this ID on this device?
View Replies!
View Related
Android :: Returning A Variable In A Public Void?
I'm a bit new to programming Android App's, however I have come across a problem, I can't find a way to make global variables -unlike other coding like php or VB.NET, are global variables possible? If not can someone find a way (and if possible implement the way into the code I will provide below) to get a value from the variable 'songtoplay' so I can use in another Public Void... Here is the code:............. Basically, it gets the value from the Spinner 'hubSpinner' and displays it in a Toast. I then want it to return a value for string variable 'songtoplay' -or find a way to make it global or useable in another Public Void, (Which is will a button, -loading the song to be played)
View Replies!
View Related
Android :: Returning From HTTP Intent.ACTION_VIEW
I have an application that needs to have a user visit a web page to authorize it. After spending time in the Browser the user should return the my application. Currently, I'm launching the Browser with: CODE:................ After using the browser, I can go back home and launch my application, which stacks a new Activity on top of the previous stack of Activities that were being used in the application. For example. If the user launches the app, they have Activity A in the stack. From there we navigate to Activity B which then launches the Browser. Then, the next time we enter the app, we launch Activity A, which is pushed onto the stack that already contains an A and B. My question is then, how can I just go back to the previous stack? Basically, do I have to create a new Activity? Is there a better way to launch the Browser, and then come back to my application? Also, I've been using the Intent.FLAG_ACTIVITY_NEW_TASK when I start the Browser activity so that my app stays running.
View Replies!
View Related
Android :: Passing Arguments To AsyncTask / And Returning Results
I think this should be easy to answer. I have an application that does some long calculations, and I would like to show a progress dialog while this is done. So far I have found that I could do this with threads/handlers, but didn't work, and then I found out about the AsyncTask.In my application I use maps with markers on it, and I have implemented the onTap function to call a method that I have defined. The method creates a dialog with Yes/No buttons, and I would like to call an AsyncTask if Yes is clicked. My question is how to pass an ArrayList to the AsyncTask (and work with it there), and how to get back a new ArrayList like a result from the AsyncTask?
View Replies!
View Related
Android :: BitmapFactory.decodeStream Returning Null When Options Set
I'm having issues with BitmapFactory.decodeStream(inputStream). When using it without options, it will return an image. But when I use it with options as in .decodeStream(inputStream, null, options) it never returns Bitmaps. What I'm trying to do is to downsample a Bitmap before I actually load it to save memory. I've read some good guides, but none using .decodeStream.........................
View Replies!
View Related
Android :: Picking A Contact And Returning To The Parent Activity
I wish to re-use the Contacts application in a way to enable the user to pick a contact and return it to the parent activity (my application's activity). For achieving this, I want to inquire about the kind of Intent that will be needed to launch the contacts application. Intent i = new Intent(Intent.ACTION_GET_CONTENT, ?); startActivityForResult(.....); What should be the second argument here ? In the deprecated Contacts API, I could use the following snippet, but not sure about ContactsContract: Intent i= new Intent(Intent.ACTION_GET_CONTENT,People.CONTENT_URI); startActivityForResult(i, reqCode);
View Replies!
View Related
Android :: Remote Service Returning Value From Http Transaction
I've been researching how to best implement a service which performs a network transaction and returns data to the caller. Clearly, this needs to happen on its own thread which means some form of async response. I can see at least three ways of doing this--some more complex than others. In the descriptions below, C is the caller, S is the service. 1) C wraps a Handler in a Messenger object, adds this to an Intent. C then calls startService with this intent. S extends IntentService which runs the Intents received in a worker thread. S then sends a message to C via the Messenger. This has the benefit of not requiring any of the async binding process or making an IDL interface that needs to be compiled into C. This seems to be the closes to a Handler-based response mechanism of Local Services. 2) C binds to S and then uses AsyncTask<> to make a blocking call to S. S performs the network transaction and returns the data in the return value or an out parameter. This requires the async binding process, but does not require a callback function since the inter- thread communications is handled by AsyncTask<> and the worker thread is in C's context. 3) Make the function called in S be completely asynchronous. S defines two interfaces: IMyService and IMyServiceCallback. S implements IMyService.Stub. C implements IMyServiceCallback.Stub. C binds to S then calls S via IMyService, passing its IMyServiceCallback binder. S spins up a worker thread and returns immediately. S then calls the callback when it has completed the network transaction. I am asking for advice on which methods are most appropriate. I do not need the the service running constantly, only when the web transaction is required. C does not use S all the time--definitely don't want to bind during C's onCreate. However, I would like the time from when C determines it needs to use S to getting the results back to be as quick as possible (i.e. adding minimal latency to the already latent network access). Is there any preference to having the worker thread in C or in S? Are there any significant problems with option 1?
View Replies!
View Related
Android :: Serializable Object In Intent Returning As String
In my application, I am trying to pass a serializable object through an intent to another activity. The intent is not entirely created by me, it is created and passed through a search suggestion. In the content provider for the search suggestion, the object is created and placed in the SUGGEST_COLUMN_INTENT_EXTRA_DATA column of the MatrixCursor. However, when in the receiving activity I call getIntent().getSerializableExtra(SearchManager.EXTRA_DATA_KEY), the returned object is of type String and I cannot cast it into the original object class. I tried making a parcelable wrapper for my object that calls out.writeSerializable(...) and use that instead but the same thing happened. The string that is returned is like a generic Object toString(), i.e. com.foo.yak.MyAwesomeClass@4350058, so I'm assuming that toString() is being called somewhere where I have no control. Some of my code CODE:......... This is in the activity that receives the search suggestion: CODE:...........................
View Replies!
View Related
HTC Desire :: Returning To Default ROM?
I'm considering rooting as well but have a question. I'm on three UK and got the phone on contract. Now it doesn't seem like 3 have messed around with the phone and from what I have managed to find out it says they haven't. I am currently on 0.8 bootloader so my question is if I want to go back from root (just in case) which RUU would I use? The 0.8 bootloader one on MoDaCo [this] or this which has two RUUs for 3 UK. And will going back mean that I do not void my warranty with 3?
View Replies!
View Related
HTC Incredible :: Way Of Exchanging Or Returning INC?
I ordered my Incredible on June 9th, and it is suppose to ship by June 30th. When I bought it I was eligible for an upgrade, so I paid the 2 year extended contract price of $299.99 for the phone and a $100 mail in rebate. My question is that if I get the INC and decide that I don't like it or don't want to keep it, I know that I have 30 days to return or exchange it, but if I do that and try and exchange it for the Droid X, will I still get the 2 year contract price for the X? And if I just decide to return the phone and stick with my old phone, is my contract still extended for another 2 years? I'm just wondering for a what if situation so I can handle any issues or problems before they come about.
View Replies!
View Related
Android :: Returning Values From Multiple Selection List View
Edit: Okay, I found a solution. Don't know that it's the proper solution, but it does work correctly. Added to the code below. I'm trying to allow a user to select a number of directories from a checklist, and return them upon clicking a "Submit" button. Here's a snippet of my code. It populates the List View with all the directories on /sd card/, and for the initial selection (of however many I pick) when I submit, the log shows the correct choices returned. However, if I un check an item, and click "Submit" again, it still shows as if all are selected. Do I need to write a handler to un check an item? I thought that was taken care of by the choice Mode selection?
View Replies!
View Related
Android :: Failed Binder Transaction When Returning Camera Image
I get the Failed binder transaction error in the logcat when returning the image taken with the camera from the camera intent back to the parent intent (as a byte[] using putExtra). I don't understand why, its not like its a big bitmap or anything. It only happens when i take pictures with lots of light, because then the byte[] is bigger. The error occurs when leaving the camera intent. Does anyone see a mistake in my code? Here is the code of the camera intent: CODE:............. And here is the code that calls the camera intent: CODE:..................
View Replies!
View Related
Android :: Returning A Memory Mapped InputStream From A Content Provider?
The the client side of a content provider consumer I can do something like this, to get a proper InputStream for reading the picture: InputStream is = getContentResolver().openInputStream(pictureUri); It is a nice API, and will on the server side, the actual content provider result in a call to: CODE:....... But what if the picture mapped to the URI is not to be found on the filesystem, but as a memory resource, or generated on the fly. Can I create a memory mapped File or InputStream, or anything else, so that I am not required to save a temporary file to disk, just to be able to return it to my content provider consumer?
View Replies!
View Related
Android : MediaStore Returning Loop Of Images - Not Entire Directory
Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. Code...
View Replies!
View Related
HTC Incredible :: Returning Phone Due To Froyo
I think it's horrible that Verizon would push out an update that effed up my (and so many other phones). Customers should not be forced to due a factory reset to get things working right. And, after doing a factory reset, my phone still isn't working right!I shouldn't have to spend hours on forums figuring out whats wrong, why, and how to fix it. this stuff should just work, and why in the world Verizon would push out an update that caused so many problems is incomprehensible anyways, I think Im going to the store this afternoon to at least try getting a replacement, and if not a different phone
View Replies!
View Related
HTC Incredible :: Returning Phone After Root
I see there are a couple of threads on this but I want to make sure I have this right. I just got off with Asurion and they are shipping a replacement. I had rooted my phone, installed some root only apps like wireless tethering and set cpu, removed some bloat like CityID and Tweet/Peep, and changed the boot animation. No custom ROM or radio update.When I wanted to get the OTA update so I applied s-off and flashed back to stock recovery. So what do I need to do to return this phone. I know I will need to apply s-on. Then should I flash a stock 2.1 or just revert the changes I made to boot animation, restore the bloatware, and remove the root apps? Do I need to remove any other files that go with being root?
View Replies!
View Related
HTC Hero :: Returning To Home Page
i was wondering how to quickly return to the built in browsers homepage on the hero phone. is there a menu option i'm missing as i seem to have to repetedly press the back button to get back to my selected homepage. also when i close the browser it reopens on the last page i viewed. have read you just bookmark homepage but was hoping there was a better shortcut key to return to homepage.
View Replies!
View Related
Android :: Returning Data From AsyncTask Resulting In Null Pointer Error
I am trying to do what I think is a fairly simple task to authenticate a user on my server. I am using AsyncTask as a private subclass of my Activity, however when I try to populate the user object after authenticating it keeps setting it to null. Is there something strange in how the onPostExecute() method is called that is causing this? I originally had the AsyncTask as its own class but ran into the same problem, so I am try to solve this using a private subclass.
View Replies!
View Related
Android :: Way To Skip Parts Of An Activity Stack When Returning Results In Droid?
I'm making an app which has a flow roughly as below: User starts on the main screen with an empty list, hits menu, and goes to "add item." (Activity A) User is given a new activity which allows them to specify search criteria, then hits "go" to do a search. (Activity B) User gets a list of results, and can click on one of them to view more details. (Activity C) User sees details of item, and can use a menu item to save it to their list in Activity A. (Activity D) Right now, I am having each Activity call each other Activity for results, and then it is passing the result all the way back up the stack as it returns to Activity A. Is there a way to jump this, since all I want is for a result in Activity D to get to Activity A directly? Note that a user should still be able to navigate backwards (using the back button) through each activity, but if they explicitly save the item in Activity D, I want it to jump straight to Activity A.
View Replies!
View Related
Android :: Call Webservice Using KSoap Simply Returning Error String
I'm trying to use ksoap to call a simple webservice. I followed this video to try to get started. When I call "getResponse()" on the envelope I just get the string "Error". There's no exceptions thrown or any other detail. I've successfully connected to a simple webservice I just setup on my local machine. Could this potentially be related to being behind a proxy server here at work? My code is below: CODE:........................
View Replies!
View Related
Android :: Update Existing Preference-item In A PreferenceActivity Upon Returning From A Sub PreferenceScreen
I have a PreferenceActivity with a bunch of (Sub)PreferenceScreens. Each such (Sub)PreferenceScreen represents an account and has the account-username as its title. CODE:................ As the user enters sub-PreferenceScreen, and edits the account user-name, I want the outer PreferenceScreen to update it's PreferenceScreen-title for the account in question. I've tried to add... CODE:............. But the accScreen.setTitle does not seem to take effect on the outer PreferenceScreen. I've note that calling onContentChanged(); actually makes it work, but I realize that this is probably not the preferred way of doing it. I suspect I should call postInvalidate() on some view somewhere, but I really can't figure out on what view and when to do it. http://stackoverflow.com/questions/2396153/preferencescreen-androidsummary-update may be experiening the same problem as me.
View Replies!
View Related
Samsung Galaxy I7500 :: What To Do Before Returning Phone
So i've persuaded o2 to have a look at my phone in the hope of replacing it. First they've asked me to reset the phone using *2767*3855#. If i have the same problems (dialpad not working during calls) then i've to return it. If their engineer cannot fix it, i'll (hopefully) get a replacement.So i'm running Galaxo with JC6, what should I do before returning the phone? I'm thinking Nandroid and then copy everything to my hard disk and remove that from my phone. Then use ODIN to install the latest official firmware (which is?). Then I run the reset command they gave me. That about right or should I do something else?
View Replies!
View Related
Motorola Droid :: Returning Rooted Phone
On the original phone, I went back to stock using the "live without fear" .sbf file, to 2.01. I had attempted to also let it do the 2.1 update but it continually gets stuck on the M and won't proceed past that, so I again put the 2.01 sbf file on, and let the phone get to the "touch the droid to begin" screen.The phone has the original recovery on it, the box and explanation mark, no SPRecovery or clockwork.Can Verizon tell at this point that the phone was previously routed and charge me full price for the replacement?
View Replies!
View Related
Samsung Fascinate :: Need Firmware For Returning To Stock
I was trying to get my phone to return to stock, because i had a problem with rooted phone. So, i was looking for Firmware for Returning to Stock. and i found one, and used Odin3 to force update with the firmware,then i turned on my phone... and the screen said AT&T WORLD i accidental downloaded AT&T Galaxy S Captivates firmware... and now i cant go to 'Reset Factory Mode' or 'Downloading Mode'. can anyone help me? if i just can go to downloading mode, i can fix this. is there anyway to auto-goto downloading mode when you insert USB? like un-screwing the phone and doing something? i can take any-risk to fix this.
View Replies!
View Related
Motorola Droid X : Returning To Stock With Sbf - Bootloader 30.04?
I just got a CLN warranty replacement with the new bootloader (30.04) and was wondering if I can more or less return the phone to stock after un-rooting since there is no sbf for this bootloader yet or it hasnt been tested with the 2.2 sbf (BL 30.03). What I was thinking would happen: 1. Root 2. Install Bootstrap 3. Create bare backup 4. Install ROMS, themes, etc. 5. Return to stock: 6. Restore bare backup 7. Unroot 8. Factory wipe Would this work or would the bootstrap remain dormant cause its still in /system? Meaning the recovery could possibly come up while rebooting or something else?
View Replies!
View Related
|