frranck / CCGeolocation

Android + iOS geolocation for cocos2d-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geolocation for cocos2-dx for android and iOS.

ios :

add the corelocation framework, in linked framework.

add a key NSLocationWhenInUseUsageDescription of type String in plist.

android :

add this in your manifest:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

add in your main java activity class:

import org.mumblecore.location.CClocation;

in protected void onCreate(Bundle savedInstanceState) add this call:

CClocation.setContext(getApplicationContext(), this);

in CClocation.java:

replace all MAIN_CLASS occurencies with the name of your class that extends Cocos2dxActivity

About

Android + iOS geolocation for cocos2d-x

License:MIT License


Languages

Language:Java 41.1%Language:C++ 36.2%Language:Objective-C++ 21.1%Language:Objective-C 1.7%