mirror of https://github.com/axmolengine/axmol.git
Update the flurry SDK version.
This commit is contained in:
parent
f26530748a
commit
5b43951e8c
|
@ -1 +1 @@
|
|||
b1b3d66b623e17b0419f2c24e07da7caeaedc2c3
|
||||
0fd2439e2bfeee847ea873ee45b6177b5208db97
|
|
@ -31,6 +31,7 @@ import org.json.JSONObject;
|
|||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.flurry.android.Constants;
|
||||
import com.flurry.android.FlurryAgent;
|
||||
|
||||
public class AnalyticsFlurry implements InterfaceAnalytics {
|
||||
|
@ -119,15 +120,7 @@ public class AnalyticsFlurry implements InterfaceAnalytics {
|
|||
|
||||
@Override
|
||||
public String getSDKVersion() {
|
||||
LogD("getSDKVersion invoked!");
|
||||
String ret = "";
|
||||
try {
|
||||
int nRet = FlurryAgent.getAgentVersion();
|
||||
ret = "Flurry android ver " + nRet;
|
||||
} catch(Exception e){
|
||||
LogE("Exception in getSDKVersion", e);
|
||||
}
|
||||
return ret;
|
||||
return "3.2.0";
|
||||
}
|
||||
|
||||
protected void logTimedEventBeginWithParams(JSONObject eventInfo) {
|
||||
|
@ -191,10 +184,16 @@ public class AnalyticsFlurry implements InterfaceAnalytics {
|
|||
}
|
||||
}
|
||||
|
||||
protected void setGender(byte gender) {
|
||||
protected void setGender(int gender) {
|
||||
LogD("setGender invoked!");
|
||||
try {
|
||||
FlurryAgent.setGender(gender);
|
||||
byte bGender;
|
||||
if (1 == gender) {
|
||||
bGender = Constants.MALE;
|
||||
} else {
|
||||
bGender = Constants.FEMALE;
|
||||
}
|
||||
FlurryAgent.setGender(bGender);
|
||||
} catch(Exception e){
|
||||
LogE("Exception in setGender", e);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ THE SOFTWARE.
|
|||
interfaces of flurry SDK
|
||||
*/
|
||||
- (void) setAge: (NSNumber*) age;
|
||||
- (void) setGender: (NSString*) gender;
|
||||
- (void) setGender: (NSNumber*) gender;
|
||||
- (void) setUserId: (NSString*) userId;
|
||||
- (void) setUseHttps: (NSNumber*) enabled;
|
||||
- (void) logPageView;
|
||||
|
|
|
@ -97,7 +97,7 @@ THE SOFTWARE.
|
|||
|
||||
- (NSString*) getSDKVersion
|
||||
{
|
||||
return [Flurry getFlurryAgentVersion];
|
||||
return @"4.2.1";
|
||||
}
|
||||
|
||||
- (NSString*) getPluginVersion
|
||||
|
@ -112,10 +112,17 @@ THE SOFTWARE.
|
|||
[Flurry setAge:nAge];
|
||||
}
|
||||
|
||||
- (void) setGender: (NSString*) gender
|
||||
- (void) setGender: (NSNumber*) gender
|
||||
{
|
||||
OUTPUT_LOG(@"Flurry setGender invoked (%@)", gender);
|
||||
[Flurry setGender:gender];
|
||||
int nValue = [gender intValue];
|
||||
NSString* strGender;
|
||||
if (nValue == 1) {
|
||||
strGender = @"m";
|
||||
} else {
|
||||
strGender = @"f";
|
||||
}
|
||||
[Flurry setGender:strGender];
|
||||
}
|
||||
|
||||
- (void) setUserId: (NSString*) userId
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* attract high-quality users and monetize your user base see <a href="http://support.flurry.com/index.php?title=Publishers">Support Center - Publishers</a>.
|
||||
*
|
||||
* @author 2009 - 2012 Flurry, Inc. All Rights Reserved.
|
||||
* @version 4.0.0
|
||||
* @version 4.2.0
|
||||
*
|
||||
*/
|
||||
@interface Flurry : NSObject {
|
||||
|
@ -124,6 +124,19 @@
|
|||
*/
|
||||
+ (void)setSecureTransportEnabled:(BOOL)value;
|
||||
|
||||
/*!
|
||||
* @brief Enable automatic collection of crash reports.
|
||||
* @since 4.1
|
||||
*
|
||||
* This is an optional method that collects crash reports when enabled. The
|
||||
* default value is @c NO.
|
||||
*
|
||||
* @note This method must be called prior to invoking #startSession:.
|
||||
*
|
||||
* @param value @c YES to enable collection of crash reports.
|
||||
*/
|
||||
+ (void)setCrashReportingEnabled:(BOOL)value;
|
||||
|
||||
//@}
|
||||
|
||||
/*!
|
||||
|
@ -135,6 +148,9 @@
|
|||
* for the period the app is in the foreground until your app is backgrounded for the
|
||||
* time specified in #setSessionContinueSeconds:. If the app is resumed in that period
|
||||
* the session will continue, otherwise a new session will begin.
|
||||
*
|
||||
* Crash reporting will not be enabled. See #startSession:enableCrashReporting: for
|
||||
* more information.
|
||||
*
|
||||
* @note If testing on a simulator, please be sure to send App to background via home
|
||||
* button. Flurry depends on the iOS lifecycle to be complete for full reporting.
|
||||
|
@ -155,6 +171,39 @@
|
|||
|
||||
+ (void)startSession:(NSString *)apiKey;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Start a Flurry session for the project denoted by @c apiKey.
|
||||
* @since 4.0.8
|
||||
*
|
||||
* This method serves as the entry point to Flurry Analytics collection. It must be
|
||||
* called in the scope of @c applicationDidFinishLaunching passing in the launchOptions param.
|
||||
* The session will continue
|
||||
* for the period the app is in the foreground until your app is backgrounded for the
|
||||
* time specified in #setSessionContinueSeconds:. If the app is resumed in that period
|
||||
* the session will continue, otherwise a new session will begin.
|
||||
*
|
||||
* @note If testing on a simulator, please be sure to send App to background via home
|
||||
* button. Flurry depends on the iOS lifecycle to be complete for full reporting.
|
||||
*
|
||||
* @see #setSessionContinueSeconds: for details on setting a custom session timeout.
|
||||
*
|
||||
* @code
|
||||
* - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
// Optional Flurry startup methods
|
||||
[Flurry startSession:@"YOUR_API_KEY" withOptions:launchOptions];
|
||||
// ....
|
||||
}
|
||||
* @endcode
|
||||
*
|
||||
* @param apiKey The API key for this project.
|
||||
* @param options passed launchOptions from the applicatin's didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
|
||||
*/
|
||||
+ (void) startSession:(NSString *)apiKey withOptions:(id)options;
|
||||
|
||||
|
||||
/** @name Event and Error Logging
|
||||
* Methods for reporting custom events and errors during the session.
|
||||
*/
|
||||
|
@ -547,12 +596,18 @@
|
|||
* @code
|
||||
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
|
||||
[locationManager startUpdatingLocation];
|
||||
|
||||
* @endcode
|
||||
*
|
||||
* After starting the location manager, you can set the location with Flurry. You can implement
|
||||
* CLLocationManagerDelegate to be aware of when the location is updated. Below is an example
|
||||
* of how to use this method, after you have recieved a location update from the locationManager.
|
||||
*
|
||||
* @code
|
||||
CLLocation *location = locationManager.location;
|
||||
[Flurry setLatitude:location.coordinate.latitude
|
||||
longitude:location.coordinate.longitude
|
||||
horizontalAccuracy:location.horizontalAccuracy
|
||||
verticalAccuracy:location.verticalAccuracy];
|
||||
[Flurry setLatitude:location.coordinate.latitude
|
||||
longitude:location.coordinate.longitude
|
||||
horizontalAccuracy:location.horizontalAccuracy
|
||||
verticalAccuracy:location.verticalAccuracy];
|
||||
* @endcode
|
||||
* @param latitude The latitude.
|
||||
* @param longitude The longitude.
|
||||
|
@ -588,7 +643,7 @@
|
|||
* @brief Set session to report when app is sent to the background.
|
||||
* @since 2.7
|
||||
*
|
||||
* Use this method report session data when the app is paused. The default value is @c NO.
|
||||
* Use this method report session data when the app is paused. The default value is @c YES.
|
||||
*
|
||||
* @param setSessionReportsOnPauseEnabled YES to send on pause, NO to omit reporting on pause.
|
||||
*
|
||||
|
@ -604,7 +659,18 @@
|
|||
* @param value YES to enable event logging, NO to stop custom logging.
|
||||
*
|
||||
*/
|
||||
+ (void)setEventLoggingEnabled:(BOOL)value;
|
||||
+ (void)setEventLoggingEnabled:(BOOL)value;
|
||||
|
||||
/*!
|
||||
* @brief Set device push token.
|
||||
* @since 2.7
|
||||
*
|
||||
* After the device has successfully registered with APNS, call this method to set the push token received from APNS.
|
||||
*
|
||||
*
|
||||
*/
|
||||
+ (void)setPushToken:(NSString *)pushToken;
|
||||
|
||||
|
||||
//@}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
ec28ecfb3c84a48adf091f84229fdf90b049072d
|
||||
9bd56193e2377b31e9254506f3ed39b4c185b4e9
|
|
@ -29,7 +29,7 @@ echo
|
|||
echo
|
||||
echo Now publish protocols
|
||||
echo ---------------------------------
|
||||
./toolsForPublish/publishPlugin.sh "protocols" ${TARGET_ROOT} ${PLUGIN_ROOT} 1
|
||||
./toolsForPublish/publishPlugin.sh "protocols" ${TARGET_ROOT} ${PLUGIN_ROOT}
|
||||
echo ---------------------------------
|
||||
|
||||
#publish plugins
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Modify mk file
|
||||
MK_FILE_PATH=$1
|
||||
TEMP_FILE_PATH=$(dirname ${MK_FILE_PATH})/temp.txt
|
||||
SELECTED_PLUGINS=(${NEED_PUBLISH//:/ })
|
||||
|
||||
###############################
|
||||
# functions used
|
||||
|
@ -23,28 +24,34 @@ getStaticModuleName()
|
|||
if [ -f ${MK_FILE_PATH} ]; then
|
||||
ADD_MODULE_STR=""
|
||||
ADD_IMPORT_STR=""
|
||||
for plugin_name in ${SELECTED_PLUGINS[@]}
|
||||
do
|
||||
PLUGIN_MK_FILE=${TARGET_ROOT}/${plugin_name}/android/Android.mk
|
||||
if [ ! -f "${PLUGIN_MK_FILE}" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
plugin_name="protocols"
|
||||
PLUGIN_MODULE_NAME="$(getStaticModuleName ${plugin_name})"
|
||||
HAVE_PLUGIN=`grep "^\([\s]*[^#]*\)${PLUGIN_MODULE_NAME}" ${MK_FILE_PATH}`
|
||||
if [ "${HAVE_PLUGIN}" ]; then
|
||||
# already have this plugin
|
||||
echo "Plugin ${plugin_name} have added in Android.mk"
|
||||
continue
|
||||
else
|
||||
if [ -z "${ADD_MODULE_STR}" ]; then
|
||||
ADD_MODULE_STR=${PLUGIN_MODULE_NAME}
|
||||
PLUGIN_MODULE_NAME="$(getStaticModuleName ${plugin_name})"
|
||||
HAVE_PLUGIN=`grep "^\([\s]*[^#]*\)${PLUGIN_MODULE_NAME}" ${MK_FILE_PATH}`
|
||||
if [ "${HAVE_PLUGIN}" ]; then
|
||||
# already have this plugin
|
||||
echo "Plugin ${plugin_name} have added in Android.mk"
|
||||
continue
|
||||
else
|
||||
ADD_MODULE_STR="${ADD_MODULE_STR} ${PLUGIN_MODULE_NAME}"
|
||||
if [ -z "${ADD_MODULE_STR}" ]; then
|
||||
ADD_MODULE_STR=${PLUGIN_MODULE_NAME}
|
||||
else
|
||||
ADD_MODULE_STR="${ADD_MODULE_STR} ${PLUGIN_MODULE_NAME}"
|
||||
fi
|
||||
|
||||
NEW_LINE="\$(call import-module,${plugin_name}/android)"
|
||||
if [ -z "${ADD_IMPORT_STR}" ]; then
|
||||
ADD_IMPORT_STR=${NEW_LINE}
|
||||
else
|
||||
ADD_IMPORT_STR="${ADD_IMPORT_STR}:${NEW_LINE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
NEW_LINE="\$(call import-module,${plugin_name}/android)"
|
||||
if [ -z "${ADD_IMPORT_STR}" ]; then
|
||||
ADD_IMPORT_STR=${NEW_LINE}
|
||||
else
|
||||
ADD_IMPORT_STR="${ADD_IMPORT_STR}:${NEW_LINE}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Modify the mk file if necessary
|
||||
if [ "${ADD_MODULE_STR}" ]; then
|
||||
|
@ -109,3 +116,4 @@ else
|
|||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -101,8 +101,8 @@ if [ -d "${ANDROID_PROJ_DIR}/ForAssets" ]; then
|
|||
fi
|
||||
|
||||
#Build C++ code
|
||||
BUILD_CPLUSPLUS=$4
|
||||
if [ $BUILD_CPLUSPLUS ]; then
|
||||
BUILD_NATIVE_SCRIPT=${ANDROID_PROJ_DIR}/build_native.sh
|
||||
if [ -f $BUILD_NATIVE_SCRIPT ]; then
|
||||
|
||||
echo "Build C++ code"
|
||||
|
||||
|
@ -120,11 +120,9 @@ if [ $BUILD_CPLUSPLUS ]; then
|
|||
fi
|
||||
|
||||
#invoke ndk build for plugin project
|
||||
if [ -f "${ANDROID_PROJ_DIR}/build_native.sh" ]; then
|
||||
./build_native.sh
|
||||
LIB_FILE="$(getLibraryFileName)"
|
||||
cp -rf "${ANDROID_PROJ_DIR}/obj/local/armeabi/${LIB_FILE}" "${TARGET_DIR}/android"
|
||||
fi
|
||||
./build_native.sh
|
||||
LIB_FILE="$(getLibraryFileName)"
|
||||
cp -rf "${ANDROID_PROJ_DIR}/obj/local/armeabi/${LIB_FILE}" "${TARGET_DIR}/android"
|
||||
|
||||
#generate mk file for prebuild
|
||||
${PLUGIN_ROOT}/tools/toolsForPublish/genPrebuildMK.sh ${ANDROID_PROJ_DIR}/jni/Android.mk ${TARGET_DIR}/android/Android.mk
|
||||
|
|
Loading…
Reference in New Issue