yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Syndacate:
By a global ID I meant an ID which one ID exists for each task, regardless of the type. So if you added one of each type, you'd have ID 0, ID 1, and ID 2, doesn't matter what table they're in. The next would be ID 3, regardless of the type.

Though to search for a particular ID, then, because it's split up into tables, you're looking at the same O(N) complexity across 3 tables, instead of 1. Tables are meant to contain different data in the same db, you're holding the same "task" information in different places and that's mis-use, IMO.

If you're really hellbent on keeping 3 tables, what you can do is have a LUT, using global indexes. So you have a 4th table, that's your indexing table, this contains the primary key, then a task ID (which corresponds to the primary key of whichever table of the type it's in), then the type of task

So you can have it such that:

0 0 geo
1 0 timed
2 0 simple
3 1 geo

So now what you can do is, you have worst case O(N) across 1 table (your index table) to find any particular task, be it by its own task ID, by the type, or whatever, and each one is indexed individually by the primary key of the LUT.

So now, if you can get whatever you want by looking it up. Or if you want all tasks of that type, go to that table.

And the part I bolded is pretty much the worst excuse ever, that's the logic that makes bad programs. I've torn hundreds of lines of intricate code apart because the architecture wasn't extendable, and I needed it to be. Unfortunately software design is an art, and it's not always mastered the first time.

Using a lookup as to the location of it or throwing it all into one table are both solutions that can fix your problem, support extensibility, and work quickly. You're talking about hashes and string compares, both are intensive relatively. String compares take time, so does a hashing algorithm. Numerical analysis is damn near free. There's a reason primary keys are numerics, and not "whatever you want them to be" - databases need to be efficient. Yes, a string comparison is nothing more than multiple numerical comparisons, but it A) can't be randomly accessed, and B) The magnitude of the comparisons is much higher.

I have no idea about the GPS stuff, though.
[Android Software Development] grandioso:
OK, the lookup table seems like a good idea. I'll give it a try. Thanks.

So the GPS question is still on.
[Android Software Development] grandioso:
//edit

Forget about sorting, please, hepl me with the layout thing.
[Android Software Development] grandioso:
Why, oh why must my list view be so short ? :(
[Android Software Development] grandioso:
I'm currently working on notifications/alerts.

I see it's possible to create a notification to show up on a given time. Does anyone know how does this work ? Will it show the notification if I create it when the user adds a new timed task and then the phone is rebooted ?

Should I create a service that runs in the background and checks all geo and timed tasks if they should create an instant notification ?

Any advice would be appreciated.
[Android Software Development] Syndacate:
For the list view, I'm not entirely sure what's wrong, it looks okay, the only thing I can really suggest based on seeing your code is try changing the height of the second text view (the one under the list view) to 30dp or something, instead of wrap_content. Also, can you post a screen shot with how it's appearing? Not quite following.

As for the notifications, I haven't used them before. Though if you see how to create it, why not just rig up some functionality for it to go off 5 minutes later, then reboot the phone, see what happens. It honestly depends on whether it registers the notification with the OS and the OS delivers it, or the program is responsible for delivering the notification. My guess would be the the former, so I see no reason it wouldn't be persistent over power cycles...throw it in and give it a try. No harm in checking - though you shouldn't have to create a service just for that...pretty sure that's the whole point of the notification system.
[Android Software Development] :
Yeah, not sure I know what you mean by it's only "1.5 high". What default list view are you using in your ArrayAdapter?
[Android Software Development] grandioso:
LOL now we're talking about one thing in 3 different threads.

Continue here about ListView without scrolling.

I'll test the notification manager tonite. I'll post if I have problems.

//edit

Now I see I'll have to create a service that runs in the background and creates notifications. When I create a notification with a future time it pops up instantly with the given time written next to it.
[Android Software Development] grandioso:
Is there a way to find out if system has acquired location coordinates after turning on GPS ?
[Android Software Development] grandioso:
Who knows...right ?

There's another thing.

I could use some help on creating some kind of background service. This service would run indefinitely and would manage all kinds notifications.

First of all - timed tasks. It would regulary (every minute) check due times of each task and their notification times and if it's the right time, trigger a notification.

Then geo tasks. It would check if GPS is turned on and if it is, then check if there's a geotask which should throw a notification.

At last, it should check all tasks if they are set to important. If they are, it should create a notification with the "ongoing" flag. It should also keep the ID's of all notifications (that's why I need it to be persistent), to know when to cancel one.

