Sunday, December 21, 2008

Closed API, Open System.

The "SMS problem" on Android currently is that you can send and receive MMS messages, but there is no interface to save what you receive to the sd card. This is a very laughable oversight by the dev team for version 1. Something that I can't believe is still a problem months after launch.

I fully expected the Android Market community to solve this problem eventually. However there was one main obstacle in their way.

If you looked at the Android API reference you won't see any mention of MMS messages. Even if you search for MMS you find 4 results, none of which show you in code how to access them. SMS is a little better it. There is at least code to send SMS messages. But the whole thing is limited in scope.

However, applications such as MyBackup and Txtract are able to access text messages. In the case of MyBackup it is also able to backup MMS messages. It's a good program. They both are. And when I looked at them I was amazed to see that while they were able to get "underneath" the API and access data the API never intended neither of them thought to solve the "SMS Problem". MyBackup gets close. It saves the attachments but doesn't do it in a way that allows the phone to then access it easily.

So I decided I was going to tackle the "SMS Problem".

My first thought was the the SmsManager class had some hidden functionality that was missing from the API. No such luck.

I poked around the Android Source for a while. This yielded a ton of information, none of it distinct on how to solve the problem. I happened upon a post somewhere online which gave code that used a ContentResolver to query a http://code.google.com/android/reference/android/net/Uri.html, to return a Cursor object that could then be used to access the messages. Ah ha!

Wait a minute what does all that mean?

URI stands for Uniform Resource Identifier (Go read that first link I dare ya). They are strings in a certain format that define a resource. A URLs, that address at the top of web browsers are a class of URIs.

A Cursor is the object used to access data (like that stored in a database) which is organized in columns and rows.

And a ContentResolver is a "class (that) provides applications access to the content model."

In short. You make a database query, using a string to find the data that isn't talked about anywhere in the android reference.

How that's done is talked about here.

So armed with this knowledge, the "special" URI, I was able to create "Save MMS". And solve the "SMS Problem" I estimate at least 2 months ahead of cupcake being pushed out to T-Mobile customers.

Is this good or bad? I'm not really sure. There was no documentation for what I was doing. I had to drudge through it and even when I thought I had something working some users are still encountering problems. I'm assuming this is due to different phone sending MMS with different metadata. I simply did not have enough information to write clean enough code for this.

21 comments:

Anonymous said...

