Skip to content

Commit

Permalink
Merge pull request #67 from OutSystems/development
Browse files Browse the repository at this point in the history
Release 1.2.2: dev to main
  • Loading branch information
felipecn authored Mar 28, 2022
2 parents 772594c + f8071b8 commit 1233c74
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## [Unreleased]

- Fixes problem with Kotlin versions (https://outsystemsrd.atlassian.net/browse/RMET-1438)

- Fixed issue with MABS 7 Android build because of PendingIntent.FLAG_MUTABLE (https://outsystemsrd.atlassian.net/browse/RMET-1460)

## [Version 1.2.1]

- Fixes Background Jobs bugs on Android 12 due to missing PendingIntent flag


## [Version 1.2.0]

- Implemented Unit Tests for BackgroundJob operations on iOS (https://outsystemsrd.atlassian.net/browse/RMET-1210)
Expand Down
1 change: 0 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

<preference name="GradlePluginKotlinEnabled" value="true" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />
<preference name="GradlePluginKotlinVersion" value="1.3.50" />
<preference name="AndroidXEnabled" value="true"/>

<service android:name="com.outsystems.plugins.healthfitness.MyDataUpdateService"
Expand Down
4 changes: 2 additions & 2 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ dependencies{

def roomVersion = "2.3.0"
implementation("androidx.room:room-runtime:$roomVersion")
annotationProcessor("android.arch.persistence.room:compiler:1.1.1")
kapt("android.arch.persistence.room:compiler:1.1.1")
annotationProcessor("androidx.room:room-compiler:2.2.3")
kapt("androidx.room:room-compiler:2.2.3")
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class VariableUpdateService : BroadcastReceiver() {
}

//build intent to call the ClickActivity
//when MABS 7 stops being supported, we can use PendingIntent.FLAG_MUTABLE instead of 33554432
val myIntent = Intent(context, ClickActivity::class.java)
val pendingIntent = PendingIntent.getActivity(context, 1, myIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
val pendingIntent = PendingIntent.getActivity(context, 1, myIntent, PendingIntent.FLAG_UPDATE_CURRENT or 33554432)

//get icon for notification
val icon = getResourceId(context, "mipmap/ic_launcher")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.util.*
class Notification{

// Should we use UUID for this?
@PrimaryKey(name = "id", autoGenerate = true) var id: Long
@PrimaryKey(autoGenerate = true) var id: Long
@ColumnInfo(name = "notification_id") var notificationID: Int
@ColumnInfo(name = "title") var title: String = ""
@ColumnInfo(name = "body") var body: String = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ class HealthFitnessManager(var context : Context, var activity : Activity? = nul

private fun getSubscritionPendingIntent(variableName : String) : PendingIntent {
//do the actual subscription to the variable updates
//when MABS 7 stops being supported, we can use PendingIntent.FLAG_MUTABLE instead of 33554432
val intent = Intent(context, VariableUpdateService::class.java)
intent.putExtra(VariableUpdateService.VARIABLE_NAME, variableName)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
return PendingIntent.getBroadcast(context, variableName.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
return PendingIntent.getBroadcast(context, variableName.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or 33554432)
}
}

0 comments on commit 1233c74

Please sign in to comment.