This third feature may not need a service, but it would be nice, because i.e. when there's a timed task and it goes off, it automatically marks itself as finished, therefore stops being important...
[Android Software Development] :
can't you just set lat/lon variables, query for GPS, and then check variables for a value?
[Android Software Development] grandioso:
This was meant to be posted here, but...

Check out this blog post and let me know if you have any ideas.
[Atrix 4G Q&A, Help & Troubleshooting] meganet3:
Guys,

My bluetooth does not start until I shutdown and restart the phone. Once i do this, I can turn the bluetooth on. After turning bluetooth off and then trying to turn it on again, it doesn't start. I contacted Motorola and they said I have to do a factory reset. The thing is, I already updated to 1.5.7 which is rooted. The process of obtaining root begins with the older verson of 1.2.6. I would hate to go through that again and I think if I just did the factory reset with 1.5.7, then root may be at risk. Do any of you guys have an idea of how to fix this bluetooth issue?

Thanks

UPDATE...Now it doesn't even start at all....
[Nook Color General] sgt.pepper99:
Ok, so I installed cyanogen and wanted to go back to cupcake (some problems with compatibility for some apps). Made backups but lost them from file corruption. Even recent backups come up with MD5 sums mismatch on ClockworkMod Recovery. Can get cyanogen running again, but can't get back to ORIGINAL state.

I've tried hard booting 8x, I've tried running the script to change the bootcount but this just gets me to clockworkmod. I try running the factory reset/data wipe option, but it clearly doesn't remove cyanogen. When I reboot after this, I get stuck on the word ANDROID in blue. I've also tried sideloading a 1.1 version zip, all to no avail. Any suggestions? Would uninstalling clockworkmod help? Thanks.
[Nook Color General] 1Enoch:
Did you flash the 1.1 stock nook image with win32? Remember that in the 1.1 restore you just install "update.zip" through CWM. Are you sure that your original version was 1.1 and not 1.0.1? If all else fails, try a different SD card. Sometimes the SD card itself is the source of problems like this.

Factory resets won't do anything once you have flashed a new rom. You will have to restore it to stock. Nooks are very difficult to hard brick, so something should work.
[Nook Color General] sgt.pepper99:
No, I didn't flash it, just installed the update. My original version was 1.0, but would that make a difference? I wanted to go to 1.1 anyway. Tried a diff sd card, same problem. Any other suggestions?
[Nook Color General] sgt.pepper99:
No matter what I try, it seems cyanogen simply WON'T wipe. Even after formatting via clockwork, and after clockwork tells me it's successfully formatted, it still boots up as normal. I believe it's interfering with restoring to stock.
[Nook Color General] sgt.pepper99:
Solved

MUST uninstall clockwork mod. Finally worked after this step http://xdaforums.com/showthread.php?t=960542&page=16 as per instructions here. Thanks everyone!
[EVO 4G Q&A, Help & Troubleshooting] cptcave:
I rooted last night. This morning I used titanium backup and backed up all system and apps....then bc I'm planning to flash a rom I also did a nandroid backup. After reboot on nandroid back up all my Widgets where gone and they are no longer in the list on adw (beautiful Widgets exspecially) wondering if I screwed up somewhere?

Also I'm going to try flashing a rom later....any ideas on which one I'm thinking maybe cm7

Edit* I meant rom not tomorrow....stupid autocorrect
[EVO 4G Q&A, Help & Troubleshooting] teh roxxorz:
If the apps are on the sdcard, widgets won't appear, need to be on the phone.
[EVO 4G Q&A, Help & Troubleshooting] cptcave:
Yea I forgot I did that lol...thank you!
[EVO 4G Q&A, Help & Troubleshooting] teh roxxorz:
Glad I could help. :)
[Galaxy S I9000 General] LeeUHF:
Hey Guys.

I recently signed out of my twitter app and now for some reason it wont sign in.

Ive tried uninstalling it and reinstalling.

