Having a app where i enter the device name and store it in shared preference for future response. In case of mobile ( nexus) this works fine, i am able to store and retrieve the device name when logged in second time. but in case of tablet samsung galaxy the device name is entered every time when app is opened which is not correct. the device has to be entered only for the first time.
Share
Set boolean one variable which have value false in shared Preserence and after storing device name in shared preference set value variable value true.
check every time these variable value is it true or false. and call device name method according.