Reputation: 935
I use Xamarin Forms for my mobile app. In the initialization of my app I want to load my configuration.
I save it in cache with Akavache.
I launch this method in my onstart method in App.xaml when there is my splash screen.
It works well but when I call Akavache caching the splash screen becomes white. My code continues well but nothing appears on the screen.
It's the same behavior if I request my api instead of using the cache to get the config.
I have also tried to move the GetConfig method in my main activity android part but I have the same behaviour.
If I remove this call, everything works well.
You will find the output below.
I think it's related to GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37808
How can I fix it?
[0:] LogHost: Initializing Akavache
11-19 14:46:06.326 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.326 D/Mono (26273): Searching for 'sqlite3_open_v2'.
11-19 14:46:06.333 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.333 D/Mono (26273): Searching for 'sqlite3_busy_timeout'.
11-19 14:46:06.385 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.385 D/Mono (26273): Searching for 'sqlite3_prepare_v2'.
11-19 14:46:06.398 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.398 D/Mono (26273): Searching for 'sqlite3_step'.
11-19 14:46:06.402 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.402 D/Mono (26273): Searching for 'sqlite3_column_type'.
11-19 14:46:06.408 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.408 D/Mono (26273): Searching for 'sqlite3_column_int'.
11-19 14:46:06.412 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.412 D/Mono (26273): Searching for 'sqlite3_finalize'.
11-19 14:46:06.417 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.418 D/Mono (26273): Searching for 'sqlite3_changes'.
11-19 14:46:06.421 D/Mono (26273): Requesting loading reference 6 (of 10) of
11-19 14:46:06.422 D/Mono (26273): Assembly Ref addref Akavache.Sqlite3[0xefcbab00] -> System.Core[0xefc9ff20]: 10
11-19 14:46:06.497 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.497 D/Mono (26273): Searching for 'sqlite3_column_count'.
11-19 14:46:06.500 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.500 D/Mono (26273): Searching for 'sqlite3_column_name'.
11-19 14:46:06.509 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.509 D/Mono (26273): Searching for 'sqlite3_column_text'.
11-19 14:46:06.509 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:06.509 D/Mono (26273): Searching for 'sqlite3_column_bytes'.
11-19 14:46:07.000 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.000 D/Mono (26273): Searching for 'sqlite3_reset'.
11-19 14:46:07.035 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.035 D/Mono (26273): Searching for 'sqlite3_errmsg'.
11-19 14:46:07.049 I/com.myapp(26273): Waiting for a blocking GC ProfileSaver
11-19 14:46:07.075 I/com.myapp(26273): WaitForGcToComplete blocked ProfileSaver on HeapTrim for 25.617ms
11-19 14:46:07.086 D/ViewRootImpl@3b6f7dc[MainActivity](26273): setView = com.android.internal.policy.DecorView@cbb66b6 TM=true MM=false
11-19 14:46:07.100 D/Mono (26273): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so').
11-19 14:46:07.100 D/Mono (26273): Searching for 'sqlite3_bind_text'.
11-19 14:46:07.197 D/Mono (26273): DllImport searching in: '__Internal' ('(null)').
11-19 14:46:07.197 D/Mono (26273): Searching for 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.197 D/Mono (26273): Probing 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.197 D/Mono (26273): Found as 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-19 14:46:07.219 E/GraphicExt(26273): Can't load libboost_ext_fwk
11-19 14:46:07.219 E/GraphicExt(26273): GraphicExtModuleLoader::CreateGraphicExtInstance false
11-19 14:46:07.219 D/ViewRootImpl@3b6f7dc[MainActivity](26273): Relayout returned: old=(0,0,720,1520) new=(0,0,720,1520) req=(720,1520)0 dur=13 res=0x7 s={true 2995832832} ch=true
11-19 14:46:07.224 D/OpenGLRenderer(26273): createReliableSurface : 0xd3087f40(0xb290c800)
11-19 14:46:07.225 I/GPUD (26273): @gpudInitialize: successfully initialized with 1, dbg=0 mmdump_dbg=0
11-19 14:46:07.244 D/OpenGLRenderer(26273): makeCurrent EglSurface : 0x0 -> 0x0
11-19 14:46:07.244 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.245 I/chatty (26273): uid=10218(com.myapp) RenderThread identical 2 lines
11-19 14:46:07.245 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.248 D/Mono (26273): Requesting loading reference 1 (of 2) of Java.Interop.dll
11-19 14:46:07.248 D/Mono (26273): Loading reference 1 of Java.Interop.dll asmctx DEFAULT, looking for System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
11-19 14:46:07.248 D/Mono (26273): Assembly Ref addref Java.Interop[0xbf22e9e0] -> System.Core[0xefc9ff20]: 11
11-19 14:46:07.257 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.269 I/chatty (26273): uid=10218(com.myapp) RenderThread identical 4 lines
11-19 14:46:07.269 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37808
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37810
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37809
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37811
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37812
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37813
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37814
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37815
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37816
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37817
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37818
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37819
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37820
11-19 14:46:07.270 E/IMGSRV (26273): :0: GetRenderableInternalFormatInfoEntry: Unsupported renderable internal format 37821
11-19 14:46:07.275 D/OpenGLRenderer(26273): makeCurrent EglSurface : 0x0 -> 0xdda1e200
11-19 14:46:07.279 W/Gralloc3(26273): mapper 3.x is not supported
11-19 14:46:07.283 E/ion (26273): ioctl c0044901 failed with code -1: Invalid argument
11-19 14:46:07.288 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.295 I/GPUD (26273): @gpudInitialize: successfully initialized with 4, dbg=0 mmdump_dbg=0
11-19 14:46:07.311 D/ViewRootImpl@3b6f7dc[MainActivity](26273): MSG_WINDOW_FOCUS_CHANGED 1 1
11-19 14:46:07.312 D/InputMethodManager(26273): prepareNavigationBarInfo() DecorView@cbb66b6[MainActivity]
11-19 14:46:07.312 D/InputMethodManager(26273): getNavigationBarColor() -855310
11-19 14:46:07.317 D/InputMethodManager(26273): prepareNavigationBarInfo() DecorView@cbb66b6[MainActivity]
11-19 14:46:07.317 D/InputMethodManager(26273): getNavigationBarColor() -855310
11-19 14:46:07.317 V/InputMethodManager(26273): Starting input: tba=com.myapp ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
11-19 14:46:07.318 D/InputMethodManager(26273): startInputInner - Id : 0
11-19 14:46:07.318 I/InputMethodManager(26273): startInputInner - mService.startInputOrWindowGainedFocus
11-19 14:46:07.396 I/System.out(26273): (HTTPLog)-Static: isSBSettingEnabled false
11-19 14:46:07.396 I/System.out(26273): (HTTPLog)-Static: isSBSettingEnabled false
UPDATES
If I add my call after my method DependencyResolver.Resolve().Initialize() it works.
The method initialize launch the FirstContentPage.
My main activity header: I don't use a splashscreen activity.
[Activity(
Label = "@string/app_name",
Icon = "@drawable/icon",
Theme = "@style/MyTheme.Splash",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.Locale | ConfigChanges.LayoutDirection, ScreenOrientation = ScreenOrientation.Portrait
)
]
My app.xaml.cs OnStart
protected override async void OnStart()
{
base.OnStart();
await UserConfigurationManager.GetAsync(); // Make splash screen blank and no more screens appear
await DependencyResolver.Resolve<INavigationService>().Initialize();
OnResume();
}
// Details of UserConfigurationManager.GetAsync();
if (IsUserLoggedIn)
{
try
{
confsaved = await BlobCache.UserAccount.GetObject<UserConfigurationDto>("loggedconfig");
}
catch
{
}
}
else
{
try
{
confsaved = await BlobCache.UserAccount.GetObject<UserConfigurationDto>("anonymousconfig");
}
catch
{
}
}
Upvotes: 1
Views: 557