gpt4 book ai didi

android - ContentProvider 何时真正创建?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:56:39 25 4
gpt4 key购买 nike

我有一个在 list 中声明的​​ ContentProvider,它是什么时候真正创建的?当应用程序启动时但在启动第一个 Activity 之前?当第一次查询/更新/插入完成时?什么时候?

最佳答案

来自 http://developer.android.com/reference/android/content/ContentProvider.html#onCreate() :

Implement this to initialize your content provider on startup. This method is called for all registered content providers on the application main thread at application launch time. It must not perform lengthy operations, or application startup will be delayed.

关于android - ContentProvider 何时真正创建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3483977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com