Issue in Updating User's Location manually



I have implemented CleverTap SDK v.3.1.2 to our app. I am facing issue when trying to update user’s location manually.

As per doc I have used ‘setLocation’ api ( Below is the code snippet for the same

CleverTapAPI clevertap = CleverTapAPI.getInstance(mContext);
Location location = clevertap.getLocation();

On Manifest below permission granted
**uses-permission android:name=“android.permission.ACCESS_COARSE_LOCATION” **

I could see latitude and longitude values are passing to cleverTap via Charles when I launch app. but I couldn’t see the updated value on dashboard.

On Dashboard I could see as below.
Chennai, Tamil Nadu, India
Lat - Unknown
Long - Unknown

I would like to know why Lat/Long value is showing as UnKnown though its sending to CleverTap. Please help to identify if the issue is in implementation.


Refactor your code to :

CleverTapAPI clevertap = CleverTapAPI.getInstance(mContext);
Location location = clevertap.getLocation();
clevertap.setLocation(location); //no need for a new instance of clevertap here
Log.d("CIDLoc", String.valueOf(""+location.getLatitude()));
//check whether you are really getting latitude or not

Here are some steps to manually update user location:
If you are using a device with os >=6.0, make sure you have location permissions.Go to settings -> Apps -> Your App -> Permissions -> Location.

Try to fire a user event so that it will update user lat,long.


I also have permission android.permission.ACCESS_COARSE_LOCATION

But all I see is Lat, Long in the profile.
City, State, Country is not shown. It shows Unknown, Unknown.

How can I get City, State, Country. Do I have to manually pass it in User Profile?


Hey @Sirisha_Ch,

Could you please check whether you have enabled Device Network Information Reporting in your integration.

Link :

This enable CleverTap to capture the ip address and populate the Geography location of the user.