diff --git a/CHANGELOG.md b/CHANGELOG.md index f6a89d67abb03e41741d5d2733bbb17b722170fb..b64d5a9b75b19b5ded90496ee0a633581b28bacf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,62 +2,4 @@ * optimization: Optimize code ## 0.0.1-SNAPSHOT -* refactor: For module library Android-to-OpenHarmony - -## v4.1.2 - -Reduced impact -* Reduced impact on app performance (Thanks @Tolriq) - -## v4.1.1 - -* Fixed disk caching loosing events, see #271 - -## v4.1.0 - -Improved edge-case behavior -* Align user-id / visitor-id behavior with other SDKs. (#256) -* Fix UncaughtExceptionHandler loosing events on crash (#252) - -## v4.0.2 - -Bugfix -* Fixes #243 which lead to price not being tracked for larger prices - -## v4.0.1 - -Improved debugging -* Better log tags - -## v4.0.0 - -Piwik -> Matomo -* Major refactoring from Piwik to Matomo (#191), see here for migration hints -* Additional debugging information (#228) -* A Tracker callback to allow extensions that modify the tracked data shortly before sending, e.g. for custom dimensions (#224) -* Removed any pattern enforcing on the application domain (#217) - -## v3.0.4 - -Bugfixes -* Fixes a potential connection leak (#226) - -## v3.0.3 - -Bugfixes -* The Android SDK did not second the necessary information to allow for server-side stitching when changing the user-id within a sesion (#209) -* Fixed a bug causing the session to not time out due to start-time being updated too often (#210) -* Updated used android supportlibs -* Switched the demo app to https and matomo.org - -## v3.0.2 - -* Fixed issue with transitive dependencies on Timber and SupportAnnotations leaking through (#204, #184, #207) -* Updated buildtools / gradle - -## v3.0.1 - -Bugfix release -* Fixed: If the server returns a non-OK (non 2XX status code), the response can contain an error stream. This error stream can leak an open socket if not consumed (or at least explicitly closed). See #199. -* Fixed: When using GZIP & POST the OutputStream could leak resources if it is not explicitly closed. -* Improved: Failure to close an output stream AFTER data transmission (without exception) is now no longer failing the send(Packet) call. +* refactor: For module library to openharmony \ No newline at end of file diff --git a/README.OPENSOURCE b/README.OPENSOURCE new file mode 100644 index 0000000000000000000000000000000000000000..9f320cfbdd4429c2b9cfa35751f291c8893ffbaa --- /dev/null +++ b/README.OPENSOURCE @@ -0,0 +1,10 @@ +[ + { + "Name": " matomo-sdk-ohos ", + "License": " Apache License ", + "License File": " LICENSE ", + "Version Number": " 4.1.2 ", + "Upstream URL": " https://github.com/matomo-org/matomo-sdk-android ", + "Description": " 打点数据上报 " + } +] diff --git a/README.md b/README.md index 73e15fc1f602e64ccde3d3e7da2ff6499c37610c..13a2cdeacf75e674e67b29efa7158dbb9d8ecfb0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # matomo-sdk-ohos -本项目是基于开源项目matomo-sdk-android进行openharmony的移植和开发的,可以通过项目地址()追踪到原项目版本 ## 项目介绍 项目名称:打点数据上报 @@ -8,7 +7,7 @@ 功能:可以解析每个按钮的点击事件所上报的数据 -基线版本:matomo-sdk-ohos组件 Release版本号 v4.1.2 +基线版本: Release v4.1.2 项目移植状态:有差异 @@ -16,20 +15,12 @@ 开发版本:sdk5,DevEco Studio2.1 beta4 -项目作者和维护人:赵旭东 - -联系方式:zhaoxudong073@chinasoftinc.com - -原项目Doc地址: - -编程语言:Java - 外部库依赖:matomo-sdk-ohos项目中的tracker库 ## 效果展示 - + ## 安装教程 1、在项目根目录下的build.gradle文件中 @@ -83,10 +74,42 @@ CloudTest代码测试无异常 当前版本demo功能与原组件基本无差异 -测试员:郑冲 ## 版本迭代 - 0.0.2-SNAPSHOT ## 版权和许可信息 -Android SDK for Matomo is released under the BSD-3 Clause license, see LICENSE. + +``` +Copyright 2018 Matomo team + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name of Matomo team nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` \ No newline at end of file diff --git a/build.gradle b/build.gradle index ff7362f67029f35dec778c6749a2269326af9339..6d84aa70c88e0c7efda1fd4564268fe1d713ab0e 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.huawei.ohos:hap:2.4.2.5' + classpath 'com.huawei.ohos:hap:2.4.2.7' classpath 'com.huawei.ohos:decctest:1.0.0.6' } } diff --git a/entry/build.gradle b/exampleapp/build.gradle similarity index 100% rename from entry/build.gradle rename to exampleapp/build.gradle diff --git a/entry/src/main/config.json b/exampleapp/src/main/config.json similarity index 98% rename from entry/src/main/config.json rename to exampleapp/src/main/config.json index 9fe90e53ffa85c6966942cef952a14a03421622a..cad892c1a8a8a0014e9af3d59dbc63e3a7380840 100644 --- a/entry/src/main/config.json +++ b/exampleapp/src/main/config.json @@ -71,7 +71,7 @@ }, "distro": { "deliveryWithInstall": true, - "moduleName": "entry", + "moduleName": "exampleapp", "moduleType": "entry" }, "abilities": [ diff --git a/entry/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java b/exampleapp/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java similarity index 97% rename from entry/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java rename to exampleapp/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java index d7fa4dd7548c6adee409176aa0bf7bf4de91ce75..ae34189cf3f8598d2fd49ee6de8cdf8026e978a6 100644 --- a/entry/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/DemoAbilitySlice.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package com.org.matomo.demo; @@ -74,7 +72,7 @@ public class DemoAbilitySlice extends AbilitySlice { refreshLayout.setVisibility(Component.HIDE); refreshLayout.setClickedListener(component -> { Intent secondIntent = new Intent(); -// 指定待启动FA的bundleName和abilityName + //指定待启动FA的bundleName和abilityName Operation operation = new Intent.OperationBuilder() .withDeviceId("") .withBundleName("com.org.matomo.demo") @@ -108,12 +106,10 @@ public class DemoAbilitySlice extends AbilitySlice { @Override public void onStop(Animator animator) { - } @Override public void onCancel(Animator animator) { - } @Override @@ -122,18 +118,15 @@ public class DemoAbilitySlice extends AbilitySlice { @Override public void onPause(Animator animator) { - } @Override public void onResume(Animator animator) { - } }); animatorValue.setValueUpdateListener(new AnimatorValue.ValueUpdateListener() { @Override public void onUpdate(AnimatorValue animatorValue, float v) { - } }); diff --git a/entry/src/main/java/com/org/matomo/demo/MainAbility.java b/exampleapp/src/main/java/com/org/matomo/demo/MainAbility.java similarity index 85% rename from entry/src/main/java/com/org/matomo/demo/MainAbility.java rename to exampleapp/src/main/java/com/org/matomo/demo/MainAbility.java index 11def0216dc757989b2fee76eb6f630c27319c27..9817bd0e21b46f47ef072ffb84386acb91345b49 100644 --- a/entry/src/main/java/com/org/matomo/demo/MainAbility.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/MainAbility.java @@ -1,6 +1,5 @@ package com.org.matomo.demo; -import com.org.matomo.demo.slice.MainAbilitySlice; import ohos.aafwk.ability.Ability; import ohos.aafwk.content.Intent; diff --git a/entry/src/main/java/com/org/matomo/demo/slice/MainAbilitySlice.java b/exampleapp/src/main/java/com/org/matomo/demo/MainAbilitySlice.java similarity index 93% rename from entry/src/main/java/com/org/matomo/demo/slice/MainAbilitySlice.java rename to exampleapp/src/main/java/com/org/matomo/demo/MainAbilitySlice.java index 5bcd6b0b6c4cf94eb19eef87818d5b3d77618529..924f9e0384a0b2f228623fd13480edf9098937cf 100644 --- a/entry/src/main/java/com/org/matomo/demo/slice/MainAbilitySlice.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/MainAbilitySlice.java @@ -1,4 +1,4 @@ -package com.org.matomo.demo.slice; +package com.org.matomo.demo; import com.org.matomo.demo.ResourceTable; import ohos.aafwk.ability.AbilitySlice; diff --git a/entry/src/main/java/com/org/matomo/demo/MyApplication.java b/exampleapp/src/main/java/com/org/matomo/demo/MyApplication.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/MyApplication.java rename to exampleapp/src/main/java/com/org/matomo/demo/MyApplication.java index 33b3ce4389da454d1390dc9777719bf0ee873069..a5e03f230c762b20872797860a77fd741aab2fb0 100644 --- a/entry/src/main/java/com/org/matomo/demo/MyApplication.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/MyApplication.java @@ -74,7 +74,6 @@ public class MyApplication extends MatomoApplication { // i.e. "http://org.matomo.demo:1/185DECB5CFE28FDB2F45887022D668B4" TrackHelper.track().download().identifier(new DownloadTracker.Extra.ApkChecksum(this)).with(getTracker()); // Alternative: - // i.e. "http://org.matomo.demo:1/com.android.vending" // getTracker().download(); DimensionQueue mDimensionQueue = new DimensionQueue(getTracker()); diff --git a/entry/src/main/java/com/org/matomo/demo/PixelMapUtil.java b/exampleapp/src/main/java/com/org/matomo/demo/PixelMapUtil.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/PixelMapUtil.java rename to exampleapp/src/main/java/com/org/matomo/demo/PixelMapUtil.java index 148319d4ebfea3cc27f2fcad5cbba368eba938fe..03e165348938164580033911aeaaea5996ce0aad 100644 --- a/entry/src/main/java/com/org/matomo/demo/PixelMapUtil.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/PixelMapUtil.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/SettingAblilty.java b/exampleapp/src/main/java/com/org/matomo/demo/SettingAblilty.java similarity index 84% rename from entry/src/main/java/com/org/matomo/demo/SettingAblilty.java rename to exampleapp/src/main/java/com/org/matomo/demo/SettingAblilty.java index 78d515f7f97fee73255971180b206954d883fc1f..fe15e99165a1c0b7eb099eced67120abb7b0a5cf 100644 --- a/entry/src/main/java/com/org/matomo/demo/SettingAblilty.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/SettingAblilty.java @@ -1,6 +1,5 @@ package com.org.matomo.demo; -import com.org.matomo.demo.slice.SettingAbliltySlice; import ohos.aafwk.ability.Ability; import ohos.aafwk.content.Intent; diff --git a/entry/src/main/java/com/org/matomo/demo/slice/SettingAbliltySlice.java b/exampleapp/src/main/java/com/org/matomo/demo/SettingAbliltySlice.java similarity index 99% rename from entry/src/main/java/com/org/matomo/demo/slice/SettingAbliltySlice.java rename to exampleapp/src/main/java/com/org/matomo/demo/SettingAbliltySlice.java index fe471a4c385eaf4b3a629a6557d1857130113fff..1994e20f187762f981c29f6d2980dd3e26f995f1 100644 --- a/entry/src/main/java/com/org/matomo/demo/slice/SettingAbliltySlice.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/SettingAbliltySlice.java @@ -1,4 +1,4 @@ -package com.org.matomo.demo.slice; +package com.org.matomo.demo; import com.org.matomo.demo.MyApplication; import com.org.matomo.demo.PixelMapUtil; diff --git a/entry/src/main/java/com/org/matomo/demo/button/RTextView.java b/exampleapp/src/main/java/com/org/matomo/demo/button/RTextView.java similarity index 97% rename from entry/src/main/java/com/org/matomo/demo/button/RTextView.java rename to exampleapp/src/main/java/com/org/matomo/demo/button/RTextView.java index 0317400be98a624816e668caa3a363e16733e58c..dee6dfd3f44e222b4b4dfb5b4250f32cb6c41504 100644 --- a/entry/src/main/java/com/org/matomo/demo/button/RTextView.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/button/RTextView.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java index 9207071ccf81876b62c4819d4fc1fc757b5a62d8..b9864bda75f4639823b0f18ce756a4b33aa25403 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/AttrUtils.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java index 04c1a52aa7d4dd80376d3465d82f669879b3d5e2..e54d6e0af792531bf2c58d3c638c6041bdda98f7 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipHelper.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java similarity index 96% rename from entry/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java index c3a57c56560f59a9740094c3fd3c830b4d444cd5..41d78ea4184ac8b920b25e19b35e69385af50b02 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ClipPathManager.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java similarity index 97% rename from entry/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java index 5da997a9219a910c505377e527179f2f0b44b2ab..f65314eeb1a3f608bc23266acbfbe35a44578ecc 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/DensityUtils.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java similarity index 99% rename from entry/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java index 5c368ccac32a2ac0eab462309efad2a3a50a1a48..393ce2e68bbc4e906ed6e7c56731241f969dfe01 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/DrawableUtils.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/IClip.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/IClip.java similarity index 93% rename from entry/src/main/java/com/org/matomo/demo/chechbox/IClip.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/IClip.java index f0050303a4cfe696b415a721cb5496b478d581de..f07945db3ec7a8d449fca15470858fb0a4bf0c7e 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/IClip.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/IClip.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java similarity index 94% rename from entry/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java index 9542f56b4d73bc1bb0e1e433b3f13a6e15bc4c24..9e1988486315175e5bcc7d101b718b4287df427c 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ITextViewFeature.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java similarity index 99% rename from entry/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java index 9ae998997af06fd595360e7216443711c0758959..841782a78a8a80191daf28b68e3a9eb1d9f744f9 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RBaseHelper.java @@ -1,11 +1,12 @@ package com.org.matomo.demo.chechbox; -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java similarity index 97% rename from entry/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java index ef14414e8ed818b487549e15006804ea1b43655b..3dc82d5e451bd33552e40039b35015114589f7a1 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckBox.java @@ -5,7 +5,7 @@ package com.org.matomo.demo.chechbox; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java similarity index 99% rename from entry/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java index 7f780f212d5b514e64605529f0e271c47c3ee28d..b1a5b7ca95752ff998d482b55694e7b1f2dded9e 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RCheckHelper.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/RHelper.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RHelper.java similarity index 93% rename from entry/src/main/java/com/org/matomo/demo/chechbox/RHelper.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/RHelper.java index 5527ac51d28d59ef6b886cc78ae187b02ae7c250..32e101efff9a626bcfb15e0abe6628b1c5046934 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/RHelper.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RHelper.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/RTextViewHelper.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/RTextViewHelper.java similarity index 100% rename from entry/src/main/java/com/org/matomo/demo/chechbox/RTextViewHelper.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/RTextViewHelper.java diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java index 566418e134b93efeb95f368c02bddaf71aed3884..9523d76b5863ef5453f286ce11b826b403aae0dc 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/ShadowDrawable.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java index 02749a48cd5aae37ff9de65ff72f0f8fb1d96638..d1ef63fb266e78c95a9f9bdbbfc5adf3580d7fb3 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/TextViewUtils.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java similarity index 98% rename from entry/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java rename to exampleapp/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java index 77a822b797f4cbadbaa2a901fa2723367eb52b7e..2d9e62a489dda85c425d6b31a59264143a454f94 100644 --- a/entry/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/chechbox/TypedAttrUtils.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/java/com/org/matomo/demo/util/StrUtil.java b/exampleapp/src/main/java/com/org/matomo/demo/util/StrUtil.java similarity index 93% rename from entry/src/main/java/com/org/matomo/demo/util/StrUtil.java rename to exampleapp/src/main/java/com/org/matomo/demo/util/StrUtil.java index 0e1a51b983975395f46e930032d108869bbe1065..7499bc94b40efa81f5dde21f120a9b765dbae047 100644 --- a/entry/src/main/java/com/org/matomo/demo/util/StrUtil.java +++ b/exampleapp/src/main/java/com/org/matomo/demo/util/StrUtil.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/entry/src/main/resources/base/element/color.json b/exampleapp/src/main/resources/base/element/color.json similarity index 100% rename from entry/src/main/resources/base/element/color.json rename to exampleapp/src/main/resources/base/element/color.json diff --git a/entry/src/main/resources/base/element/float.json b/exampleapp/src/main/resources/base/element/float.json similarity index 100% rename from entry/src/main/resources/base/element/float.json rename to exampleapp/src/main/resources/base/element/float.json diff --git a/entry/src/main/resources/base/element/string.json b/exampleapp/src/main/resources/base/element/string.json similarity index 100% rename from entry/src/main/resources/base/element/string.json rename to exampleapp/src/main/resources/base/element/string.json diff --git a/entry/src/main/resources/base/graphic/background_ability_main.xml b/exampleapp/src/main/resources/base/graphic/background_ability_main.xml similarity index 100% rename from entry/src/main/resources/base/graphic/background_ability_main.xml rename to exampleapp/src/main/resources/base/graphic/background_ability_main.xml diff --git a/entry/src/main/resources/base/graphic/background_ability_setting_ablilty.xml b/exampleapp/src/main/resources/base/graphic/background_ability_setting_ablilty.xml similarity index 100% rename from entry/src/main/resources/base/graphic/background_ability_setting_ablilty.xml rename to exampleapp/src/main/resources/base/graphic/background_ability_setting_ablilty.xml diff --git a/entry/src/main/resources/base/graphic/background_btn.xml b/exampleapp/src/main/resources/base/graphic/background_btn.xml similarity index 100% rename from entry/src/main/resources/base/graphic/background_btn.xml rename to exampleapp/src/main/resources/base/graphic/background_btn.xml diff --git a/entry/src/main/resources/base/graphic/background_checkbox.xml b/exampleapp/src/main/resources/base/graphic/background_checkbox.xml similarity index 100% rename from entry/src/main/resources/base/graphic/background_checkbox.xml rename to exampleapp/src/main/resources/base/graphic/background_checkbox.xml diff --git a/entry/src/main/resources/base/graphic/ms__drawable.xml b/exampleapp/src/main/resources/base/graphic/ms__drawable.xml similarity index 100% rename from entry/src/main/resources/base/graphic/ms__drawable.xml rename to exampleapp/src/main/resources/base/graphic/ms__drawable.xml diff --git a/entry/src/main/resources/base/graphic/refresh_bg.xml b/exampleapp/src/main/resources/base/graphic/refresh_bg.xml similarity index 100% rename from entry/src/main/resources/base/graphic/refresh_bg.xml rename to exampleapp/src/main/resources/base/graphic/refresh_bg.xml diff --git a/entry/src/main/resources/base/layout/ability_demo.xml b/exampleapp/src/main/resources/base/layout/ability_demo.xml similarity index 100% rename from entry/src/main/resources/base/layout/ability_demo.xml rename to exampleapp/src/main/resources/base/layout/ability_demo.xml diff --git a/entry/src/main/resources/base/layout/ability_main.xml b/exampleapp/src/main/resources/base/layout/ability_main.xml similarity index 100% rename from entry/src/main/resources/base/layout/ability_main.xml rename to exampleapp/src/main/resources/base/layout/ability_main.xml diff --git a/entry/src/main/resources/base/layout/ability_settings.xml b/exampleapp/src/main/resources/base/layout/ability_settings.xml similarity index 100% rename from entry/src/main/resources/base/layout/ability_settings.xml rename to exampleapp/src/main/resources/base/layout/ability_settings.xml diff --git a/entry/src/main/resources/base/layout/ms__list_item.xml b/exampleapp/src/main/resources/base/layout/ms__list_item.xml similarity index 100% rename from entry/src/main/resources/base/layout/ms__list_item.xml rename to exampleapp/src/main/resources/base/layout/ms__list_item.xml diff --git a/entry/src/main/resources/base/media/check_no.png b/exampleapp/src/main/resources/base/media/check_no.png similarity index 100% rename from entry/src/main/resources/base/media/check_no.png rename to exampleapp/src/main/resources/base/media/check_no.png diff --git a/entry/src/main/resources/base/media/check_yes.png b/exampleapp/src/main/resources/base/media/check_yes.png similarity index 100% rename from entry/src/main/resources/base/media/check_yes.png rename to exampleapp/src/main/resources/base/media/check_yes.png diff --git a/entry/src/main/resources/base/media/ic_more.png b/exampleapp/src/main/resources/base/media/ic_more.png similarity index 100% rename from entry/src/main/resources/base/media/ic_more.png rename to exampleapp/src/main/resources/base/media/ic_more.png diff --git a/entry/src/main/resources/base/media/icon.png b/exampleapp/src/main/resources/base/media/icon.png similarity index 100% rename from entry/src/main/resources/base/media/icon.png rename to exampleapp/src/main/resources/base/media/icon.png diff --git a/entry/src/main/resources/base/media/point.png b/exampleapp/src/main/resources/base/media/point.png similarity index 100% rename from entry/src/main/resources/base/media/point.png rename to exampleapp/src/main/resources/base/media/point.png diff --git a/img/demo.png b/img/demo.gif similarity index 100% rename from img/demo.png rename to img/demo.gif diff --git a/settings.gradle b/settings.gradle index 21ad5f15e7540dad3209df8ad19fb9e320baec5b..1cb03d1f085f54a43d5955a59cfd1b6c70432844 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -include ':entry', ':tracker' +include ':exampleapp', ':tracker' diff --git a/tracker/src/main/java/org/matomo/sdk/Logger.java b/tracker/src/main/java/org/matomo/sdk/Logger.java index ebc82b39962452941103d6909809e88cff3ca168..baf6957ed833c2df1c160fda600e4c65032a3878 100644 --- a/tracker/src/main/java/org/matomo/sdk/Logger.java +++ b/tracker/src/main/java/org/matomo/sdk/Logger.java @@ -1,10 +1,11 @@ -/* + +/** * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/tracker/src/main/java/org/matomo/sdk/Matomo.java b/tracker/src/main/java/org/matomo/sdk/Matomo.java index eade42d4efbafe799867b7a9dc28e01d8b5c5405..e33a19aa86df54ddd7ae5f5572c2a6ecfc444790 100644 --- a/tracker/src/main/java/org/matomo/sdk/Matomo.java +++ b/tracker/src/main/java/org/matomo/sdk/Matomo.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk; diff --git a/tracker/src/main/java/org/matomo/sdk/QueryParams.java b/tracker/src/main/java/org/matomo/sdk/QueryParams.java index 8929a9f8f6a200ed56b5092477503a2de2485524..203ac82a1ed32fbda6061588ced06ea73179ad52 100644 --- a/tracker/src/main/java/org/matomo/sdk/QueryParams.java +++ b/tracker/src/main/java/org/matomo/sdk/QueryParams.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk; diff --git a/tracker/src/main/java/org/matomo/sdk/TrackMe.java b/tracker/src/main/java/org/matomo/sdk/TrackMe.java index 89fa286db9268607f23f645b6ceedfebed4b4902..10447d6d0e4f5cbba1fbd12c796c08ae273e3fb6 100644 --- a/tracker/src/main/java/org/matomo/sdk/TrackMe.java +++ b/tracker/src/main/java/org/matomo/sdk/TrackMe.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk; diff --git a/tracker/src/main/java/org/matomo/sdk/Tracker.java b/tracker/src/main/java/org/matomo/sdk/Tracker.java index 6bef0cbc3f0f951a5f0398010df1d7c1a83ada21..05b63fbbe8a90f0c1f702d8827b81c80fd486ea9 100644 --- a/tracker/src/main/java/org/matomo/sdk/Tracker.java +++ b/tracker/src/main/java/org/matomo/sdk/Tracker.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk; @@ -454,12 +452,10 @@ public class Tracker { urlPath = urlBuilder.append(urlPath).toString(); } - // https://github.com/matomo-org/matomo-sdk-android/issues/92 mDefaultTrackMe.set(QueryParams.URL_PATH, urlPath); trackMe.set(QueryParams.URL_PATH, urlPath); if (mLastEvent == null || !Objects.equals(trackMe.get(QueryParams.USER_ID), mLastEvent.get(QueryParams.USER_ID))) { - // https://github.com/matomo-org/matomo-sdk-android/issues/209 trackMe.trySet(QueryParams.SCREEN_RESOLUTION, mDefaultTrackMe.get(QueryParams.SCREEN_RESOLUTION)); trackMe.trySet(QueryParams.USER_AGENT, mDefaultTrackMe.get(QueryParams.USER_AGENT)); trackMe.trySet(QueryParams.LANGUAGE, mDefaultTrackMe.get(QueryParams.LANGUAGE)); diff --git a/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultDispatcher.java b/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultDispatcher.java index e070b19d5575f13409d61723b02a14a9f4d740b1..b030f66ba76b6fb3a449ee1b53c7d8db0807a1d1 100644 --- a/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultDispatcher.java +++ b/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultDispatcher.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.dispatcher; diff --git a/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultPacketSender.java b/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultPacketSender.java index 71812e5f47f2504069d1263771e51c64cf5bbcf1..b08fe528483dccbd633ce7cf691336b23126631e 100644 --- a/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultPacketSender.java +++ b/tracker/src/main/java/org/matomo/sdk/dispatcher/DefaultPacketSender.java @@ -86,7 +86,6 @@ public class DefaultPacketSender implements PacketSender { System.out.println("injectBaseParams>>>>>" + ">>>>>" + "jin" + "statusCode" + ">>>" + statusCode); final boolean successful = checkResponseCode(statusCode); if (successful) { - // https://github.com/matomo-org/matomo-sdk-android/issues/226 InputStream is = urlConnection.getInputStream(); if (is != null) { try { diff --git a/tracker/src/main/java/org/matomo/sdk/dispatcher/Dispatcher.java b/tracker/src/main/java/org/matomo/sdk/dispatcher/Dispatcher.java index bf5579f64a3efe63228133772e5513cae511d607..0b55cf060bda4685a88f7a55c756e944988c88ee 100644 --- a/tracker/src/main/java/org/matomo/sdk/dispatcher/Dispatcher.java +++ b/tracker/src/main/java/org/matomo/sdk/dispatcher/Dispatcher.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.dispatcher; diff --git a/tracker/src/main/java/org/matomo/sdk/dispatcher/Packet.java b/tracker/src/main/java/org/matomo/sdk/dispatcher/Packet.java index 6aeaefe0d7712826a8f2e65587521c3e32a24d51..66c20a34cf30d2007d49df71c2b246481b76acf5 100644 --- a/tracker/src/main/java/org/matomo/sdk/dispatcher/Packet.java +++ b/tracker/src/main/java/org/matomo/sdk/dispatcher/Packet.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.dispatcher; diff --git a/tracker/src/main/java/org/matomo/sdk/dispatcher/PacketFactory.java b/tracker/src/main/java/org/matomo/sdk/dispatcher/PacketFactory.java index fda64bfee300a2e0513bde49f4c3e483bfcdcfb2..9e50080c8585e1f0ddac8d19c3d444cd453148f6 100644 --- a/tracker/src/main/java/org/matomo/sdk/dispatcher/PacketFactory.java +++ b/tracker/src/main/java/org/matomo/sdk/dispatcher/PacketFactory.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.dispatcher; diff --git a/tracker/src/main/java/org/matomo/sdk/extra/CustomVariables.java b/tracker/src/main/java/org/matomo/sdk/extra/CustomVariables.java index d16197464ee053251a20ec4967c450453ba116a1..98aec2b4e0a0038717202eba155492581d179883 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/CustomVariables.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/CustomVariables.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.extra; diff --git a/tracker/src/main/java/org/matomo/sdk/extra/DownloadTracker.java b/tracker/src/main/java/org/matomo/sdk/extra/DownloadTracker.java index dccaf562c72958d759a2f5b1f4185970a44d30fa..ebfe2e9d0643f0a98057106586a8a1985e500910 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/DownloadTracker.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/DownloadTracker.java @@ -146,11 +146,7 @@ public class DownloadTracker {//todo 这个类先写死 String extraIdentifier = extra.buildExtraIdentifier(); if (extraIdentifier != null) installIdentifier.append("/").append(extraIdentifier); - - // Usual USEFUL values of this field will be: "com.android.vending" or "com.android.browser", i.e. app packagenames. - // This is not guaranteed, values can also look like: app_process /system/bin com.android.commands.pm.Pm install -r /storage/sdcard0/... //todo 先写成空 - //String referringApp = mPackMan.getInstallerPackageName(mPkgInfo.packageName); String referringApp = new PackageManagerImpl().getInstallerPackageName(PackageManagerImpl.TARGET_PACKAGE); if (referringApp != null && referringApp.length() > 200) diff --git a/tracker/src/main/java/org/matomo/sdk/extra/EcommerceItems.java b/tracker/src/main/java/org/matomo/sdk/extra/EcommerceItems.java index cfdb5d6607bf1cb54eabc644a199b63d90bddbb4..391d0ff563dfc9359b2dc17d80b6515e8ba97fad 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/EcommerceItems.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/EcommerceItems.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.extra; diff --git a/tracker/src/main/java/org/matomo/sdk/extra/MatomoApplication.java b/tracker/src/main/java/org/matomo/sdk/extra/MatomoApplication.java index 0d485f9104a0040cffa835d65447c9b897fb6fa1..eb69c64bccc6a7f6633382b9b11a381373430559 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/MatomoApplication.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/MatomoApplication.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.extra; diff --git a/tracker/src/main/java/org/matomo/sdk/extra/MatomoExceptionHandler.java b/tracker/src/main/java/org/matomo/sdk/extra/MatomoExceptionHandler.java index f9993c20117e3c1e0d4c26ae9d5eba7a9e941edf..7d3e7559de807e57d7fe92dc023aab844463f2fb 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/MatomoExceptionHandler.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/MatomoExceptionHandler.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.extra; diff --git a/tracker/src/main/java/org/matomo/sdk/extra/TrackHelper.java b/tracker/src/main/java/org/matomo/sdk/extra/TrackHelper.java index a00572ebc2705248da1dc132a5867ac6111be755..4a625bfe5e0a3a02564ef93a96cc2b12eeda1a8d 100644 --- a/tracker/src/main/java/org/matomo/sdk/extra/TrackHelper.java +++ b/tracker/src/main/java/org/matomo/sdk/extra/TrackHelper.java @@ -278,7 +278,7 @@ public class TrackHelper { * a conversion manually on other types of actions, for example: * when a user submits a form * when a user has stayed more than a given amount of time on the page - * when a user does some interaction in your Android application + * when a user does some interaction in your application * * @param idGoal id of goal as defined in matomo goal settings * @return Goal @@ -823,7 +823,6 @@ public class TrackHelper { * Be wary of relying on this for complete crash tracking.. * Think about how to deal with older app versions still throwing already fixed exceptions. *

