Point your phone and read the bearing. Nothing is uploaded — the calculation happens on your device, from coordinates you never have to hand over.
The bearing is the initial heading of the great-circle route from your location to the Kaaba's coordinates (21.4225°N, 39.8262°E), computed with the standard spherical-trigonometry formula on the WGS-84 reference. It is not simply "the direction of Mecca on a flat map" — for most of the world the great-circle bearing points noticeably north of that.