Java tutorial
//package com.java2s; import java.lang.reflect.Method; import android.os.ParcelUuid; public class Main { static public int getServiceChannel(Class<?> btClass, ParcelUuid uuid) throws Exception { Method getServiceChannelMethod = btClass.getMethod("getServiceChannel"); Integer returnValue = (Integer) getServiceChannelMethod.invoke(uuid); return returnValue.intValue(); } }