Tried another Twitter app that didnt work either.

I can sign in through my browser fine.

Basically it keeps saying my user name or Password/email is wrong.

But it isnt, Ive been trying for weeks, I even tried changing the password from my PC and then trying it again but still the same.

Any help appriciated.

Running my original 2.1 software
[Galaxy S I9000 General] w7nt3rmut3:
Tried signin in with Tweetdeck? Have had the same Prob, no no more problems with using tweetdeck.
[Android Apps and Games] nitsuj17:
has anyone successfully modded the gingerbread launcher (l2) to have a 5 column app drawer instead of 4?

it seems like a real smali headache to do so
[Desire HD General] henke002:
Hey!

I get many of my contact pictures from Facebook via SyncMyPix or I just use photos Iäve taken with the camera.

First, the quality of the photos are great, top notch an everything, BUT, I sync my contacts with Google and it looks like Google makes my contactphotos look like ****e when they get synced...

Is there any way to leave out photosync or something? I want my contact pictures to look good ;(
[Desire HD General] atifhasan86:
this happens because google saves the contact image in a smaller size to use less space, and no matter what's the resolution on the display pic, after restoring the contacts from google, you'll end up with those crappy images.:mad:

the only solution i have found to be working is, you need to sync your contacts with facebook and Facebook with HTC Sense, both and then use the display image that's synced with Facebook with HTC Sense

Here's How : After syncing your contacts, when you edit your contact, Tap on the display image and set the one that's from Facebook with HTC Sense. This displays the image in its proper resolution.:o

hope this helps.
[Desire HD General] Hakimy:
If I use pics from my phone, I just click edit and click on the pic and choose phone.this will make the pic look great.the first time you sync it might change so do the same steps I mentioned above and you'll get great pics for your contacts ;)
[Xoom General] roebeet:
Out more than a month (for the 3G model) and only one minor update, so far? Where's my microSD support, for example?

Is it just me, or am I being a little impatient here? I figured that the microSD would be fixed by now, at the very least..... :confused:
[Xoom General] funnycreature:
I feel you but I learned not to expect anything anymore. If I make up one day and there's an update waiting for me then great. But holding your breath would be a baaaad idea!

[sent with Xooming Android technology]
[Xoom General] @prime:
I agree, although I am unsure of whether to blame google or motorola. The SD card would be nice, and so would a few hundred less FCs.
[Xoom General] kcrudup:
FWIW, I've been making new kernels and such, so I get updates all the time :)

But seriously:

Yeah, I'm sure that issue is square on Google; it's also part of the issue of why there's MTP support and not USB Mass-Storage, since the former works on files (vs. filesystems for USB M-S, which is why you had to pull it down manually); since I suspect the issue that Google is solving with our "one filesystem for apps and user stuff" is where/how the uSD will be mounted/shared on our devices.
[Xoom General] myv6mustang:
Thought the 4g update would be 90 days or something...
[Xoom General] Bauxite:
Very impatient.
[Xoom General] el_bori1:
I can't wait for the 4G upgrade but now that I have the ThunderBolt I wonder how much the Xoom battery is going to last. I get around four hours with the 4G on.

Sent from my ThunderBolt
[Xoom General] MikeyMike01:
Motorola has 2 months to fix all the Xoom's problems. Otherwise I'll be forced to return it.

Sent from my Captivate
[Xoom General] rljohnson:
Ditto on the MicroSD! I have been wondering about the other tablets heading for the market. I see MicroSD card slot listed and I wonder if they hit will they will already have support?
[Xoom General] bwcorvus:
Tomorrow

P.S. I just made up this rumour.
[Xoom General] myv6mustang:
What store will let you take it back after 2 months.

To be honest I haven't noticed the lack of a sd card. Don't have 4g here so I am content just as soon as otterbox releases their damn case.
[Xoom General] bwcorvus:
Costco :)

