Skip to content

Commit

Permalink
feat: update Fitbit credentials form and AndroidManifest of app
Browse files Browse the repository at this point in the history
- Updated callback URL in the Fitbit credentials form to use "studyu://".
- Added a new instruction to fill a form for obtaining access to
  intraday data from Fitbit.
- Updated AndroidManifest to reflect the new scheme for web auth.
  • Loading branch information
ibrahimozkn committed Feb 25, 2025
1 parent 5f5b2b4 commit cf4e682
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 24 deletions.
51 changes: 29 additions & 22 deletions app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<!-- Begin flutter_local_notifications -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- End flutter_local_notifications -->

<queries>
<intent>
<!-- Interact with web pages -->
<!-- Interact with web pages -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
Expand All @@ -28,49 +28,56 @@


<application
android:label="StudyU"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:label="StudyU">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Begin flutter_web_auth -->
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" android:exported="true">
<activity
android:name="com.linusu.flutter_web_auth.CallbackActivity"
android:exported="true">
<intent-filter android:label="flutter_web_auth">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="example" />

<data android:scheme="studyu" />
</intent-filter>
</activity>
<!-- End flutter_web_auth -->
<!-- Begin flutter_local_notifications -->
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver"
android:exported="false" />
<receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<!-- End flutter_local_notifications -->
Expand All @@ -88,8 +95,8 @@
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
</queries>
</manifest>
Binary file added designer_v2/assets/images/step6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added designer_v2/assets/images/step7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class StudyDesignFitbitCredentialsFormView extends StudyDesignPageWidget {
),
TextParagraph(
text:
'4. Fill in the required fields such as application name, description, and callback URL (use: "https://example.com/callback").',
'4. Fill in the required fields such as application name, description, and callback URL (use: "studyu://").',
),
TextParagraph(
text:
Expand All @@ -75,7 +75,18 @@ class StudyDesignFitbitCredentialsFormView extends StudyDesignPageWidget {
text:
'6. Submit the form to get your "Client ID" and "Client Secret".',
),
TextParagraph(text: '7. Copy and paste the credentials below.'),
InkWell(
onTap: () => _launchURL(
'https://partners.fitbit.com/researchapplication'),
child: Text(
'7. Please fill the following form to obtain access for intraday data. Without this, you cannot obtain any data from Fitbit for your trials.',
style: TextStyle(
color: Theme.of(context).primaryColor,
decoration: TextDecoration.underline,
),
),
),
TextParagraph(text: '8. Copy and paste the credentials below.'),
const SizedBox(height: 12.0),
_buildScreenshotsSection(context),
const SizedBox(height: 16.0),
Expand Down Expand Up @@ -194,6 +205,16 @@ class StudyDesignFitbitCredentialsFormView extends StudyDesignPageWidget {
'assets/images/step5.png',
'Step 5: Set Access',
),
_buildScreenshot(
context,
'assets/images/step6.png',
'Step 6: Get Credentials',
),
_buildScreenshot(
context,
'assets/images/step7.png',
'Step 7: Fill Form',
),
],
),
),
Expand Down

0 comments on commit cf4e682

Please sign in to comment.