rudderlabs / rudder-sdk-android

Android SDK for RudderStack - the Customer Data Platform for Developers.
https://www.rudderstack.com
Other
18 stars 29 forks source link

feat: sdk 1162 migration of database from v1 to v2 #400

Closed itsdebs closed 4 months ago

itsdebs commented 6 months ago

Fixes # (issue) Migrate data from v1 database version 3 to v2 database

Type of change

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
20 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

1abhishekpandey commented 4 months ago

@itsdebs Please look at the generated payload. Context object is not proper:

{
    "anonymousId": "2238f7e4-1240-4268-97f7-9c8b98df664b",
    "channel": "mobile",
    "context": {
        "app": "{\"name\":\"Rudder-Android-Libs\",\"build\":\"100\",\"namespace\":\"com.rudderstack.android.sampleapp\",\"version\":\"0.1.0\"}",
        "device": "{\"id\":\"61e3b4a4-d139-455d-8d73-29a88acb541e\",\"manufacturer\":\"Google\",\"model\":\"sdk_gphone64_arm64\",\"name\":\"emu64a\",\"type\":\"Android\",\"adTrackingEnabled\":true}",
        "externalId": [
            {
                "fb_id": "1234"
            }
        ],
        "locale": "en-US",
        "os": "{\"name\":\"Android\",\"version\":\"14\"}",
        "screen": "{\"density\":560,\"height\":2808,\"width\":1440}",
        "sessionId": "1713255299",
        "timezone": "Asia/Kolkata",
        "userAgent": "Dalvik/2.1.0 (Linux; U; Android 14; sdk_gphone64_arm64 Build/UE1A.230829.036.A1)"
    },
    "event": "Track 1",
    "integrations": {
        "firebase": false
    },
    "messageId": "a24f2873-05bb-45e4-bc7a-0910d992428d",
    "originalTimestamp": "2024-04-16T08:15:03.469Z",
    "properties": {
        "key1": "prop1",
        "key2": "prop2"
    },
    "rudderId": "da6652cd-de6d-499b-93a3-b52e7a702c49",
    "type": "track"
}
1abhishekpandey commented 4 months ago

@itsdebs Please take a look at this comparison:

image

(v2 payload vs v1 payload) The cellular and wifi values in v2 is stringified whereas in v1 they were boolean. Please consider correcting it.

1abhishekpandey commented 4 months ago

This field needs to be added in v2 payload:

"sentAt": "2024-04-25T07:29:56.720Z"
sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
14 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud