Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
c41f935
Expose current source and attributes
blootsvoets Oct 20, 2022
f34c7c3
Docs and listen for manual attribute updates
blootsvoets Oct 20, 2022
b53ab3e
Allow reentrant execution when updating source attributes
blootsvoets Nov 2, 2022
c7812e0
Add attributes and source to BaseServiceConnection
blootsvoets Nov 3, 2022
e6f1ed6
Added RadarService.flushCaches and misc changes
blootsvoets Nov 14, 2022
9a9d7ed
Do not include non-plugin directories
blootsvoets Nov 15, 2022
4c93863
Remove loop in server_status handling
blootsvoets Nov 16, 2022
bdf30e7
Add logout handling to all classes
blootsvoets Nov 29, 2022
92a5b31
Forward all exceptions to login listeners
blootsvoets Nov 30, 2022
053e908
Build coroutines WIP
blootsvoets Nov 29, 2022
a63db02
Forward logoutSucceeded to listeners
blootsvoets Dec 1, 2022
484269e
Remove duplicate logout handling
blootsvoets Dec 5, 2022
cb27886
Full reset after logout and removed deprecated code
blootsvoets Dec 6, 2022
92b1647
Kotlin readability
blootsvoets Dec 6, 2022
eeaa443
Remove deprecated code and use kotlin-like syntax
blootsvoets Dec 6, 2022
a8d2302
Misc kotlin readability updates
blootsvoets Dec 6, 2022
e4b7125
Jwt parser reordering
blootsvoets Dec 6, 2022
2e2f7ca
Merge branch 'dynamic_source_coupling' into ktor-coroutines
blootsvoets Dec 6, 2022
3b75586
WIP
blootsvoets Jan 16, 2023
1f294f9
LiveData transformation improvements
blootsvoets Mar 6, 2023
ec25bee
Misc changes
blootsvoets Aug 22, 2023
82ac1c8
Undo removal of oauth2 login plugin
this-Aditya Sep 5, 2024
9ada9af
Get rid of merge conflicts
this-Aditya Oct 16, 2024
b327d2d
Equating RadarService to current dev branch for now
this-Aditya Oct 16, 2024
e14d5c8
Added disconnection check for ::hasConnection
this-Aditya Oct 16, 2024
113a653
Updated MainActivity to react of flows instead of callbacks
this-Aditya Oct 19, 2024
3da0c50
Update sourceMetadata fields and SourceService binder handling
this-Aditya Oct 19, 2024
7982274
Work on transforming AuthService's callback API to reactive streams
this-Aditya Oct 19, 2024
67ab83c
Commons version bump and getting stateflow value
this-Aditya Oct 19, 2024
59bfb3a
Suspending the parser
this-Aditya Oct 21, 2024
4822d73
Corrected indentation
this-Aditya Oct 21, 2024
602f02e
Modified Authentication string parsers
this-Aditya Oct 21, 2024
526e4aa
Utlizing kotlinx-serialization for auth requests
this-Aditya Oct 22, 2024
d573eb2
Refactored ManagementPortalClient to working state
this-Aditya Oct 22, 2024
a65bcac
Skipping build for oAuth plugin temporarily
this-Aditya Oct 22, 2024
25bc4aa
Minor updates to LoginManager
this-Aditya Oct 22, 2024
af1f4bc
Using Builder state when parsing
this-Aditya Oct 23, 2024
eed9f48
More work on applying state builders
this-Aditya Oct 23, 2024
447a0a9
MpClient improvements
this-Aditya Oct 23, 2024
a188e88
Updates to appconfigs, mpLoginManager and added javadocs
this-Aditya Oct 23, 2024
971ab81
Handling source update and registration smoothly
this-Aditya Oct 23, 2024
60aa474
Updates to TapeCache
this-Aditya Oct 24, 2024
cf2ef9e
Now KafkaConnectionChecker will completely use coroutines and flows
this-Aditya Oct 24, 2024
f6cf44e
Configured kafka submitter and connection checker
this-Aditya Oct 24, 2024
752119a
Data Submitters are now configured to work with coroutines
this-Aditya Oct 24, 2024
49e7f5f
Added safe running check for kafka status checker
this-Aditya Oct 25, 2024
f0a27ec
Safe runner extension added
this-Aditya Oct 25, 2024
e15640b
Added utility class with enhanced coroutine support
this-Aditya Oct 28, 2024
42487df
Some improvements to CoroutineTaskExecutor and added missing license
this-Aditya Oct 29, 2024
3c41207
Minor improvements for coroutine executor
this-Aditya Oct 29, 2024
838c2de
Final adjustments for task executor
this-Aditya Oct 30, 2024
981ae83
NetworkConnectedReceiver will now be explicily registered and unregis…
this-Aditya Nov 3, 2024
5f092fb
Work on data handlers to work with coroutines
this-Aditya Nov 3, 2024
04cb6d1
Now coroutine executor will return job on execution
this-Aditya Nov 3, 2024
2a89b44
Updates for radar service, data handler and network receiver
this-Aditya Nov 3, 2024
e69ec5c
Refined functionality of CoroutineTaskExecutor
this-Aditya Nov 3, 2024
09f6b64
Configured schema retriever and some other tasks
this-Aditya Nov 3, 2024
32c7c68
Modifications to AuthService
this-Aditya Nov 3, 2024
ea059c0
Updates to AuthService
this-Aditya Nov 4, 2024
b2b52d1
Tweaking functionality of auth components
this-Aditya Nov 4, 2024
bb0e972
Tweaks to mp-manager and rest configuration
this-Aditya Nov 4, 2024
95d725c
Corrected SourceProviderRegistrar functionality
this-Aditya Nov 4, 2024
734c3fc
Modifications to kafka senders and executors
this-Aditya Nov 5, 2024
1d75529
Passed specific records test
this-Aditya Nov 5, 2024
bbb724f
Modifications to login managers and AuthService'
this-Aditya Nov 5, 2024
a5c79dd
Updated SplashActvity to use coroutines and lifecycleScopes
this-Aditya Nov 5, 2024
494f144
Fixes for MainActivity and LoginActivity
this-Aditya Nov 5, 2024
b410684
Added string utility class
this-Aditya Nov 5, 2024
96b9898
Alerted RadarService code
this-Aditya Nov 5, 2024
bf1d613
Now also tracking the number of records in cache
this-Aditya Nov 5, 2024
70d32c4
Source directory modified
this-Aditya Nov 5, 2024
90e8af0
Removing SafeHandler usage wherever possible
this-Aditya Nov 5, 2024
40c3da5
Trying to rectify tests
this-Aditya Nov 5, 2024
fca127c
BluetoothEnforcer adjusted
this-Aditya Nov 5, 2024
263a058
Get rid of localbroadcastManager from application plugin
this-Aditya Nov 5, 2024
9dd931d
SourceStatus update will now trigger radarservice without using broad…
this-Aditya Nov 5, 2024
5e7188f
Fixed WeatherMapApi client to ktor and minor updates to other plugins
this-Aditya Nov 5, 2024
3c54e00
Corrected the ktor deserialiazation of JSON object
this-Aditya Nov 5, 2024
2f0f36d
Removing unused comments
this-Aditya Nov 6, 2024
779148f
Corrected mp client code
this-Aditya Nov 24, 2024
e0ffe89
Final updates to auth state and source metadata
this-Aditya Nov 25, 2024
6f0a952
SupervisorJob is default for CoroutineTaskExecutor
this-Aditya Nov 26, 2024
4658ee1
Tweaked AuthState and modified test cases
this-Aditya Nov 26, 2024
42b9151
Suspeding the creation and retrieval of data caches
this-Aditya Nov 26, 2024
3a01282
More test cases for AppAuthState
this-Aditya Nov 27, 2024
449d933
Using default dispatcher for cache
this-Aditya Dec 1, 2024
74af705
Several modifications to data storing and sending
this-Aditya Dec 1, 2024
a47807d
Modifications to auth flow and renaming string utility class
this-Aditya Dec 2, 2024
7e32228
Minor changes
this-Aditya Dec 2, 2024
9f93612
Updates to Auth Service
this-Aditya Dec 2, 2024
7ecfecc
Added serializable entities for registering and updating source
this-Aditya Dec 3, 2024
76c7b45
Adjusted tape cache and the android tests
this-Aditya Dec 3, 2024
81ceeed
Auth fixes
this-Aditya Dec 3, 2024
a23c2bc
Minor changes
this-Aditya Dec 3, 2024
fef8a4c
Modified logs for coroutine task executor
this-Aditya Dec 9, 2024
55e9810
Updated way of starting source managers
this-Aditya Dec 9, 2024
ba40803
Updated activities, service and serialization
this-Aditya Dec 9, 2024
b9fb230
Updated data handling and sending
this-Aditya Dec 9, 2024
830d7e8
Updates to bluetooth enforcer
this-Aditya Dec 9, 2024
8cab795
Added radar service instance to application class
this-Aditya Dec 9, 2024
4f86d10
Misc changes
this-Aditya Dec 9, 2024
542c276
Now receiving location broadcast via flows
this-Aditya Dec 9, 2024
9b626fe
More work on broadcasts
this-Aditya Dec 9, 2024
4af35df
Broadcaster deleted
this-Aditya Dec 9, 2024
b4f92b8
Removed deprecated startActivityForResult
this-Aditya Dec 9, 2024
43167a1
Misc changes
this-Aditya Dec 9, 2024
954ffe8
Some changes on bluetooth with some minor changes
this-Aditya Dec 12, 2024
5081026
Corrected sensor permissions and config flow collection
this-Aditya Dec 12, 2024
c292f92
Making CoroutineTaskExecutor execution more robust
this-Aditya Dec 12, 2024
ce8c1ff
Improving chances of task execution by loading them to lifecycleScope
this-Aditya Dec 12, 2024
7953f72
Making logout succeeded suspend
this-Aditya Dec 12, 2024
b9b7f46
Closing resources properly
this-Aditya Dec 12, 2024
b7811bd
Changes in sources
this-Aditya Dec 13, 2024
be2f002
Logout feature
this-Aditya Dec 13, 2024
d5b5703
Now showing progress bar on logout
this-Aditya Dec 13, 2024
8741aaf
Updating views on main dispatchers
this-Aditya Dec 13, 2024
0db4523
Resolved glitch in splash
this-Aditya Dec 13, 2024
4833a02
Resolve merge conflicts
this-Aditya Mar 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion avro-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

<manifest/>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.apache.avro.specific;

import static org.junit.Assert.assertEquals;
import static org.radarbase.producer.rest.AvroDataMapperFactory.IDENTITY_MAPPER;

import org.apache.avro.Schema;
import org.apache.avro.SchemaValidationException;
Expand All @@ -17,8 +16,8 @@
import org.radarbase.data.AvroEncoder;
import org.radarbase.data.Record;
import org.radarbase.data.RemoteSchemaEncoder;
import org.radarbase.producer.rest.AvroDataMapperFactory;
import org.radarbase.producer.rest.ParsedSchemaMetadata;
import org.radarbase.producer.avro.AvroDataMapperFactory;
import org.radarbase.producer.schema.ParsedSchemaMetadata;
import org.radarbase.topic.AvroTopic;
import org.radarcns.active.questionnaire.Answer;
import org.radarcns.active.questionnaire.Questionnaire;
Expand Down Expand Up @@ -64,30 +63,28 @@ public void serializationTest() throws IOException {
actual = avroDeserializer.deserialize(input);
}

assertEquals(record.key, actual.key);
assertEquals(record.value, actual.value);
assertEquals(record.getKey(), actual.getKey());
assertEquals(record.getValue(), actual.getValue());
}

@Test
public void avroBinaryEncodingTest() throws IOException, SchemaValidationException {
AvroEncoder encoder = new RemoteSchemaEncoder(true);
AvroEncoder.AvroWriter<PhoneAcceleration> accelerationWriter = encoder.writer(PhoneAcceleration.getClassSchema(), PhoneAcceleration.class);
ParsedSchemaMetadata schemaMetadata = new ParsedSchemaMetadata(1, 1, new Schema.Parser().parse("{\"name\":\"Test\",\"type\":\"record\",\"fields\":[{\"name\":\"time\",\"type\":\"double\"},{\"name\":\"timeReceived\",\"type\":\"double\"},{\"name\":\"x\",\"type\":\"float\"},{\"name\":\"y\",\"type\":\"float\"},{\"name\":\"z\",\"type\":\"float\"},{\"name\":\"def\",\"type\":[\"null\",\"string\"],\"default\":null}]}"));
accelerationWriter.setReaderSchema(schemaMetadata);
byte[] result = accelerationWriter.encode(record.value);
AvroEncoder.AvroWriter<PhoneAcceleration> accelerationWriter = encoder.writer(PhoneAcceleration.getClassSchema(), PhoneAcceleration.class, schemaMetadata.getSchema());
byte[] result = accelerationWriter.encode(record.getValue());

AvroDecoder decoder = new AvroDatumDecoder(SpecificData.get(), true);
AvroDecoder.AvroReader<PhoneAcceleration> accelerationReader = decoder.reader(PhoneAcceleration.getClassSchema(), PhoneAcceleration.class);
GenericRecord acceleration = accelerationReader.decode(result);
assertEquals(record.value, acceleration);
assertEquals(record.getValue(), acceleration);
}

