Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowalker77 committed Aug 13, 2024
2 parents e160b8f + ff5ffb9 commit 185c04c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import ir.ayantech.pushsdk.storage.PushUser
@SuppressLint("StaticFieldLeak")
object AyanNotification {
var context: Context? = null
fun initialize(context: Context) {
fun initialize(context: Context, baseUrl: String? = null) {
this.context = context
PushUser.context = context
PushNotificationNetworking.initialize(context)
PushNotificationNetworking.initialize(context, baseUrl)
if (isServerNotifiedToken() && isServerNotifiedMobile()) return
if (PushUser.pushNotificationToken.isEmpty()) return
if (!isServerNotifiedToken() && PushUser.pushNotificationToken.isNotEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ object PushNotificationNetworking {
private var applicationVersion: String? = null
private var operatorName: String? = null

fun initialize(context: Context) {
fun initialize(context: Context, baseUrl: String? = null) {
this.applicationName = context.resources.getString(R.string.applicationName)
this.applicationType = context.resources.getString(R.string.applicationType)
this.applicationVersion = getApplicationVersion(context)
this.operatorName = getOperatorName(context)
ayanApi = AyanApi(
context,
{ "" },
"https://pushnotification.infra.ayantech.ir/WebServices/App.svc/",
context = context,
getUserToken = { "" },
defaultBaseUrl = baseUrl ?: "https://pushnotification.infra.ayantech.ir/WebServices/App.svc/",
logLevel = LogLevel.DO_NOT_LOG
)
}
Expand Down

0 comments on commit 185c04c

Please sign in to comment.