Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ This project was created by Kevin MARVILLE for STUDI. Many thanks to [STUDI](htt

For more information, visit [kvnbbg.fr](https://kvnbbg.fr).

- [Android developer readiness for 2025](doc/android_developer_updates_2025.md)

## Contributors

[![GitHub contributors](https://contrib.rocks/image?repo=Kvnbbg/Vision-Week-Virtual-Exploration)](https://github.com/Kvnbbg/Vision-Week-Virtual-Exploration/graphs/contributors)
Expand Down
64 changes: 64 additions & 0 deletions doc/android_developer_updates_2025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Android Platform & Tooling Updates Developers Must Prepare for in 2025

This briefing consolidates the platform, tooling, and policy changes Android developers need to incorporate into their roadmaps for 2025 releases. It highlights strategic impacts, recommended actions, and references to upstream announcements.

## 1. AI Integration and Toolchain Enhancements
- **Android Studio Narwhal Feature Drop (2025.2.1)** now embeds Gemini 2.5 Pro across code suggestions, refactoring, and issue diagnostics. AI-powered user journey test authoring allows teams to describe flows in natural language and auto-generate device lab executions.
- **Agentic AI capabilities** extend to automated regression discovery and context-aware code reviews; ensure teams adopt the latest Canary or Stable (Meerkat) builds for full functionality.
- **Android AI SDKs** expose on-device personalization primitives, enabling context-rich, privacy-preserving experiences without a round trip to the cloud.

**Action items**
1. Upgrade developer workstations to Android Studio Narwhal 2025.2.1 or Meerkat Stable.
2. Pilot AI-generated test suites for critical user journeys and fold them into CI.
3. Evaluate AI SDK capabilities for contextual suggestions, proactive app actions, and adaptive UI hints.

## 2. Android 16 (API Level 36) Platform Behaviors
- **Safer Intents**: Opt-in manifest flag enforces explicit intent/component mapping and rejects filter matches without actions. Adopt now to eliminate ambiguous routing.
- **Orientation & Multi-Screen Compliance**: Apps must support landscape, portrait, large-screen, and foldable postures—portrait-only locking is no longer permitted. Responsive layouts via Compose adaptive APIs or WindowSizeClass are required.
- **Granular Background Location**: Users can grant precise, approximate, or one-time background access. Update permission prompts, rationale screens, and telemetry handling accordingly.
- **AI-driven Notification Prioritization**: System-level ranking adapts alerts to user behavior. Mark notifications with `NotificationChannel` importance and supply contextual metadata to remain visible.
- **Multi-Device SDK**: Seamless handoff and session continuity across phones, tablets, wearables, and cars. Integrate session tokens and shared task flows.

**Action items**
1. Target API 36 early; run compatibility testing with safer intents enabled.
2. Audit layouts for large screens and foldables, adopting Compose adaptive components or responsive XML resources.
3. Revisit location usage documentation and implement fallback behaviors when only approximate data is granted.
4. Annotate notifications with semantic categories and channel metadata to cooperate with dynamic prioritization.
5. Prototype handoff scenarios using the Multi-Device SDK.

## 3. UI & Development Experience Upgrades
- **Jetpack Compose 1.6** delivers ~25% faster frame rendering, reduced UI-thread latency, and tighter tooling integration. Migration unlocks Material 3 Expressive design kits and new accessibility primitives.
- **Material 3 Expressive** widens dynamic color, typography, and motion standards to maintain parity across Android and Desktop form factors.
- **Lint & Policy Guidance**: Android Studio surfaces proactive warnings tied to Google Play policy clauses, reducing release-time rejections.

**Action items**
1. Upgrade Compose dependencies to 1.6+ and measure rendering improvements via Macrobench or JankStats.
2. Refresh design tokens using Material 3 Expressive palettes and typography.
3. Incorporate new lint rules into CI/CD to catch policy blockers pre-submission.

## 4. Security and Policy Shifts
- **Policy-aware lint checks**: IDE now flags policy compliance risks (user data access, permissions misuse). Treat warnings as blockers.
- **Safer distribution**: Google signals a 2026 requirement for developer registration to sideload on certified devices—plan for verified publisher workflows.
- **Secrets & Supply Chain**: Reinforce signing, provenance, and artifact verification as Play tightening continues.

**Action items**
1. Adopt lint baselines enforcing policy-related checks.
2. Document sideload/testing workflows in anticipation of 2026 registration requirements.
3. Expand SBOM generation and artifact signing in CI/CD pipelines.

## 5. Integration Timeline
| Quarter | Focus | Key Deliverables |
| --- | --- | --- |
| Q1 2025 | Tooling adoption | Studio Narwhal rollout, AI testing POC, Compose 1.6 upgrade spike |
| Q2 2025 | Platform compliance | API 36 compatibility, Safer Intents opt-in, adaptive UI retrofits |
| Q3 2025 | Experience enhancement | Multi-device handoffs, Material 3 expressive refresh, AI-driven personalization features |
| Q4 2025 | Governance & policy | Policy lint gating, distribution workflow updates, SBOM & signing automation |

## 6. Reference Links
- Android Studio Narwhal Feature Drop – Google Developers Blog (May 2025)
- Android 16 Behavior Changes – developer.android.com
- Agentic Android experiences – Android Developers Blog (Oct 2025)
- Google Play policy updates & lint integration – developers.google.com/android/latest-updates
- Industry analysis on policy tightening – Forbes (Oct 2025)

Keep this document alongside release planning artifacts and integrate action items into the product roadmap to maintain compliance and competitive feature velocity in 2025.
19 changes: 16 additions & 3 deletions input_validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
// Maintainer: Kevin Marville

import 'dart:convert';
import 'dart:math';
import 'package:crypto/crypto.dart';
import 'package:validators/validators.dart';
import 'package:email_validator/email_validator.dart';

/// Classe principale pour la validation et sanitization des entrées
class InputValidator {
static final Random _secureRandom = Random.secure();
// Expressions régulières pour la validation
Comment on lines 13 to 15

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard generateSecureToken against web platforms lacking Random.secure

The token generation now stores a Random.secure() instance in a static field. On Dart/Flutter web targets Random.secure() is unimplemented and throws UnsupportedError, so any web build that calls InputValidator.generateSecureToken() (e.g., CSRF fallback or salt generation) will crash instead of producing a token. If this validator is shared with web clients, authentication flows break outright. Provide a platform-aware fallback or defer to Random()/crypto APIs when Random.secure is unavailable.

Useful? React with 👍 / 👎.

static final RegExp _nameRegex = RegExp(r'^[a-zA-ZÀ-ÿ\s\-\']{2,50}$');
static final RegExp _passwordRegex = RegExp(r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$');
Expand Down Expand Up @@ -241,11 +243,22 @@ class InputValidator {
.replaceAll("'", ''');
}

static const String _tokenAlphabet =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';

/// Génère un token sécurisé
static String generateSecureToken([int length = 32]) {
final bytes = List<int>.generate(length, (i) =>
DateTime.now().millisecondsSinceEpoch + i);
return sha256.convert(bytes).toString().substring(0, length);
if (length <= 0) {
throw ArgumentError.value(length, 'length', 'Token length must be positive');
}

final buffer = StringBuffer();

for (var i = 0; i < length; i++) {
buffer.write(_tokenAlphabet[_secureRandom.nextInt(_tokenAlphabet.length)]);
}

return buffer.toString();
}

/// Hash un mot de passe avec salt
Expand Down
Loading