Skip to content

Instantly share code, notes, and snippets.

View mahdi-malv's full-sized avatar
:copilot:

Mah-d mahdi-malv

:copilot:
View GitHub Profile
@mahdi-malv
mahdi-malv / remove-build.sh
Created July 8, 2021 12:27
Remove build directories of IntelliJ projects with python3
python3 -c """
import shutil
import glob
for i in glob.glob('**/build/',recursive=True):
print(f'Deleting {i}')
try:
shutil.rmtree(i)
except OSError:
print(f'Failed to remove {i}')

Sign application with signKey (Best way)

  • signed with parameters via command line, use them
  • If not signed with parameters, use the key.properties

Prerequisites

  • Add the following snippet to app:build.gradle -> android { }
android {
@mahdi-malv
mahdi-malv / pushe_modules_size.csv
Last active December 14, 2020 06:04
Pushe modules
Module name Size(KB) Description
base 15 Integrates other module that are common
base-mini 1B Same as base but imports custom minifed java
core 700 Responsible to provide core functionality of the SDK
analytics 255 Analytics functions providing Segmentation feature
notification 476 Adds notification related features
datalytics 260 Responsible for collecting analytical data for console charts
inappmessaging 280 InAppMessaging feature
fcm 72 FCM service. Adds support for sending and receiving messages using Firebase cloud messaging (Google play devices)
hms 56 HMS service. Adds support for sending and receiving messages using Huawei PushKit (Hms core devices)
This file has been truncated, but you can view the full file.
--------- beginning of system
12-08 15:08:25.093 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAccount: subId=-1, activeData=-1
12-08 15:08:25.093 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAccount: Device does not require preference.
12-08 15:08:25.093 2105 3153 D Mapcon : TelephonyAdapter: [getWfcMode]slotId=1, isRoaming=false, mode=WIFI_PREFER
12-08 15:08:25.093 2105 3153 D Mapcon : VoiceManager-5-ImsDomainConfig: [start]start,modemDomain=WIFI_PREFER
12-08 15:08:25.093 2105 3153 D Mapcon : TelephonyAdapter: [setImsDomainConfig]phoneId=1, domain=WIFI_PREFER
12-08 15:08:25.094 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAccount: subId=-1, activeData=-1
12-08 15:08:25.094 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAccount: Device does not require preference.
12-08 15:08:25.094 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAccount: subId=-1, activeData=-1
12-08 15:08:25.094 2105 2105 D Telephony-AccountEntry: isEmergencyPreferredAcc
@mahdi-malv
mahdi-malv / add_ronash.xml
Created November 11, 2020 17:35
Add ronash to unity jar resolver XML
<dependencies>
<androidPackages>
<androidPackage spec="co.ronash.android:pushe-base:1.6.3">
<repositories>
<repository>https://maven.google.com</repository>
</repositories>
</androidPackage>
</androidPackages>
</dependencies>
@mahdi-malv
mahdi-malv / PusheChecksFcm.kt
Created November 10, 2020 14:24
Pushe checking for Fcm
val isFirebaseAvailable = GoogleApiAvailability.getInstance()
.isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS
@mahdi-malv
mahdi-malv / PusheHmsChecking.kt
Created November 10, 2020 14:23
Pushe checks for HMS
val isHmsAvailable = HuaweiApiAvailability.getInstance()
.isHuaweiMobileServicesAvailable(context) == ConnectionResult.SUCCESS
@mahdi-malv
mahdi-malv / pushe_preferred_service.xml
Created November 10, 2020 14:21
Config for setting prior service (hms or fcm)
<meta-data android:name="pushe_preferred_service"
android:value="hms" />
@mahdi-malv
mahdi-malv / hms_log.txt
Last active September 19, 2020 13:19
HSM core with phone permission log - Samsung Galaxy-A40
//// pushlog
2020-09-19 17:47:36.806 24125-24569/? I/PushLog50002300_HMS: [I/PushKit/PushLog50002300_HMS 24125:7415 null:81] MainEntry register success
2020-09-19 17:47:36.836 24125-24569/? E/PushLog50002300_HMS: [E/PushKit/PushLog50002300_HMS 24125:7415 null:139] HwCfgFilePolicy ClassNotFoundException
2020-09-19 17:47:36.836 24125-24569/? I/PushLog50002300_HMS: [I/PushKit/PushLog50002300_HMS 24125:7415 null:58] push jarFile is not exist
2020-09-19 17:47:36.839 24125-24569/? I/PushLog50002300_HMS: [I/PushKit/PushLog50002300_HMS 24125:7415 null:64] getEmuiLevel:0
2020-09-19 17:47:37.803 24125-24583/? I/PushLog50002300_HMS: [I/PushKit/PushLog50002300_HMS 24125:7424 null:8] process hms token for EMUI, return
2020-09-19 17:47:37.955 24125-24583/? W/PushLog50002300_HMS: [W/PushKit/PushLog50002300_HMS 24125:7424 null:40] genarate hmstokensign:hmsToken is null.
2020-09-19 17:47:37.979 24125-24678/? I/PushLog50002300_HMS: [I/PushKit/PushLog50002300_HMS 24125:7452 null:41] update xml data, old version is 0,new versi
@mahdi-malv
mahdi-malv / logs-17-09-2020.txt
Created September 17, 2020 10:13
DUMP: Huawei push log (Tag: pushlog and Tag: HMS) - Galaxy A40 - From 0 to sending uplink message
// TAG: pushlog
2020-09-17 13:54:34.677 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] Instance created
2020-09-17 13:54:34.677 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 0
2020-09-17 13:54:34.677 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerTokenCallback
2020-09-17 13:54:34.837 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 9
2020-09-17 13:54:34.850 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 7
2020-09-17 13:54:34.850 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 8
2020-09-17 13:54:34.863 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 12
2020-09-17 13:54:34.872 10602-10602/? I/SEMS:DataAdapterLog_11.1.0: [SEMS][PushLog][2][SmpManager] registerMessageCallback - 13