updated to sense if running on Peanut or Yellowstone device and use the correct API.