Android Uninstall Tracking Setting

๐Ÿ“˜

Firebase Messaging์„ ํ†ตํ•œ ์•ฑ ์‚ญ์ œ ์ถ”์ ์€ Airbridge Android SDK v2.6.0 ์ดํ›„ ๋ฒ„์ „ ๋ถ€ํ„ฐ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

โ—๏ธ

Uninstall Tracking Feature๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Firebase ๋ฐ Firebase Cloud Messaging์„ ํ•„์ˆ˜์ ์œผ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊ฐœ์š”

Airbridge์—์„œ๋Š” ์ตœ๊ทผ 6๊ฐœ์›” ์ด๋‚ด ๋“ฑ๋ก๋œ ๊ธฐ๊ธฐ๋“ค์„ ๋Œ€์ƒ์œผ๋กœ Google์˜ Firebase Messaging Service๋ฅผ ํ†ตํ•ด ์•ฑ์˜ ์„ค์น˜ ์œ ๋ฌด๋ฅผ ํŒ๋‹จํ•ฉ๋‹ˆ๋‹ค.

์•ฑ ์‚ญ์ œ ์ธก์ • ๋ฐ์ดํ„ฐ๋Š” Actuals Report, Raw Data Export ์—ฐ๋™ ๋“ฑ์„ ํ†ตํ•ด ๊ณ ๊ฐ์‚ฌ์— ์ œ๊ณต๋˜์–ด ์ง‘๋‹ˆ๋‹ค.

์„ค์ •

Firebase ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

Firebase Console ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜์—ฌ ์ƒ๋‹จ์˜ ํ™”๋ฉด๊ณผ ๊ฐ™์ด ํ•ด๋‹น ์•ฑ์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

Firebase Cloud Messaging ์„œ๋ฒ„ ํ‚ค ๋“ฑ๋ก

์•ž์„œ ์ƒ์„ฑ๋˜์–ด์ง„ ํ”„๋กœ์ ํŠธ๋กœ ์ด๋™ ํ›„ ์ขŒ์ธก ํŒจ๋„์˜ ํ”„๋กœ์ ํŠธ ์„ค์ • ํŽ˜์ด์ง€๋กœ ์ด๋™ ํ•˜์—ฌ ์ƒ๋‹จ์˜ ํ™”๋ฉด๊ณผ ๊ฐ™์€ ์œ„์น˜์—์„œ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

Firebase Cloud Messaging ์„ค์ •

Firebase Cloud Messaging ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์•ฑ์˜ ๊ธฐ๋ณธ ์„ค์ •์„ ์™„๋ฃŒํ•ด ์ฃผ์„ธ์š”.

Firebase Push Token ์ „์†ก

AndroidManifest.xml ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”

<service
    android:name="${packageName}.MyFirebaseMessagingService"
    android:exported="false">
    <intent-filter>
    	<action android:name="com.google.firebase.MESSAGING_EVENT" />
    </intent-filter>
</service>

Firebase Cloud Messaging ์„ค์ •์„ ํ†ตํ•ด ์ƒ์„ฑ๋˜์–ด์ง€๋Š” Push Token์„ Airbridge SDK๋ฅผ ํ†ตํ•ด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ „๋‹ฌํ•ด ์ฃผ์„ธ์š”.

public class MyFirebaseMessagingService extends FirebaseMessagingService {

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
        super.onMessageReceived(remoteMessage);
    }

    @Override
    public void onNewToken(String token) {
        super.onNewToken(token);
        Airbridge.registerPushToken(token);
    }
}
class MyFirebaseMessagingService : FirebaseMessagingService() {

    override fun onMessageReceived(remoteMessage: RemoteMessage) {
        super.onMessageReceived(remoteMessage)
    }

    override fun onNewToken(token: String) {
        super.onNewToken(token)
        Airbridge.registerPushToken(token)
    }
}

๊ธฐ์กด์— ์ด๋ฏธ Firebase Cloud Messaging Service๋ฅผ ํ†ตํ•ด Push Token์ด ๋ฐœ๊ธ‰๋˜์—ˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ์„ค์ •์„ ํ•จ๊ป˜ ์ถ”๊ฐ€ํ•˜์—ฌ ๊ธฐ์กด์— ์ƒ์„ฑ๋œ Push Token๋„ ์ „๋‹ฌํ•ด ์ฃผ์„ธ์š”.

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        FirebaseMessaging.getInstance()
            .getToken()
            .addOnSuccessListener(new OnSuccessListener<String>() {
                @Override
                public void onSuccess(String token) {
                    Airbridge.registerPushToken(token);
                }
            });
    }
}
class MyApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        ...
        FirebaseMessaging.getInstance()
            .token
            .addOnSuccessListener {
                Airbridge.registerPushToken(it)
            }
        ...
    }
}

โ—๏ธ

๋ฐ˜๋“œ์‹œ ํ•ด๋‹น ํ•จ์ˆ˜๊ฐ€ Airbridge SDK์˜ ์ดˆ๊ธฐํ™” ์ž‘์—… ์ดํ›„์— ํ˜ธ์ถœ ๋  ์ˆ˜ ์žˆ๋„๋ก ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.

์•ฑ ์‚ญ์ œ ์•Œ๋ฆผ์ด ๋ณ„๋„์˜ ๋ฐ์ดํ„ฐ ์—†์ด ์‚ฌ์ผ๋ŸฐํŠธ(Slient) ์•Œ๋ฆผ์œผ๋กœ ์ „์†ก ๋˜์ง€๋งŒ Firebase Messaging Service์˜ onMessageReceived ๊ตฌํ˜„์— ๋”ฐ๋ผ ํ•ด๋‹น ์•Œ๋ฆผ์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ๋…ธ์ถœ ๋  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฒ˜๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์•ฑ ์‚ญ์ œ ์•Œ๋ฆผ์ธ ๊ฒฝ์šฐ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋…ธ์ถœ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋„๋ก ์˜ˆ์™ธ ์ฒ˜๋ฆฌํ•ด ์ฃผ์„ธ์š”.

public class MyFirebaseMessagingService extends FirebaseMessagingService {

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
        super.onMessageReceived(remoteMessage);
        if (remoteMessage.getData().containsKey("airbridge-uninstall-tracking")) {
            return;
        } else {
            // handleNotification(remoteMessage);
        }
    }

    @Override
    public void onNewToken(String token) {
        super.onNewToken(token);
        Airbridge.registerPushToken(token);
    }
}
class MyFirebaseMessagingService : FirebaseMessagingService() {

    override fun onMessageReceived(remoteMessage: RemoteMessage) {
        super.onMessageReceived(remoteMessage)
        if (remoteMessage.data.containsKey("airbridge-uninstall-tracking")) {
            return
        } else {
        		// handleNotification(remoteMessage) 
        }
    }

    override fun onNewToken(token: String) {
        super.onNewToken(token)
        Airbridge.registerPushToken(token)
    }
}

Troubleshooting


๋ชจํ”ผ์–ด์Šค Push SDK Troubleshooting

๋ชจํ”ผ์–ด์Šค Push SDK Troubleshooting guide: ๋งํฌ