Sent From My Evo
[Xoom General] dimitri407:
What other honeycomb tablets are going to have an sd slot. I think i have only seen one other future tablet so far.
[Xoom General] crauzz:
I'm pretty sure that I've read somewhere that the zoom will get SD support at the same time as the 4G upgrade.
[Xoom General] neonflx:
the clock is ticking 77 days before it goes back to cotsco if moto/google doesn't fix all the **** that is wrong with this POS
[Xoom General] Ignotus:
Why you buy it if you are gonna knock it? You didn't have to buy it. Lol
[Xoom General] albundy2010:
If its a pos than return it now.
[Xoom General] squeeze:
Have not needed the micro SD. Using the 4g on the TBolt. Can't wait for the LTE upgrade....that's all I need. Sometimes I feel storage space is overrated. I have bought all big storage space gadgets and have yet to run out.

Instead of OS upgrades...I want all the developers to keep cranking out the Honey apps.
[Xoom General] keitht:
It is easy to fill up with music and video libraries.
[Xoom General] MikeyMike01:
Yep. :cool:

Some people wanted it to succeed. Some people also wanted it to work. Looks like neither are happening currently.
[Xoom General] Magnesus:
Asus Transformer is to have microSD disabled too.
[Xoom General] alias_neo:
I know you guys don't care about us over here on this side of the big pond, but has anybody thought about the fact that it is yet to be released in the EU and that something might come shortly after we get the XOOM in the coming weeks?
[Xoom General] SPIDERTECH:
My thoughts exactly. I just got mine a few days ago, but I knew everything about it before I bought it. Sounds like neonflx didn't do a single bit of research on it before buying it. If the research was done, you bought it knowing what it could and couldn't do, then you have no one to blame for your displeasure with it other than yourself.

Personally I love it and I'll love it even more once I can add an additional 32gb of storage.
[Xoom General] mobilehavoc:
Either we have a bunch of trolls on here (very likely) or people are absolute idiots. Why would you buy any product and then hold on to it if you don't like it and it's a "pos". This is the whole reason there's a return policy in the first place. Return it and get something different. Nobody cares whether you keep it or not but honestly if you're not happy with it, you should return it and get something that you will be happy with.

If you're not going to return it, then stop *****ing about it every 5 mins. Nobody is forcing you to keep your XOOM and deal with all the issues you are having. There are alternatives on the market (iPad) that are more stable and established.

I had an iPad1 from launch then sold it for my XOOM. I also have an iPad2 in the house for my wife so I'm fully aware of what else is out there. I still adore my XOOM and wouldn't trade it for anything - it has its flaws but it's a new product and the iPad/iPhone and even Android smartphones were all like this in the early days. You shouldn't be buying a product like the XOOM if you don't have any patience.

I just don't get it....
[Xoom General] atoy74:
Ive been soo tempted to make a post like this. I think everyone is getting a little frustrated seeing all the potential but not the refinement. Honeycomb just needs that big update to smooth things out and then watch out.
[Xoom General] atoy74:
All the Xoom is missing is a big update and a price drop. They'll be flying off the shelves. I know of a bunch of people waiting for a more reasonable price point.
[Xoom General] Old MuckenMire:
I have to admit, I'm seriously considering going ahead and returning my Xoom. The browser force closing and flat out crashing has been getting old. But just last night I was browsing with the stock browser, it crashes, but this time the Xoom decides to reset my wallpaper to a random picture in my gallery as well. I had been using a live wallpaper and just like that it decides a random pic in my gallery would be better.

The Gmail widget sometimes works, sometimes not. Often I get a Gmail and there is a big 1 letting me know a new one is there, but the widget will not refresh itself so that I can see what the Gmail is or who it is from.

I mean, I want to LOVE this thing. I LOVE the way it feels and the build quality. But man, it's buggier than a two dollar whore and I'm starting to doubt the kind of support it is going to get from Moto/Google.

My gut is starting to say return it and wait for Honeycomb to mature or something.

and that's another thing....I don't think I really like Honeycomb. To use the WHOLE screen I have to use a third party launcher like LPP or ADW EX. I don't understand how they could have designed Honeycomb where major screen real estate is off limits and seriously restricts customization. LPP fixes this but then LPP force closes all the time too. It's a no win situation sometimes.

