def METHOD_NAME(device_id=None, device_name=None, device_token=None,
                      platform=None, version=None, friendly_name=None, onesignal_id=None):
    db = database.MonitorDatabase()
    keys = {'device_id': device_id}
    values = {'device_name': device_name,
              'device_token': device_token,
              'platform': platform,
              'version': version,
              'onesignal_id': onesignal_id}
    if friendly_name:
        values['friendly_name'] = friendly_name
    try:
        result = db.upsert(table_name='mobile_devices', key_dict=keys, value_dict=values)
        blacklist_logger()
    except Exception as e:
        logger.warn("Tautulli MobileApp :: Failed to register mobile device in the database: %s." % e)
        return
    if result == 'insert':
        logger.info("Tautulli MobileApp :: Registered mobile device '%s' in the database." % device_name)
    else:
        logger.info("Tautulli MobileApp :: Re-registered mobile device '%s' in the database." % device_name)
    set_last_seen(device_token=device_token)
    threading.Thread(target=set_official, args=[device_id, onesignal_id]).start()
    return True