RebreakVpnService.onStartCommand crashed with SecurityException because Android 16's validateForegroundServiceType rejects the implicit 2-arg startForeground(). Now passes FOREGROUND_SERVICE_TYPE_SPECIAL_USE explicitly (Google's documented best practice) and guards the call so a failed foreground promotion stops the service cleanly instead of crashing the app. Verified vs reported Galaxy A54 / Android 16 signature (97% of crash events, 1-user crash loop). Bundles pending working-tree work across native/marketing/locales/mac + graphify-out rebuild. gitignore: google-services.json + /screenshots/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
107 lines
2.9 KiB
TypeScript
107 lines
2.9 KiB
TypeScript
import { View, Text, TouchableOpacity } from 'react-native';
|
|
import { Ionicons } from '@expo/vector-icons';
|
|
import { useColors } from '../../lib/theme';
|
|
import { RiveAvatar } from '../RiveAvatar';
|
|
|
|
type Props = {
|
|
onDismiss?: () => void;
|
|
onContribute?: () => void;
|
|
};
|
|
|
|
export function DigaMissionBanner({ onDismiss, onContribute }: Props) {
|
|
const colors = useColors();
|
|
return (
|
|
<View
|
|
style={{
|
|
marginHorizontal: 16,
|
|
marginTop: 16,
|
|
backgroundColor: '#fffbeb',
|
|
borderWidth: 1,
|
|
borderColor: '#fde68a',
|
|
borderRadius: 14,
|
|
padding: 16,
|
|
}}
|
|
>
|
|
<View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 10 }}>
|
|
<View style={{ marginTop: 2 }}>
|
|
<RiveAvatar emotion="idle" size="sm" />
|
|
</View>
|
|
<View style={{ flex: 1 }}>
|
|
<Text
|
|
style={{
|
|
fontSize: 13,
|
|
color: '#854d0e',
|
|
fontFamily: 'Nunito_700Bold',
|
|
}}
|
|
>
|
|
30 Tage geschützt — danke
|
|
</Text>
|
|
<Text
|
|
style={{
|
|
marginTop: 4,
|
|
fontSize: 12,
|
|
color: '#92400e',
|
|
fontFamily: 'Nunito_400Regular',
|
|
lineHeight: 17,
|
|
}}
|
|
>
|
|
Mit ein paar anonymen Angaben hilfst du uns, ReBreak gezielt
|
|
weiterzuentwickeln. Freiwillig, anonym, jederzeit löschbar.
|
|
</Text>
|
|
|
|
<View style={{ flexDirection: 'row', gap: 8, marginTop: 12 }}>
|
|
<TouchableOpacity
|
|
onPress={onContribute}
|
|
activeOpacity={0.7}
|
|
>
|
|
<View style={{
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 7,
|
|
backgroundColor: '#854d0e',
|
|
borderRadius: 8,
|
|
}}>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: '#ffffff',
|
|
fontFamily: 'Nunito_600SemiBold',
|
|
}}
|
|
>
|
|
Beitragen
|
|
</Text>
|
|
</View>
|
|
</TouchableOpacity>
|
|
<TouchableOpacity
|
|
onPress={onDismiss}
|
|
activeOpacity={0.7}
|
|
>
|
|
<View style={{
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 7,
|
|
borderRadius: 8,
|
|
}}>
|
|
<Text
|
|
style={{
|
|
fontSize: 12,
|
|
color: '#92400e',
|
|
fontFamily: 'Nunito_600SemiBold',
|
|
}}
|
|
>
|
|
Später
|
|
</Text>
|
|
</View>
|
|
</TouchableOpacity>
|
|
</View>
|
|
</View>
|
|
<TouchableOpacity
|
|
onPress={onDismiss}
|
|
hitSlop={8}
|
|
activeOpacity={0.5}
|
|
>
|
|
<Ionicons name="close" size={16} color={colors.textMuted} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|