List of usage examples for android.bluetooth BluetoothGattService getInstanceId
public int getInstanceId()
If a remote device offers multiple services with the same UUID (ex.
From source file:com.cypress.cysmart.CommonFragments.CarouselFragment.java
/** * Fragment new Instance creation with arguments * * @param pos/*from w w w .j a v a2 s . c om*/ * @param scale * @param name * @param uuid * @param service * @return CarouselFragment */ public static Fragment newInstance(int pos, float scale, String name, String uuid, BluetoothGattService service) { CarouselFragment fragment = new CarouselFragment(); if (service.getInstanceId() > 0) { uuid = uuid + service.getInstanceId(); } bleHashMap.put(uuid, service); Bundle b = new Bundle(); b.putInt(EXTRA_FRAG_POS, pos); b.putFloat(EXTRA_FRAG_SCALE, scale); b.putString(EXTRA_FRAG_NAME, name); b.putString(EXTRA_FRAG_UUID, uuid); fragment.setArguments(b); return fragment; }