dart-lang / dart-lang/native

Make android context getter nullable and add listeners for change

Open
#1,254 0 comments 0 reactions 0 assignees View on GitHub
package:jni package:jnigen
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 9h
Merged PRs (30d)
52

Description

> Wouldn't we throw a nice exception if jni related code requires an android context object and it wasn't initialized? (It shouldn't crash, hang or otherwise - it should provide a nice error message explaining the problem and how to address it)

_Originally posted by @mkustermann in https://github.com/dart-lang/http/issues/1241#issuecomment-2202258028_

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating the Android context getter and the JNI-related initialization path, then determine the expected nullable behavior and listener contract from surrounding APIs. Done should be defined by the issue's requested getter and change notifications, along with a clear error path when JNI code lacks an initialized context.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.