public static void setLimitEventAndDataUsage ( Context context , boolean limitEventUsage ) { SharedPreferences preferences = context . getSharedPreferences ( APP_EVENT_PREFERENCES , Context . MODE_PRIVATE ) ; SharedPreferences . Editor editor = preferences . edit ( ) ; editor . putBoolean ( "limitEventUsage" , limitEventUsage ) ; editor . commit ( ) ; }
Sets whether data such as that generated through AppEventsLogger and sent to Facebook should be restricted from being used for purposes other than analytics and conversions such as for targeting ads to this user . Defaults to false . This value is stored on the device and persists across app launches . Changes to this setting will apply to app events currently queued to be flushed .