free online dating [url=http://loveepicentre.com/]totally free adult personals[/url] dating sim http://loveepicentre.com/ dating call lines

Anonymous said...

honda car audio code [url=http://www.cardvdplanet.com/7-inch-motorized-touchscreen-1-din-dvd-player--discount-price75.html]oem car audio ford taurus[/url] cathedral city auto audio store http://www.cardvdplanet.com/shadow-chrome-stylish-touch-screen-car-dvd-with--discount-price7.html honda accord car audio forum
videovisor auto dvd visor [url=http://www.cardvdplanet.com/car-radio-with-usb-sd-mmc-card-cd152--discount-price43.html]auto audio chesapeake virginia[/url] videovisor auto dvd visor http://www.cardvdplanet.com/7-inch-display-car-dvd-player-touchscreen--discount-price31.html beststuff fuel car dvd ipod vacation houseboat lake powell
cathedral city auto audio store [url=http://www.cardvdplanet.com/buy-cheap-car-dvd1.html]car audio toyota[/url] ho auto audio http://www.cardvdplanet.com/car-video-dvd-player-single-din-7-inch--discount-price28.html selling auto audio

Anonymous said...

cardinal health distribution center in ohio [url=http://usadrugstoretoday.com/products/dramamine.htm]dramamine[/url] how to tell a gray tree frogs stress level http://usadrugstoretoday.com/products/arava.htm infant heart rate http://usadrugstoretoday.com/categories/sleeping-aide.htm
leather penis straps [url=http://usadrugstoretoday.com/products/lukol.htm]lukol[/url] cvs pharmacy mclean va [url=http://usadrugstoretoday.com/categories/stop-smoking.htm]generic for adivan[/url]

Anonymous said...

dog health troubleshooting [url=http://usadrugstoretoday.com/categories/anti-allergique-et-l-asthme.htm]anti allergique et l asthme[/url] need ideas for a ladies christian luncheon and tea http://usadrugstoretoday.com/products/detrol.htm breast cancer awareness pink gloves http://usadrugstoretoday.com/products/aricept.htm
cholesterol test figures [url=http://usadrugstoretoday.com/categories/la-sante-des-os.htm]la sante des os[/url] penis silicone rings [url=http://usadrugstoretoday.com/products/shallaki.htm]fraser health teen pregnancy rates 2006[/url]

Anonymous said...

free patch to quit smoking [url=http://usadrugstoretoday.com/products/zoloft.htm]zoloft[/url] diabetic wound healing http://usadrugstoretoday.com/categories/hypnotherapie.htm rancho springs medical center http://usadrugstoretoday.com/products/celebrex.htm
asian chubby cialis fetish free interracial levitra not not [url=http://usadrugstoretoday.com/products/aleve.htm]aleve[/url] dc400 diet pills for sale [url=http://usadrugstoretoday.com/products/stress-gum.htm]fix missed vein injecting drugs[/url]

Anonymous said...

http://online-health.in/benadryl/allergic-to-benadryl
[url=http://online-health.in/azithromycin/side-effects-of-azithromycin-tablets-250-mg]buy cheap cheap kamagra uk viagra buy cheap cheap kamahta[/url] actors levitra commercial models [url=http://online-health.in/anafranil]anafranil[/url]
super drug in eastleigh pics http://online-health.in/bisacodyl/eficacy-between-bisacodyl-and-sennosides
[url=http://online-health.in/avalide/fda-recommend-diabetic-coreg-avalide]ethical issues of workplace drug testing[/url] argumentative story about drugs [url=http://online-health.in/aristocort/aristocort-cream]aristocort cream[/url]
cialis state contractor licensing board http://online-health.in/avalide/avalide-blood-semen
[url=http://online-health.in/arava]sulfa drug names[/url] can you buy drugs off he street in boston [url=http://online-health.in/antibiotics/pneumonia-secondary-to-copd-treatment-antibiotics]pneumonia secondary to copd treatment antibiotics[/url] columbian drug trade cocaine [url=http://online-health.in/beconase/beconase-flonase-uk]beconase flonase uk[/url]

Anonymous said...

http://poow.in/labetalol/labetalol-broncotis
[url=http://poow.in/levitra/buy-levitra-onlines]oral route of drug administration in lymphatic system[/url] viagra contra cialis [url=http://poow.in/metformin/metformin-and-pain-reliever-interactions]metformin and pain reliever interactions[/url]
norvasc perscription drugs http://poow.in/metoclopramide/ic-metoclopramide
[url=http://poow.in/melatonin/melatonin-for-young-children]compound pharmacy tucson[/url] land use pennsylvania drug rehab facility [url=http://poow.in/levitra/prices-levitra]prices levitra[/url]
stop blushing drugs http://poow.in/glaucoma/glaucoma-tucson
[url=http://poow.in/zyban/generic-zybancomment-generic-post-remember-zyban]drugs made from petroleum[/url] texans war on drugs [url=http://poow.in/rhinocort/rhinocort-aqua-steriod]rhinocort aqua steriod[/url] online viagra prescriptions [url=http://poow.in/rhinitis/bacterial-rhinitis-in-dogs]bacterial rhinitis in dogs[/url]

Anonymous said...

designer reading glasses http://topcitystyle.com/roberto-cavalli-jeans-cut-pants-for--item1891.html different types of horseshoes [url=http://topcitystyle.com/north-sails-brand58.html]adidasmartial arts shoes[/url] ralph lauren stovepipe
http://topcitystyle.com/celyn-b--classic-denim-brand123.html fashion photographer professional [url=http://topcitystyle.com/men-sport-jackets-type1.html]wholesale replica chanel handbags[/url]

Anonymous said...

free business card designer http://topcitystyle.com/jean-paul-gaultier-casual-brand116.html chanel oval stamp [url=http://topcitystyle.com/52-sweaters-size3.html]kiwi shoeshine kit[/url] lyrics for lying is the most fun a girl can have without taking her clothes off
http://topcitystyle.com/dolce-amp-gabbana-long-sleeve-button-down-dress--item2546.html ralph lauren atmosphere carpet [url=http://topcitystyle.com/dresses-page3.html]reiker shoes[/url]

Anonymous said...

travel clothes pouch hair dryer http://adventurecollection.in/vacation-packages/las-vegas-package-vacation-deals travel lodge in kissimmee florida
[url=http://adventurecollection.in/tours/ghost-hunting-tours-in-il]info on travel trailers[/url] travel clothes line [url=http://adventurecollection.in/tours/group-tours]group tours[/url]
florida travel and tourism http://adventurecollection.in/plane-tickets/cheap-plane-tickets-for-soldiers
[url=http://adventurecollection.in/tour/virtual-tour-christopher-columbus]mexican travel[/url] las vegas travel brochures [url=http://adventurecollection.in/tour/free-new-york-city-virtual-online-tour]free new york city virtual online tour[/url]
holland travel package http://adventurecollection.in/tours/nyc-tours-pricing disney cruise travel htm [url=http://adventurecollection.in/car-rental/union-station-chicago-car-rental]union station chicago car rental[/url]

Anonymous said...

creampie virgin http://theporncollection.in/gay-love/prioners-fucked-gay
[url=http://theporncollection.in/masturbating/sean-williams-masturbating-in-road-trip]dildo nova scotia[/url] download anal sex video [url=http://theporncollection.in/hentai-porn/hentai-comics-english]hentai comics english[/url]
just free hentai http://theporncollection.in/gay-video/gay-chat-tri-cities-tennessee
[url=http://theporncollection.in/gay-xxx/gay-rights-and-the-presidential-election]adult language therapy materials[/url] sexy little next door [url=http://theporncollection.in/hentai-sex/the-boundary-between-dream-and-reality-hentai]the boundary between dream and reality hentai[/url]
adult sex videos free homemade http://theporncollection.in/gay-love/zoo-gay-sex
[url=http://theporncollection.in/mature-woman/cheap-motor-insurance-mature-drivers]hentai flash fish[/url] sonic free online games hentai [url=http://theporncollection.in/incest/story-incest]story incest[/url]
doa hentai quiz http://theporncollection.in/gay-porn
[url=http://theporncollection.in/porn-galleries/free-ron-jeremy-porn]redway adult[/url] military schools adult [url=http://theporncollection.in/gay-movie/gay-interracial-porn-gallery]gay interracial porn gallery[/url]

Anonymous said...

convincing someone to have anal sex http://xwe.in/shemale/toronto-shemale-escort-eye
[url=http://xwe.in/hcg-oral/men-giving-oral-sex-to-women]sergeant frog hentai[/url] video game babes hentai pics [url=http://xwe.in/shemale/piss-shemale-phone]piss shemale phone[/url]
huge sexy melons http://xwe.in/erotic-gay/free-erotic-coupons
[url=http://xwe.in/nylon/ultra-high-pressure-nylon-tubing]adult version of you tube[/url] bondage dildo [url=http://xwe.in/ass-sex/puerto-rican-ass]puerto rican ass[/url]
adult toy male doll http://xwe.in/shemale/shemale-angels
[url=http://xwe.in/orgy/orgy-in-crowd]worse hentai flash[/url] us virgin islands bankruptcy court [url=http://xwe.in/handjob/wifes-friend-gives-handjob]wifes friend gives handjob[/url]
wife jams the dildo in my ass http://xwe.in/blow/france-nice-blow-molding
[url=http://xwe.in/oral/teeth-cut-penis-oral-sex]japanese special porn[/url] hentia porn animations [url=http://xwe.in/oral/diagram-of-the-oral-cavity]diagram of the oral cavity[/url]

Anonymous said...

fashion designer http://luxefashion.us/white-black-jackets-amp-sweatshirts-color18.html demonstration tying shoes [url=http://luxefashion.us/black-multicolored-evening-cocktail-color63.html]las vegas comedy shoes[/url] fashion belts
http://luxefashion.us/-leather-big-bags-women-category38.html clothes steamer [url=http://luxefashion.us/dark-blue-hoodies-color11.html]orthopedic shoes[/url]

Anonymous said...

pioneers of public health [url=http://usadrugstoretoday.com/categories/miglioramento-femminile.htm]miglioramento femminile[/url] blood alcohol and driving australia http://usadrugstoretoday.com/products/levothroid.htm
drug rape sex free videos [url=http://usadrugstoretoday.com/products/horny-goat-weed.htm]horny goat weed[/url] millennial medical [url=http://usadrugstoretoday.com/categories/gastro-intestinal.htm ]health conscious likert survey [/url] herpes sharp pain foot
units of stress [url=http://usadrugstoretoday.com/products/himplasia.htm]himplasia[/url] viagra for impotence http://usadrugstoretoday.com/categories/anti-diabetic.htm
wimberley pharmacy [url=http://usadrugstoretoday.com/products/tentex-royal.htm]tentex royal[/url] microwave tower erection [url=http://usadrugstoretoday.com/catalogue/c.htm ]non prescription male enhancement fast convenience store [/url] description of vitamin a

Anonymous said...

globe skate shoes http://www.thefashionhouse.us/lilac-yellow-on-sale-color193.html chic junior clothes [url=http://www.thefashionhouse.us/-tank-tops-category76.html]kohl hahn shoes[/url] faux chanel earrings
http://www.thefashionhouse.us/dsquared-hooded-zip-up-jacket-for-men-navy-blue-item2258.html clothes converter [url=http://www.thefashionhouse.us/yellow-men-color44.html]new balance tennis shoes[/url]

Anonymous said...

http://xwv.in/zyban/quit/smoking/on/150/mg/of/zyban
[url=http://xwv.in/lipitor/lipitor/handicapped]redlers professional pharmacy[/url] chapel hill pharmacy middletown [url=http://xwv.in/weight-loss/back/pain/after/weight/loss]back pain after weight loss[/url]
mylan drugs http://xwv.in/pamelor/pamelor/fact/sheet
[url=http://xwv.in/weight-loss/white/weight/loss]university of florida pharmacy shcool[/url] law digital scale drug paraphernalia [url=http://xwv.in/kidney/kidney/disease/atn]kidney disease atn[/url]
what kind of drug is ambien http://xwv.in/paroxetine/ordering/online/paroxetine
[url=http://xwv.in/nervousness/nervousness/dynacirc]preventive care drugs under high deductible health plans[/url] buying prescription drugs bahamas [url=http://xwv.in/weight-loss/la/weight/loss/fast/forward/drink/reviews]la weight loss fast forward drink reviews[/url] dc health insurance [url=http://xwv.in/kidneys/kidneys/depleting/protein]kidneys depleting protein[/url]

Anonymous said...

speedo shoes http://topcitystyle.com/-leather-shoes-shoes-category13.html petite clothes stores for women [url=http://topcitystyle.com/-clubbing-roberto-cavalli-category18.html]lowteck shoes[/url] lauren herringbone wine
http://topcitystyle.com/vae-victis-pullover-brand47.html shoes wedding wide width [url=http://topcitystyle.com/faq.html]ny clothes[/url]

Anonymous said...

mercedes special tools http://pqx.in/daihatsu/daihatsu/charade/1000cc/3/cyl mercedes gul wing
[url=http://pqx.in/volvo/volvo/240/wot/wide/open]comes twice mercedes[/url] riley dodge age [url=http://pqx.in/jaguar/jaguar/xj/replacement]jaguar xj replacement[/url]
automobile lease calclator http://pqx.in/maybach/maybach/phaeton
[url=http://pqx.in/jaguar/jaguar/parts/mk1]florida auto dealer bond[/url] encino mercedes benz [url=http://pqx.in/infiniti/infiniti/g/35/coupe]infiniti g 35 coupe[/url]
dodge ram performance upgrades http://pqx.in/buell/buell/model/history
[url=http://pqx.in/fiat/fiat/terrazo]dodge srt 4 htm[/url] recover an automobile dash [url=http://pqx.in/bike]bike[/url]

Anonymous said...

ford gt40 lottery http://lwv.in/slots microsoft cooperation word lottery
[url=http://lwv.in/betting/spred-betting]blackjack odds online casino[/url] lifestyle lottery 2007 [url=http://lwv.in/betting/horse-betting-calculator]horse betting calculator[/url]
blackjack casino gambling free http://lwv.in/gambling-online/residential-problem-gambling-treatment-virginia
[url=http://lwv.in/online-casinos/biloxi-casinos-thanksgiving-day-dinner]senaca nation casino[/url] online gambling information [url=http://lwv.in/online-casinos/hardrock-casinos]hardrock casinos[/url]
dc lottery application http://lwv.in/bingo/baby-shower-bingo-game arrangement casino holland [url=http://lwv.in/baccarat/gratis-online-baccarat]gratis online baccarat[/url]

Anonymous said...

free ilegall movie downloader [url=http://moviestrawberry.com/films/film_damages/]damages[/url] flintstones movie funny dirty http://moviestrawberry.com/films/film_mind_field/ free fucking movie
linda purl movie [url=http://moviestrawberry.com/films/film_baby_s_day_out/]baby s day out[/url] midnight movie shannon grey http://moviestrawberry.com/films/film_the_pillow_book/ jackass the movie
shortbus movie [url=http://moviestrawberry.com/films/film_wendy_and_lucy/]wendy and lucy[/url] bikini bistro movie vid trailer
movie darryl [url=http://moviestrawberry.com/films/film_maquinista_el/]maquinista el[/url] movie 300 monsters http://moviestrawberry.com/films/film_der_rote_baron/ sativa rose movie clips
repo genetic opera movie homepage [url=http://moviestrawberry.com/films/film_mutant_x/]mutant x[/url] blow job movie http://moviestrawberry.com/films/film_derailed/ romeo and juliet movie pics

Anonymous said...

movie times southern maine [url=http://moviestrawberry.com/films/film_around_the_world_in_80_treasures/]around the world in 80 treasures[/url] bdsm free movie galleries http://moviestrawberry.com/films/film_the_office/ analyse of i robot movie
incredible hulk movie [url=http://moviestrawberry.com/films/film_er/]er[/url] movie datatbase http://moviestrawberry.com/films/film_cold_war_70/ buy dvd movie
mature mom movie gallery [url=http://moviestrawberry.com/films/film_critters_4/]critters 4[/url] transporter movie wallpaper
cyclops car from the movie xmen 2 [url=http://moviestrawberry.com/films/film_waydowntown/]waydowntown[/url] hotel erotica movie scene http://moviestrawberry.com/films/film_the_fighting_seabees/ bangor maine movie showings
richard gere new movie sarajevo [url=http://moviestrawberry.com/films/film_the_sisterhood_of_the_traveling_pants/]the sisterhood of the traveling pants[/url] laila bollywood movie http://moviestrawberry.com/films/film_joe_rogan_live/ new heman movie