- * See discussion here: https://github.com/matomo-org/matomo-sdk-android/issues/28 * * @return UncaughtExceptions */ diff --git a/tracker/src/main/java/org/matomo/sdk/tools/Checksum.java b/tracker/src/main/java/org/matomo/sdk/tools/Checksum.java index 50720c636b41fa674ac31cd8e492ecd562bf52ba..6b9b3b42ee805774828d0412c6e8e900f6814c01 100644 --- a/tracker/src/main/java/org/matomo/sdk/tools/Checksum.java +++ b/tracker/src/main/java/org/matomo/sdk/tools/Checksum.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.tools; diff --git a/tracker/src/main/java/org/matomo/sdk/tools/CurrencyFormatter.java b/tracker/src/main/java/org/matomo/sdk/tools/CurrencyFormatter.java index 350e9133c301cd40e8984a421ba1924d067806a1..c0594f9867aa06fbfa11e755555353780aed6d98 100644 --- a/tracker/src/main/java/org/matomo/sdk/tools/CurrencyFormatter.java +++ b/tracker/src/main/java/org/matomo/sdk/tools/CurrencyFormatter.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.tools; diff --git a/tracker/src/main/java/org/matomo/sdk/tools/DeviceHelper.java b/tracker/src/main/java/org/matomo/sdk/tools/DeviceHelper.java index 7c98ccfda654959f90231c05bf23f06feaa79195..5bbbc00572a1f0058b6864e38d7ffae3d905e583 100644 --- a/tracker/src/main/java/org/matomo/sdk/tools/DeviceHelper.java +++ b/tracker/src/main/java/org/matomo/sdk/tools/DeviceHelper.java @@ -1,8 +1,6 @@ /* - * Android SDK for Matomo + * SDK for Matomo * - * @link https://github.com/matomo-org/matomo-android-sdk - * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause */ package org.matomo.sdk.tools; @@ -41,7 +39,7 @@ public class DeviceHelper { } /** - * Returns android system user agent + * Returns system user agent * * @return well formatted user agent */ @@ -50,12 +48,12 @@ public class DeviceHelper { if (httpAgent == null || httpAgent.startsWith("Apache-HttpClient/UNAVAILABLE (java")) { String dalvik = mPropertySource.getJVMVersion(); if (dalvik == null) dalvik = "0.0.0"; - String android = mBuildInfo.getRelease(); + String release = mBuildInfo.getRelease(); String model = mBuildInfo.getModel(); String build = mBuildInfo.getBuildId(); httpAgent = String.format(Locale.US, - "Dalvik/%s (Linux; U; Android %s; %s Build/%s)", - dalvik, android, model, build + "Dalvik/%s (Linux; U; ohos %s; %s Build/%s)", + dalvik, release, model, build ); } return httpAgent; diff --git a/tracker/src/main/java/org/matomo/sdk/tools/UrlHelper.java b/tracker/src/main/java/org/matomo/sdk/tools/UrlHelper.java index 87984bed0362a35244ccdafa05c96243c14ac694..6bd93b97eb1bc9aef0b467cc45a4b2d9e0418cfc 100644 --- a/tracker/src/main/java/org/matomo/sdk/tools/UrlHelper.java +++ b/tracker/src/main/java/org/matomo/sdk/tools/UrlHelper.java @@ -1,9 +1,6 @@ /* * - * * Android SDK for Matomo - * * - * * @link https://github.com/matomo-org/matomo-android-sdk - * * @license https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE BSD-3 Clause + * SDK for Matomo * */ @@ -27,7 +24,6 @@ public class UrlHelper { private static final String PARAMETER_SEPARATOR = "&"; private static final String NAME_VALUE_SEPARATOR = "="; - // Inspired by https://github.com/android/platform_external_apache-http/blob/master/src/org/apache/http/client/utils/URLEncodedUtils.java // Helper due to Apache http deprecation public static List> parse(final URI uri, final String encoding) {