@Test
public void avroJsonEncodingTest() throws IOException, SchemaValidationException {
AvroEncoder encoder = new RemoteSchemaEncoder(false);
AvroEncoder.AvroWriter<GenericRecord> accelerationWriter = encoder.writer(Questionnaire.getClassSchema(), GenericRecord.class);
ParsedSchemaMetadata schemaMetadata = new ParsedSchemaMetadata(1, 1, Questionnaire.getClassSchema());
accelerationWriter.setReaderSchema(schemaMetadata);
AvroEncoder.AvroWriter<GenericRecord> accelerationWriter = encoder.writer(Questionnaire.getClassSchema(), GenericRecord.class, schemaMetadata.getSchema());
List<Answer> list = new ArrayList<>(2);
list.add(new Answer("qid1", 1, 0.4, 0.5));
list.add(new Answer("qid2", "a", 0.6, 0.7));
Expand All @@ -107,9 +104,8 @@ public void avroMiscEncodingTest() throws IOException, SchemaValidationException
AvroEncoder encoder = new RemoteSchemaEncoder(false);

Schema schema = new Schema.Parser().parse("{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"name\":\"bytes\",\"type\":\"bytes\"},{\"name\":\"bool\",\"type\":\"boolean\"},{\"name\":\"unionFixed\",\"type\":[\"null\",{\"type\":\"fixed\",\"size\":4,\"name\":\"four\"}],\"default\":null},{\"name\":\"map\",\"type\":{\"type\":\"map\", \"values\":{\"type\":\"int\"}}}]}");
AvroEncoder.AvroWriter<GenericRecord> accelerationWriter = encoder.writer(schema, GenericRecord.class);
ParsedSchemaMetadata schemaMetadata = new ParsedSchemaMetadata(1, 1, schema);
accelerationWriter.setReaderSchema(schemaMetadata);
AvroEncoder.AvroWriter<GenericRecord> accelerationWriter = encoder.writer(schema, GenericRecord.class, schemaMetadata.getSchema());
GenericRecordBuilder record = new GenericRecordBuilder(schema);
record.set("bytes", ByteBuffer.wrap(new byte[] {1, 2, 3, 4}));
Map<String, Integer> map = new HashMap<>();
Expand All @@ -128,12 +124,18 @@ public void avroMiscEncodingTest() throws IOException, SchemaValidationException
assertEquals(record.build(), result);
}