Anyway I don't mean to bash the thing, There are many things I love like the stock browser(when it doesn't crash) and the build quality rocks. just not sure I can get past the bugs. Sure wish a major update would roll out soon to help me keep this tablet. Hell I don't even give a rat's ass about the SD card support...I just want a more friendly and stable Honeycomb is all.
[Xoom General] _RTFM_:
I've been reading several posts regarding how often the browser is crasing for others. This has not been my experience at all. Maybe 3 crashes a week with heavy use...I crash chrome and firefox on my PC nearly as often. How often is the browser crashing for you and what sites are doing it? I'd like to see if I can replicate your results.

I would probably complain about the update, but my Samsung Fascinate has taught me to have patience on par with a Tibeten monk.
[Xoom General] Old MuckenMire:
Man I've tried to find a pattern :) I would say I get 5-6 crashes a day. A lot of my surfing is done thru links, like Twitter links to news stories. Going to websites thru Pulse. You know, one click leads to another then another. That's what kills about the crashes. I'll be ten clicks and three tabs into surfing when it happens and lose everything. I have not seen any certain sites cause an issue more than any other except for one; oddly enough AndroidCentral can give my browser fits sometimes. It will just crash the browser. Other times it will work fine with that site. I wonder if it might be some ad on the page or something since it's so random, but that is the one site I have noticed more issues than others.

Another thing driving me crazy are the home-screen re-draws. Going from surfing, or from an app back to my homepage and everything on the home-screen has to reload. One in awhile this does not happen and it's really nice when it doesn't. :)

I know it's not hardware but a software issue, that's why I wish Google and Moto would get an update out. I'm not really complaining about the update either really...I don't want them pushing out something that is not ready....I just wish it were ready :):)
[Xoom General] 3devious:
The browser doesn't crash on me either but the xda and Phandroid apps do. The Gmail crap leaves a lot to be desired but I have yet to see a version that works as well as the website.
[Xoom General] Old MuckenMire:
funny enough XDA(premium) app has only ever crashed on me once..the first time I opened it. Ever since then it's been solid as a rock.
[Xoom General] mobilehavoc:
I wonder if you did a factory reset and don't install any apps or Flash if you'd still gave any issues. I'm ok right now but maybe worth trying.
[Xoom General] Kcarpenter:
I think these guys are expecting nightly build pushes from Google...because its a "Google Experience Device".

Hate to break it to any of you, but regardless of the Xooms current state(which I have no issues with at all) - software will only be pushed when its ready regardless of how long it takes. I've worked for companies where nothing came out of Beta for 2 or 3 years. Just chill...:cool:
[Xoom General] DCarey:
I heard the update will be coming tomorrow, if it doesn't appear just read this message again.

(This post meant with purely humor in mind...)
[Xoom General] cesarcerros31:
I lold

sent from my HTC evolution running a freshly baked gingerbread with the 4gs in it
[Xoom General] roebeet:
I care about the UK - you guys have great music and TV shows. :)

And you might get the ASUS Transformer before us Yanks, so keep that in mind.
[Xoom General] Old MuckenMire:
I'll try that again eventually, but just hate to do it right now after all the tweaking I've done.
[Xoom General] xguntherc:
Transformer source code was released today. That thing looks awesome.

for $400 I might snag it.
[Xoom General] SPIDERTECH:
I've had the same thing happen with the wallpaper/live wallpaper twice already. I set a wallpaper, decided I didn't want to use it, and changed to a live wallpaper. It looks like the live wallpaper may actually be crashing though. That's the only thing I can think of that would revert it back to the normal wallpaper image. It's not a random image for me, but it's still the same one I set. Not any less annoying though. I've also had the browser crashes in the same way you described yours. I had a few tabs open going back and forth between them and the browser just decided it would close. No FC. It just closed. Sometimes the recent app list is also empty and I have to select it a few times to get it to show anything.

I've considered doing the factory reset and start fresh again, but I don't want to have to go through the tweaking/setups all over again. I just wish I didn't have to do a factory reset to root the damn thing. If it could be rooted without wiping everything I'd just do that and use titanium to backup/restore all my apps and settings.

I'm ready for an update as much as everyone else though. Some of the issues i've been having may be due to the installation of some of my favorite apps that aren't so tablet-friendly. XD I'm actually more bummed about the apps that didn't work than I am excited about ones that do... :( lol
[Xoom General] MikeyMike01:
It doesn't help. I've done it.

Sent from my Xoom