Improve getting the current context
See original GitHub issueSummary
Getting the current activity is not done quite correctly.
public static partial class Platform
{
static Activity currentActivity;
internal static Activity AppActivity
=> currentActivity
?? throw ExeptionHelper.ActivityNotDetected;
}
Maybe we could replace this with a IActivityLifecycleCallbacks
or the Android.App.Application.Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
android - How to get the current context?
It just doesn't seem fine that the subactivity is aware of its creator, not to mention interact with it.
Read more >Use Context Filters
To create a context filter, select Add to Context from the context menu of an existing categorical filter. The context is computed once...
Read more >CONTEXT() - AppSheet Help
Returns contextual information about the running app based on the keyword option specified. Get started. Watch this video to get started using CONTEXT()...
Read more >Understanding Current Context
The current context determines which buffer fields can be contextually referenced from PeopleCode, and which row of data is the current row on...
Read more >Context in DAX Formulas
Context enables you to perform dynamic analysis, in which the results of a formula can change to reflect the current row or cell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pictos @ahoefling Hi. Thanks. I would not like to add a dependency on Xamarin.Forms to the plugin I could use a
Android.Content.Context
but then I won’t be able to callStartActivityForResult
methodI have one idea, I will try to do it soon. I’ll be happy if you watch it.
That won’t work because this does not take a dependency on Xamarin.Forms. I am going to try and submit a PR for you all to look at that might solve this problem.