Skip to content

Commit 2ea7fab

Browse files
committed
Add Android APK download section to web about page
- Download button with green Android icon matching site theme - Step-by-step installation instructions for enabling unknown apps - Links to GitHub release v1.0.0 APK - Only visible on web (hidden in Android app via Platform check)
1 parent 3084f81 commit 2ea7fab

1 file changed

Lines changed: 116 additions & 1 deletion

File tree

app/about.tsx

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import { ScrollView, View, StyleSheet, Linking, Pressable } from 'react-native';
1+
import { ScrollView, View, StyleSheet, Linking, Pressable, Platform } from 'react-native';
22
import { SafeAreaView } from 'react-native-safe-area-context';
33
import { Stack, useRouter } from 'expo-router';
44
import { Ionicons } from '@expo/vector-icons';
55
import { Text, Heading, MonoText } from '@/components/ui/Text';
66
import { colors, spacing, borderRadius } from '@/theme/tokens';
77

8+
const ANDROID_APK_URL =
9+
'https://github.com/ContextLab/dream-stream/releases/download/v1.0.0/dream-stream-v1.0.0.apk';
10+
const isWeb = Platform.OS === 'web';
11+
812
export default function AboutScreen() {
913
const router = useRouter();
1014

@@ -164,6 +168,70 @@ export default function AboutScreen() {
164168
</View>
165169
</View>
166170

171+
{isWeb && (
172+
<View style={styles.section}>
173+
<Heading variant="h3" color="primary" style={styles.sectionTitle}>
174+
<View style={styles.sectionTitleRow}>
175+
<Ionicons name="logo-android" size={24} color={colors.primary[400]} />
176+
<Text style={styles.sectionTitleText}>Download for Android</Text>
177+
</View>
178+
</Heading>
179+
<Text variant="body" color="secondary" style={styles.paragraph}>
180+
Get the full dream_stream experience on your Android device with sleep tracking and
181+
REM-triggered playback.
182+
</Text>
183+
<Pressable style={styles.downloadButton} onPress={() => openLink(ANDROID_APK_URL)}>
184+
<Ionicons name="download-outline" size={20} color={colors.gray[950]} />
185+
<Text variant="body" weight="semibold" style={styles.downloadButtonText}>
186+
Download APK (v1.0.0)
187+
</Text>
188+
</Pressable>
189+
<View style={styles.installInstructions}>
190+
<Text
191+
variant="bodySmall"
192+
weight="semibold"
193+
color="primary"
194+
style={styles.instructionsTitle}
195+
>
196+
Installation Instructions
197+
</Text>
198+
<View style={styles.instructionStep}>
199+
<Text variant="bodySmall" color="muted" style={styles.instructionNumber}>
200+
1.
201+
</Text>
202+
<Text variant="bodySmall" color="secondary" style={styles.instructionText}>
203+
Download the APK file to your Android device
204+
</Text>
205+
</View>
206+
<View style={styles.instructionStep}>
207+
<Text variant="bodySmall" color="muted" style={styles.instructionNumber}>
208+
2.
209+
</Text>
210+
<Text variant="bodySmall" color="secondary" style={styles.instructionText}>
211+
Open Settings → Security (or Privacy) → Enable "Install unknown apps" for your
212+
browser
213+
</Text>
214+
</View>
215+
<View style={styles.instructionStep}>
216+
<Text variant="bodySmall" color="muted" style={styles.instructionNumber}>
217+
3.
218+
</Text>
219+
<Text variant="bodySmall" color="secondary" style={styles.instructionText}>
220+
Open the downloaded APK and tap "Install"
221+
</Text>
222+
</View>
223+
<View style={styles.instructionStep}>
224+
<Text variant="bodySmall" color="muted" style={styles.instructionNumber}>
225+
4.
226+
</Text>
227+
<Text variant="bodySmall" color="secondary" style={styles.instructionText}>
228+
Grant permissions for Health Connect (optional, for improved sleep detection)
229+
</Text>
230+
</View>
231+
</View>
232+
</View>
233+
)}
234+
167235
<View style={styles.section}>
168236
<Heading variant="h3" color="primary" style={styles.sectionTitle}>
169237
Credits
@@ -279,6 +347,53 @@ const styles = StyleSheet.create({
279347
linkText: {
280348
flex: 1,
281349
},
350+
sectionTitleRow: {
351+
flexDirection: 'row',
352+
alignItems: 'center',
353+
gap: spacing.sm,
354+
},
355+
sectionTitleText: {
356+
fontSize: 18,
357+
fontWeight: '600',
358+
color: colors.primary[400],
359+
},
360+
downloadButton: {
361+
flexDirection: 'row',
362+
alignItems: 'center',
363+
justifyContent: 'center',
364+
gap: spacing.sm,
365+
padding: spacing.md,
366+
backgroundColor: colors.primary[500],
367+
borderRadius: borderRadius.lg,
368+
marginTop: spacing.sm,
369+
},
370+
downloadButtonText: {
371+
color: colors.gray[950],
372+
},
373+
installInstructions: {
374+
marginTop: spacing.lg,
375+
padding: spacing.md,
376+
backgroundColor: colors.gray[900],
377+
borderRadius: borderRadius.lg,
378+
borderWidth: 1,
379+
borderColor: colors.gray[800],
380+
},
381+
instructionsTitle: {
382+
marginBottom: spacing.sm,
383+
},
384+
instructionStep: {
385+
flexDirection: 'row',
386+
alignItems: 'flex-start',
387+
gap: spacing.sm,
388+
marginTop: spacing.xs,
389+
},
390+
instructionNumber: {
391+
width: 16,
392+
},
393+
instructionText: {
394+
flex: 1,
395+
lineHeight: 20,
396+
},
282397
footer: {
283398
alignItems: 'center',
284399
paddingTop: spacing.xl,

0 commit comments

Comments
 (0)