Enabling Accurate Indoor Localization for Different Platforms for Smart Cities Using a Transfer Learning Algorithm