The traditional method for early diagnosis of diabetes is to detect urine or blood glucose levels. However, the present clinical detection methods cause either cross-infection or require expensive instruments with complex procedures of operation. In this work, a handheld smartphone-based fluorescence microscope with the tunable optofluidic lens and microfluidic assay is demonstrated for the facile detection of glucose concentration for the first time to our knowledge. The tunability of the optofluidic lens is based on the dynamic deformation of an elastomeric membrane driven by adjustable hydraulic pressure. And the glucose sensor integrates a smartphone, a tunable optofluidic lens, a microfluidic chip, a customized holder and some easily accessible optics. A low detection limit of 0.33 mM of glucose was achieved subjected to a linear range of detection from 0 to 6 mM glucose, which is evaluated with an enzymatic fluoresce method. These results show that the cost-effective miniaturized system can be used for early screening and diagnosis of diabetes and potentially some other onsite applications of clinical diagnosis and environment monitoring.