Suppose the device support both gps and glonass(support at the hardware level).
Now when I get location by the android.location API, is it possible to know the hardw
Typically, most devices that support both Glonass and GPS will combine measurements from the two constellations to make a position. You don't get one or the other, you normally get both. The mix of GPS vs Glonass constellations will depend on where you are and what satellites are visible.
As Batuhan shows above, the way to tell which satellites are used is to walk the list of satellites reported, find the satellites used in the fix, and then look at their ID numbers. ID values of 1 to 32 are for GPS satellites, 65 to 88 are Glonass. The one thing to remember is that standard android has a brain-dead header file called gps.h that doesn't understand about other constellations like Glonass, it only likes GPS. There is a simple tweak that many manufacturers do when parsing pulling data from the GPS driver to fix this, but it needs to be done on both the App processor side and inside the GPS driver code. You can't just tweak this stuff on one side without matching changes on the other. Hopefully, your device is one that has this change so you can see satellite ID numbers from all constellations.