Caution - this site contains the rants and raves of a Michigan photographer and coffee junkie.

Cordova App and localStorage

mobile app image

Continuing on with my hatred of developing a hybrid app . . .

I had tried several login options and was having a difficult time getting any to work.  After trying to get stuff to work about 3 different times I found a good tutorial at  Walking through the example line by line was still giving me some errors.  I figured that $5 was a small price to pay rather than spend hours trying to debug my efforts.  I got the code and . . . it didn’t work.  But that was because of the configuration of my server.  I had to change the mysql calls to the updated mysqli.  But that wasn’t a big deal.

This login system didn’t give me exactly what I needed for the hybrid app I was creating.  But the logic gave me a good idea on where some of my errors were.  So I re-wrote another login system and it was working.

For ease of usage there was some data that was being stored into localStorage on the device.  So the app needed a way to check to see if there was local storage on the device and if not redirect the user to the login page.  This is another issue where I found that localStorage on a mobile phone is a bit different than in a web browser.  The jQuery code that worked cross browser did not work on the phone app.

At this point I scoured the web looking for code examples that worked.  Testing code samples again and again noting appeared to be working.   Also, once again, was worthless giving me lots and lots of worthless non-working code.

There were 3 items the app was setting in localStorage: session id, store number, and user number.  After running through a bunch of tests the final code seemed to simple to be true:

  $(function(checkLocalStorage) {
    if (localStorage.getItem('sessionID')!==null 
        && localStorage.getItem('storeNum')!==null 
        && localStorage.getItem('userNum')!==null) {

This piece of code may not be perfect and needs a little tweaking, but it works.  And it works better than anything that I found searching the Internet.

Combining Column Data in jQuery DataTables


In my continuing saga of building a hybrid mobile app using Cordova, once again I ran into a problem. THE STORY The app I'm developing is for car dealerships.  It was suggested that the dealership inventory display in the app.  Being a web … [Continue reading]

I Hate Mobile Apps

mobile app running on phone

I started a new job and one of the first projects I was given was to create a mobile app.  I'm pretty good at programming websites and figured it wouldn't be a big deal.  Create a mobile friendly website, give customers the link, and all is … [Continue reading]

Do It Yourself Online Marketing

website displayed on different devices

I recently switched jobs. The company I now work for (NewTech Automotive Services) hired me to setup a division to help car dealerships with their online marketing.  For the past fourteen years I've been working at a dealer group as an online … [Continue reading]

Another CMS Change?

It's been one year since the company I work for had to move 2 of their websites to a new Content Management System (CMS).  The one site took a big search engine ranking hit and the other had decent gains.  It has been a lot of work in the past year … [Continue reading]

Playing with Bootstrap

One thing I love about being involved in Internet Marketing is that it changes quickly and there is always something to learn.  And lately I've been learning a lot about Bootstrap. Why Bootstrap?  I can relate to the saying that programmers are … [Continue reading]

Toyota Dealers in Michigan

I thought it was crazy that I was having such a hard time finding a list of all the Toyota Car dealers in Michigan . . . so I created one.  Even trying to get the information from was not easy.   … [Continue reading]

VinSolutions Websites Custom Coupons Using W3.CSS

My last post mentioned how I stumbled upon a solution for creating nice looking coupons for VinSolutions dealer websites.  Following is a DIY tutorial on how to accomplish this for yourself. First Steps The first step is to get the css linked to … [Continue reading]

New Hope for Custom Design on VinSolutions Websites

After several months of attempting to make coupon pages look good on a Michigan Toyota dealership VinSolutions website ( a new and interesting solution has arrived! I'm not exactly sure what search terms were … [Continue reading]

VinSolutions Websites and Bootstrap Pt2

Scrap the information in my previous post ( Why?  After a quarterly review by the Toyota Digital Marketing team I found out some information that make the entire previous attempts to … [Continue reading]