@Test
public void dataMappingTest() throws SchemaValidationException {
Schema answer = Answer.SCHEMA$;
Schema serverAnswer = new Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Answer\",\"namespace\":\"org.radarcns.active.questionnaire\",\"fields\":[{\"name\":\"questionId\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"value\",\"type\":[\"int\",\"string\",\"double\"]},{\"name\":\"startTime\",\"type\":\"double\"},{\"name\":\"endTime\",\"type\":\"double\"}]}");
/**
*Commenting now because IDENTITY_MAPPER is now a property of a private class.
* This will be replaced with similar functionality
*
* @Test
* public void dataMappingTest() throws SchemaValidationException {
* Schema answer = Answer.SCHEMA$;
* Schema serverAnswer = new Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Answer\",\"namespace\":\"org.radarcns.active.questionnaire\",\"fields\":[{\"name\":\"questionId\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"value\",\"type\":[\"int\",\"string\",\"double\"]},{\"name\":\"startTime\",\"type\":\"double\"},{\"name\":\"endTime\",\"type\":\"double\"}]}");
*
* assertEquals(IDENTITY_MAPPER, AvroDataMapperFactory.createMapper(answer, serverAnswer, null));
* assertEquals(IDENTITY_MAPPER, AvroDataMapperFactory.createMapper(serverAnswer, answer, null));
* }
*/

assertEquals(IDENTITY_MAPPER, AvroDataMapperFactory.get().createMapper(answer, serverAnswer, null));
assertEquals(IDENTITY_MAPPER, AvroDataMapperFactory.get().createMapper(serverAnswer, answer, null));
}
}
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ buildscript {
classpath "com.github.bjoernq:unmockplugin:$unmock_plugin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_android_gradle_plugin_version"
classpath("org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version")
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}

Expand All @@ -45,6 +46,9 @@ allprojects {
group = 'org.radarbase'

ext.versionCode = 54
configurations.all {
exclude group: 'org.apache.avro', module: 'avro'
}
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dokka_version=1.9.20
publish_plugin_version=2.0.0
versions_plugin_version=0.51.0

radar_commons_version=0.15.0
radar_commons_version=1.1.2
radar_schemas_commons_version=0.8.11

radar_faros_sdk_version=0.1.0
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

package org.radarbase.monitor.application

import org.radarbase.android.kafka.ServerStatusListener
import org.radarbase.android.kafka.ServerStatus
import org.radarbase.android.source.BaseSourceState
import java.util.concurrent.ConcurrentHashMap

class ApplicationState : BaseSourceState() {
@set:Synchronized
var serverStatus: ServerStatusListener.Status? = null
@Synchronized get() = field ?: ServerStatusListener.Status.DISCONNECTED
var serverStatus: ServerStatus? = null
@Synchronized get() = field ?: ServerStatus.DISCONNECTED

@get:Synchronized
var recordsSent = 0L
Expand Down
Loading