I like to build stuff that is useful and solves problems. This blog contains things that I find interesting enough to write about.
Tuesday, December 21, 2004
NFL.com - New England at Miami Game Recap
Amazing game ... a great football game after a long time. I am done with the first version of my App and treated myself to lying in bed and watching the entire game last night. Have 2 more days to get some shopping done so will get started today.
Sunday, December 12, 2004
Sunday Blues
One thing I did notice though. I set the resolution to 640 * 480 for taking images and in defered encode mode i run out of memory very quickly. It works ok for 340 * 240 resolution ( I took 24 consecutive snapshots and then gave up). There must be something that I am doing wrong in my code ... cant put my finger on it. I really shouldnt be getting a ENOMEMORY error in this case. Hopefully tommorrow I will get some time in the evening to play around with the code.
Its been very frustrating the last couple of weeks and regular readers of my blog ( if there are any) might have noticed that I was slacking off on adding new posts. The project I am working on is interesting to say the least and its very challenging. For some reason i keep encountering issues everyday. Havent had a day when I didnt have to research on some topic or the other.
Hopefully, tommorrow will be a very productive day. I have always found that If I reach the office around 8:00 am the day becomes very productive. Will have to beat the cold weather and get up really early tommorrow.
Saturday, December 11, 2004
ICamera Interface - Preview Mode
To implement it in my applet I just the took the code from the SDK documentation to get started. I added a pointer to the ICamera interface in my Applet structure. I prefer not to have a AEEDeviceInfo structure in my applet so I just include the width and height of the screen in the applet.
typedef struct _cameratest{ AEEApplet a;// First element of this structure must be AEEApplet IDisplay *pIDisplay; IShell *pIShell; EAppStateType m_eAppState; // Current Application State EAppStateType m_ePrevState; uint16 cxScreen;// Width of the handset screen uint16 cyScreen;// Height of the handset screen IMenuCtl *m_pMainMenu; ICamera *m_pICamera; // ptr to the camera } cameratest; |
To Start the Camera I use a function that will initialize the parameters and start the camera in the preview mode. Most important thing is to initialize a callback and pass the AEECameraNotify structure. Since Camera access is done asynchronously in BREW (very much like other platforms) the callback serves an important role.
static void cameratest_DisplayCameraPreview(cameratest * pMe) { int nErr; AEESize az; pMe->m_eAppState = APP_STATE_CAM_PREVIEW; if (ISHELL_CreateInstance(pMe->pIShell, AEECLSID_CAMERA , (void**)(&pMe->m_pICamera)) != SUCCESS) return; // Register callback notification function. nErr = ICAMERA_RegisterNotify(pMe->m_pICamera, cameratest_CameraNotify, pMe); if (nErr) { DBGPRINTF("ERROR IN REGISTERING CALL BACK %d", nErr); Cameratest_goBack(pMe->m_eAppState); return; } az.cx = pMe->cxScreen; az.cy = pMe->cyScreen; ICAMERA_SetDisplaySize(pMe->m_pICamera, &az); nErr = ICAMERA_Preview(pMe->m_pICamera); if (nErr) { DBGPRINTF("ERROR in initiating preview %d", nErr); return; } } |
Every display function must have a hide function. To stop the Preview mode all we need to do is call the ICAMERA_Stop() function.
static void cameratest_HideCameraPreview(cameratest * pMe) { if(ICAMERA_Stop(pMe->m_pICamera) == SUCCESS) DBGPRINTF("STOP COMMAND ACCEPTED"); } |
The call back function is where the real stuff happens. Once the Camera is ready the OS will call the callback function that we had registered earlier. The AEECameraNotify structure contains a bunch of info about the callback. In the preview mode the first callback will have the status CAM_STATUS_START with nCmd = CAM_CMD_START and nSubCmd = CAM_MODE_PREVIEW. The frames captured from the camera are sent to the callback at regular intervals ( depends on the fps) and you can capture the frame of data using ICAMERA_GetFrame() function. The interface does not display the frames on the screen much like the API in series 60 so you have to display them yourself.
static void cameratest_CameraNotify(void * pUser, AEECameraNotify * pn) { cameratest * pMe = (cameratest *)pUser; if (!pMe !pn) return; switch (pn->nStatus) { case CAM_STATUS_START: // Preview has begun... break; case CAM_STATUS_FRAME: { IBitmap * pFrame; AEEBitmapInfo bi; // // IMPORTANT NOTE: You need to do IBITMAP_Release(pFrame) after you're done with pFrame. pFrame = ICAMERA_GetFrame(pMe->m_pICamera, &pFrame); if (!pFrame) { DBGPRINTF("DID not get FRAME"); break; } // Get the bitmap info...this can be saved in app global structure. IBITMAP_GetInfo(pFrame, &bi, sizeof(bi)); // Display the frame at (0, 0) location of the screen IDISPLAY_BitBlt(pMe->pIDisplay, 2, 2, bi.cx, bi.cy, pFrame, 0, 0, AEE_RO_COPY); IBITMAP_Release(pFrame); IDISPLAY_Update(pMe->pIDisplay); } break; case CAM_STATUS_DONE: break; case CAM_STATUS_ABORT: // Preview got aborted. break; } } |
Off course in the production version of the code you will have to take care of some additional things. The documentation advises to make sure that when the applet receives a EVT_PAUSE event – make sure you shut down the preview mode. Also it would be a wise move to put in some code for the other status codes in the callback like CAM_STATUS_ABORT, CAM_STATUS_DATA_IO_DELAY etc.
ICamera Interface .....
ICamera interface provides access to the camera features of the handset. It is can be used in devices that support BREW version 2.1 and above. There is a catch to it though some devices are version 2.1 and above and have a onboard camera but the ICamera interface is blocked ( mostly due to carrier influence? don?t want to share the picture messaging revenue).
In States we recently have a few devices(Not all of them might be out)
Moto V265(This is the one that I have),LG VX7000,Moto V710 and LG VX8000. These do support the ICamera interface and are available with Verizon wireless? There might be others ..but haven?t had a chance to look at them.
Spent the last couple of days working on it. There are three modes that the ICamera interface can be used in Preview Mode, SnapShot Mode, Movie Mode. Havent tried out the movie mode .. but played around with the Preview mode and the snapshot mode and thanks to the some help by folks at the Qualcomm Brew forums have some code ready.
Namit starts Bloggin ....
This is nice ... I wonder how many of my old school buddies are on the blogosphere ...
Friday, December 10, 2004
Blogs gettin famous ...
My Blog is famous
This is a interesting page ... You can enter any text in the query string and it will be displayed in the banner these guys are carrying. Neat idea ... Make sure you enter the text in the variable 'teksti' ( I guess its russian )
Saturday, December 04, 2004
Hulchul - My take on the movie
The story line is nothing new and follows the same old pattern. Two families that are sworn enemies of each other. Like QSQT the enemity stems from a love affair that went bad and resulted in blood being spilt. The movie revolves around Akshaye khanna and Kareena kapoor who fall in love despite the opposition of their families.
I went to see the movie with a couple of old friends and I had got decent reviews of the movie. In the beginning I was really cursing the people who told me the movie was good. It started out with the same old melodrama. Arshad Waarsi and Paresh Rawal added the much needed spark to the movie.
The first half of the movie was kinda boring though it did have some funny stuff in it. I specially liked the dialogs in the movie. I wish I had a pen and paper so that I could have written them out. :-). The second half of the movie was a different story all together.
All in all the best part of the movie was the wedding scene in the end and the acting of Arshad Waarsi and Paresh Rawal. Though the others also acted their parts out pretty well. |
|
The part that I did not cherish about my movie experience last night was that there was no interval. I can never watch a hindi movie at a strech ...3 hours ... in that cramped seat.
Tuesday, November 23, 2004
Google sued by nude photo website
He said his company had sent nearly 30 formal requests to Google, asking it to remove the photos and password lists from its search results, but was dissatisfied with the company's response. "
My Response :
HAHAHAHAHAHAHAHHAHAHA...
Among other news ....
Enterprise Security Today (Online Security): NewsFactor Network - Mobile Security - Skulls Trojan Prompts Security Firms To Protect Smartphones
Barcodes and Cellphones - A Commentary
Found this definition of a linear barcode in the glossary section of Barcodesinc .
"Information encoded into a pattern of varying-width parallel bars and spaces. The most common symbologies used in the retail environment are UPC-A for merchandise marking and Code 128 for shipping containers. Other symbologies include Plessey Code 39, Interleaved 2 of 5 and EAN/JAN. "
This is the best definition I could find on the web that wasnt biased to a particular type of barcode. To most people barcodes are a series of black lines on a white background that are present on the packaging of almost everything worthwhile that they buy from a retail store.
Although, these barcodes ( referred to as linear barcodes) are the most commonly seen there is another breed or class of barcodes - the 2-dimensional barcodes. You can get the complete lowdown on 2D barcodes by doing a simple search on google. If you want just a basic understanding then this page at barcodeman should be of interest.
Barcodes and Cellphones ... ?
There are 2 main models that I can think of where barcodes can and in some sense are playing a important role.
- Handset to World
- World to Handset
1) Handset to World model.
This model includes applications that exchange information between the handset and a remote server. The aim here is to use the value encoded in a barcode to avoid the user having to enter data on the constrained keypad of the handset. Linear barcodes usually contain a small string of data and need to be patched up to a datastore on the back end. This can be a limiting factor in some applications that cannot afford synchronization with a data store all the time. 2 dimensional barcodes come into the picture here. These barcodes can encode relatively large amounts of data and thus eliminating the need of a data store in some cases.
Enterprise applications like inventory management apps or time tracking applications on the handsets fall into this category. There are 2 ways you can scan a barcode on the handset.
- Use a laser scanner connected to the cell phone/PDA.
- Use the camera on the new cell phones to capture and decode the barcode.
There are quite a few firms providing solutions that enable you to incorporate barcode scanning capability - Symbol, AirClic , Scanbuy, Gavitec, Semacode, Mediaseek, etc ... Personally, I do believe that the best way to go about incorpoting barcode scanning is to go with the camera cell phone approach. Yes, the decoding is not as easy as laser scanners but when you consider the flexibility in the number of devices available and also the cost, laser scanner based solutions kinda fall behind. But, this just my opnion.
2) World to Handset.
This model includes applications that require remote servers to initiate the trasactions by sending information to user's mobile handsets. Marketing, info on deals and coupons are just some applications that fall in this category. There has been a lot of literature published on the web regarding sending coupons etc to cell phones. The basic functionality of the system is very simple. The server(world) sends a barcode and some text describing the deal or the coupon to the users handset. To redeem the coupon the user walks in to the store and the attendent scans the coupon barcode directly from the handsets screen. There are some variations to this basic model available in the market today, a quick search on google will reveal a lot of firms offering this solution.
Monday, November 22, 2004
Monday Night Mayhem
Still havent been able to find the programming zone at home. I started working on a RSS reader for cell phones in J2ME. There are several versions available already but I thought of building one myself just to get me fingers dirty with RSS formats. The plan is to build a MIDlet that can read both 0.91 and 1.0 formats and if my preliminary research is correct then version 2.0 should be no problem once I can read these formats. Plan to use kxml library to do the XML parsing stuff. Will post the source code on my programming blog once its done, should be sometime this week.
Sunday, November 21, 2004
Issues with installing Hello World Applet on the phone
So the next step will be to port my app on the device and test and debug from there. I found this excellent thread at the BREW forums with all the info required to create the mod file. Hats off to Tyndal.
You can access the thread here.
The only thing stopping me from actually deploying a Applet on the phone now is the drivers for the data cable for the Moto v26x series. The OS detects that it’s a device from the V26x series but just doesn’t find the drivers anywhere. I haven’t been able to find them anywhere on the web either.
Just cant wait to have a complete BREW applet run on the device. They say it gets easier after the first one. Its been three weeks since i started coding in BREW and though the programming part is something that i have gotten used to (its really just C) the other part about the device and stuff is a royal pain in the A**.
Saturday, November 20, 2004
Saturday ...sleepy Satuday
As for the other stuff I had planned for .. just cant find the zone these days .. Had plan to research on a RSS reader that i wanted to make for my cell phone.. but I just cant find the programming zone state of mind .. been sitting in front of the PC for clost to an hour now .. but havent coded anything .. hope i find my programming ways tomm morning .. have a lot of stuff to do .. as for now .. will return to watching Godfather on cable ...
TGIF
In my office we have this ritual - we get pizza for everybody for lunch .. everybody just gathers around and has slices of pizza and coke(not slices but cans ) . Its the time when you drop whatever you are doing and head to the common area to grab a slice of the best pizza ("The Bird" from 2boots) before its finished. Once you are done with that you can sample the other toppings. I have always made it a point never to take a holiday on Friday but occassionaly i had to(what was i thinking ??) and have always missed the pizza round about lunch time. We also have a programmer who is like the Pizza Marshal .. he is incharge of ordering the pizza and making sure we have plenty of coke to go around.
In the evening today i had rented a couple of videos and watched both of them .. the first one "The Whole 10 yards" was extremely funny and the second one "The Day After Tommorrow" was a bore actually. I got time to catch up on my email correspondence while I was watching that movie. Still have a lot of catching up to do ... but .. I have the whole weekend ahead of me. :-)
Saturday, November 13, 2004
Rain and the City
Wednesday, November 10, 2004
Another factor to worry about !!!
Found this interesting article about Battery Life.
Solving The Battery Life Puzzle
While you are at it.... it would make sense to go through this too
Maximizing Battery Life With Wireless Software
Cold weather makes me lazy
Not been working on anything these days. I have my hands full at work with the new BREW project. But at home i just havent been able to concentrate on doing anything c0nstructive at home after work. Cable TV is also a very bad influence. All i have been doing for the last week or so is coming back home and sitting down in front of the tube till i feel sleepy. Something needs to be done about this and now !!!!!...
Saturday, November 06, 2004
WIT Football
BREWDIR
I really need to stop buying things on impulse. :-)
Thursday, November 04, 2004
BREW Support
For instance, When you want to develop for a particular phone you have to send the phone out to QualComm to get the Test bit enabled. This can be a drag for developers migrating to BREW from Series 60 and other platforms but on their part Qualcomm is pretty quick to return the phones. They received my devices on November 3rd and sent them out the same day using overnight shipping. I got the phones back today :-)... There was a minor snag though the camera stopped working on the devices. Its probably due to some bit on the handset getting the wrong value when they flashed the device. I rang up the tech support at their phone center and they were quick to realise their mistake and are paying for the phones to be shipped back to them.
I am not a big fan of the BREW forums at Qualcomm's website but so far all my questions have been answered within 24 hours. This shows that these guys are putting some effort into this. I am slowly getting used to the BREW way of doing things these days and honestly it doesnt seem as big a pain as it did before. Though i admit I havent done all the steps yet and havent actually deployed an application on the handset. From the programming point of view I am getting in touch with a old friend of mine "C" and offcourse "Pointers". Coming from 5-6 months of Java its a bit tough at times but coding in C is a lot easier to get accustomed to then C++.
Wednesday, November 03, 2004
BREWDO
I have been playing around a bit with BREW now and then but have never sat down and actually coded anything meaningful. The fact that kinda turns me off from BREW is the amount of control that Qualcomm has on the development process.
First you need to have access to the developer extranet to get any meaningful documents. The book that i have hasnt been very helpful at all(yet). The best resource for learning to code for the BREW platform is the SDK documentation. The interface names are inituitive so its pretty easy to figure out which interface you might need to accomplish the task.
Using Visual Studio .NET as the development environment is a big help. I have always loved working in that IDE. The other thing that kinda bothers me about BREW is that there is no documentation on the internal working of the platform. Symbian so good in this regard. I am still finding my feet in BREW but soon once i have written a couple of programs and played around with a couple of interfaces I would like to know how best to optimize my code. Couldnt find any document on Qualcomm's website.
I have no complains about the documentation that is provided. To a novice developer it is very useful. What is missing is documentation by thord parties on these topices. J2ME remains my favourite subset to develop apps for mobile devices.
Tuesday, November 02, 2004
Moving out blues ..
I guess now i should really put in some effort to get my preparation of SCMAD going.. i guess i mentioned it earlier but the ethusiasm kinda fizzled out. Had some time to read up on the PDA API for J2ME ( JSR 75) earlier. Havent been able to play with code on that yet... hopefully, now that I am kinda settled in my new place i can spend some time on it.
Tuesday, October 26, 2004
Sun Java Studio Mobility 6 rocks....
I have had trouble creating new projects but the import facility that allows me to import earlier WTK projects is well made. I am sure other IDE's have that too but havent used them so dont know. I have used eclipse with the J2ME plugin but did not like that much and was using textpad with WTK (KToolbar) for all my project builds. I still prefer using the WTK but with this IDE i get "intellisense" :-)... i believe thats what you call it.
I am inlcuding a picture of the Import feature in the IDE. All you have to do is specify the root directory of the Toolkit and all the apps get listed out. I usually have a skeletal application in the WTK\Apps folder and i use this to build on the Midlet Suites.
Another nice feature i noticed abt the IDE is that it automatically includes all the attributes in the manifest file( eg. MIDlet-Delete-Confirm) of the jar. In the WTK these attributes only go into the JAD.
All in all .. its the best tool for J2ME development that i have used so far and I am planning on sticking with it.
Thursday, October 21, 2004
QR Tshirts --- Remembering Minority Report
QR t-shirts
The idea is to put a 2 dimensional barcode on a tshirt( frankly the size of the barcode is a bit huge- check the pic) and this barcode will be scanned by an application running on a camera phone. The app would read the barcode that has a URL in it and launch the URL on the phones browser. Pretty neat ..eh..
This concept .. as far as i know started with semacodes.. they use DAtamatrix symbols instead of QR codes. But frankly this doesnt make a difference... the fact is to the end user what matters is whether the barcode looks pretty enough.. Most of the 2D barcodes look pretty .. atleat to me. The only notable exception being the PDF417 symbol.
What attracts me to this post is not the application idea itself. I think the idea is real cool. I personally hate entering long URLS on phones and i acknowledge the fact that BARCODES can be a very handy as data entry facilitators. I work for a firm that provides barcode scanning tech for cell phones.
There are 2 reasons that i got interested in this post.
1) Look at the size of that barcode.
2) Is this the first step of barcoding people ??? ( more on this later)
1) Size : I am a programmer myself and have also worked on the QR decoding mechanism. That barcode is huge ..ok .. it does eliminate the need for a additional add on lens but its just so huge.. kinda makes difficult to get a shot.
2) Does anyone remember the movie Minority Report ??? in that they had a way of tracking each person ... some how cant help but feel we are edging ever so close to that era where every body knows where u are and what u are doin... Location Based Services on cell phones will get us there pretty quickly .. but imagine this .. each person has a barcode tattoo or better yet RFID tag stuck inside ur skin somewhere .. wont that be interesting ...
Wednesday, October 06, 2004
Security Risk ??????
BBC NEWS | Technology | Latest mobiles 'open to attack'
WOW... Correct me if I am wrong but don't you need security permissions to almost anything kool in a the mobile java environment ???
I dont think the guys behind the JSR would not secure the part that allows a MIDlet to listen to phone conversations. Accessing the address book is offcourse required and i bet this would be a protected method (needs permission). Will have to check out the new package, I believe it should be the PIM package. If i can access the phone conversations.. that would be so cooool...
IMHO native applications pose a much bigger risk as they do allow access to each and every dam thing ( ok.. not everything) on the phone ...
Tuesday, October 05, 2004
The FUTURE : Mobile games and other apps in the US
USA and China to lead the world in Mobile Games
WOW !! The game industry sure is headed towards more rosier times if this is true .. I do believe that the market in States will improve as more and more people look towards their cell phones as something more than a phone and a watch ..
The consumers are getting newer and more power packed phones these days and this leads to the demand for more content...
The US corporate market will also require a substantial share of the content that is produced over the next 5 years or so .. Most of them already have some solutions in place for PDA's.
All in all its a nice future for the Mobile Application industry ...
There are a few things that do bother me though ...
1) SMS never really made it very big here in states ... the reason .. the way the wireless calling plans are structured... why would i bother typing in text on the phone when i canjust call the person up ( If i am under my minutes quota .. its not costing me extra) ... I was talking to a developer i met in France the other day about the practical use of SMS .. he says he prefers sending an SMS when he just wants to get a message across and not engage in a conversation .. for me .. here in states ... i will have no remorse in calling the person up .. giving the message and hanging up without ever asking "hows everything" .... does it mean I am rude ???
2) Lets face it .. when I am home .. i would prefer playing a game on the XBOX not on the mobile phone ..when I am at work i would prefer to play on the web not the mobile phone.. the only time i see myself playing a game on the phone is during my commute ... i take a train to work ... its a nice way to kill time .. its a good market specially here in NYC cause most of the people use mass transit ... but what about the people who drive .. majority of the people in rest of the country drive to work .. cant expect them to take time out of driving and playing a quick game of snake ( I hope not :-))
There are a few obstacles .. but over all i do believe the mobile phone /PDA will be the next big thing ...
Goin Mobile .................
Wednesday, September 22, 2004
SCMAD
Its gonna be tough ... everywhere i go people mention tht the best way to prepare is reading the specs.... that is something that puts me to sleep (instantly) ... wish someone would not see the economic side of things and come out with a book ...some how reading the same sleepy stuff from a book instead of a PDF is more inviting :-)...
found this site .. seems to be good
gaynb
Tuesday, September 21, 2004
Google Search: punit raizada
This is the google listing when u type in my name as the search string.
Who am i ?
who am i ?
Punit Raizada .. just a regualar person sitting at home right now .. completely bored ... i work as a mobile application developer in a start up in New york .... what else .... hmmm... there really isnt much actually ...
Why i blogg ?
Well .. first .. iam bored ... second .. i want to see what the fuss is about blogging ..third .. really no third reason