This repository was archived by the owner on Jul 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -27,4 +27,5 @@ v2.2.5 - Fix CopyDatabase indexOf to lastIndexOf - Thanks Webleaf
27
27
v2.2.6 - Forgot to include the ios sqlite helper in v2.2.4/v2.2.5
28
28
v2.3.0 - Several minor issues fixed, Multi-threading added to Sqlite
29
29
v2.3.1 - iOS SQLExec bind returns the wrong error value
30
- v2.3.2 - Added Promise tests, started ES6 updated.
30
+ v2.3.2 - Added Promise tests, started ES6 updated.
31
+ v2.3.3 - In some worker situations, the context cannot be retrieved, added additional method to get context.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-sqlite" ,
3
- "version" : " 2.3.2 " ,
3
+ "version" : " 2.3.3 " ,
4
4
"description" : " A sqlite NativeScript module for Android and iOS" ,
5
5
"main" : " sqlite" ,
6
6
"nativescript" : {
Original file line number Diff line number Diff line change 5
5
*
6
6
* Any questions please feel free to put a issue up on github
7
7
* Nathan@master-technology.com http://nativescript.tools
8
- * Version 2.3.1 - Android
8
+ * Version 2.3.2 - Android
9
9
*************************************************************************************/
10
10
11
11
/* global global, require, module */
@@ -975,12 +975,22 @@ function _getContext() {
975
975
if ( appModule . android . context ) {
976
976
return ( appModule . android . context ) ;
977
977
}
978
+ if ( typeof appModule . getNativeApplication === 'function' ) {
979
+ let ctx = appModule . getNativeApplication ( ) ;
980
+ if ( ctx ) {
981
+ return ctx ;
982
+ }
983
+ }
984
+
985
+
978
986
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
979
- let ctx = java . lang . Class . forName ( "android.app.AppGlobals" ) . getMethod ( "getInitialApplication" , null ) . invoke ( null , null ) ;
987
+ ctx = java . lang . Class . forName ( "android.app.AppGlobals" ) . getMethod ( "getInitialApplication" , null ) . invoke ( null , null ) ;
980
988
if ( ctx ) return ctx ;
981
989
982
990
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
983
991
ctx = java . lang . Class . forName ( "android.app.ActivityThread" ) . getMethod ( "currentApplication" , null ) . invoke ( null , null ) ;
992
+ if ( ctx ) return ctx ;
993
+
984
994
return ctx ;
985
995
}
986
996
You can’t perform that action at this time.
0 commit comments