Localytics.integrate

Blocks the Localytics Analytics platform. Based upon SDK docs https://docs.localytics.com/dev/android.html

CollectionFif
GroupUse.Analytics
NameLocalytics.integrate
AuthorFif_
Version1
Updated (UTC)2018-04-21 22:02:29
Created (UTC)2018-04-21 22:02:29
Downloads1457
Class namecom.localytics.android.Localytics
Method nameintegrate
Parameter typesandroid.content.Context
Return typevoid
Min SDK1
Max SDK999
Min APK0
Max APK2147483647
Excluded packages-
EnabledYes
OptionalYes
UsageYes
NotifyNo
Settings-
-- Localytics is a set of Lua hooks designed to work with XPrivacyLua.
-- Copyright (C) 2018 Philippe Troin (Fif_ on XDA)

-- Localytics is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

-- Localytics is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with XPrivacyLua.  If not, see <http://www.gnu.org/licenses/>.

function after(hook, param)
    local ll = luajava.bindClass('com.localytics.android.Localytics')

    if ll.setPrivacyOptedOut ~= nil then
        ll:setPrivacyOptedOut(true)
        return true, "setPrivacyOptedOut enabled"
    end

    if ll.setOptedOut ~= nil then
        ll:setOptedOut(true)
        return true, "setOptedOut enabled"
    end

    log("failed to block Localytics")
    return false
end