From lukedupin at gmail.com Fri Feb 12 23:32:13 2016 From: lukedupin at gmail.com (Luke Dupin) Date: Fri, 12 Feb 2016 14:32:13 -0800 Subject: [Android-development] =?utf-8?q?=E2=80=9Cgps_requires_ACCESS=5FFI?= =?utf-8?q?NE=5FLOCATION=E2=80=9D_error_and_workaround_on_Android_A?= =?utf-8?q?PI_23+?= Message-ID: As of Android API 23, there is a new way to request location permissions. It doesn't look like QT5.6 beta has been updated to use this method, so I wrote a quick work around. This API 23 change might affect the camera and contacts permissions also, I'm not sure. Before anyone says, I already have the fine location permission in my manifest: Inside your android project, create a template. In the manifest, change: android:name="org.qtproject.qt5.android.bindings.QtActivity" to: android:name="com.my_company.my_project.MyActivity" Create the path inside your android template directory: src/com/my_company/my_project Now create the extended activity which requests the permissions as follows: public class MyActivity extends QtActivity{ private static final String[] LOCATION_PERMS={ Manifest.permission.ACCESS_FINE_LOCATION }; private static final int LOCATION_REQUEST = 1337; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Ensure we can run the app if ( !canAccessLocation() ) requestPermissions( LOCATION_PERMS, LOCATION_REQUEST ); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { //Figure out what was given to us switch(requestCode) { case LOCATION_REQUEST: if ( canAccessLocation() ) log("Access to location is granted"); else log("Access to location is denied"); break; } } private boolean hasPermission(String perm) { return ( PackageManager.PERMISSION_GRANTED == checkSelfPermission(perm) ); } public boolean canAccessLocation() { return hasPermission(Manifest.permission.ACCESS_FINE_LOCATION); } public static void log( String s ) { Log.d("Radius", s ); } } This "fix" was taken from the following post: http://stackoverflow.com/questions/32083913/android-gps-requires-access-fine-location-error-even-though-my-manifest-file -------------- next part -------------- An HTML attachment was scrubbed... URL: From maitai at virtual-winds.org Sat Feb 13 07:35:10 2016 From: maitai at virtual-winds.org (maitai) Date: Sat, 13 Feb 2016 07:35:10 +0100 Subject: [Android-development] =?utf-8?q?=E2=80=9Cgps_requires_ACCESS=5FFI?= =?utf-8?q?NE=5FLOCATION=E2=80=9D_error_and_workaround_on_Android_API_23+?= In-Reply-To: References: Message-ID: <45d08a6543cf075f9c685ce439617595@virtual-winds.org> That seems important indeed, thanks for sharing Any plan on qt side for that? Philippe Lelong Le 12-02-2016 23:32, Luke Dupin a écrit : > As of Android API 23, there is a new way to request location permissions. It doesn't look like QT5.6 beta has been updated to use this method, so I wrote a quick work around. This API 23 change might affect the camera and contacts permissions also, I'm not sure. > > Before anyone says, I already have the fine location permission in my manifest: > > > Inside your android project, create a template. In the manifest, change: > android:name="org.qtproject.qt5.android.bindings.QtActivity" > to: > android:name="com.my_company.my_project.MyActivity" > > Create the path inside your android template directory: > src/com/my_company/my_project > > Now create the extended activity which requests the permissions as follows: > > public class MyActivity > extends QtActivity > { > private static final String[] LOCATION_PERMS={ > Manifest.permission.ACCESS_FINE_LOCATION > }; > > private static final int LOCATION_REQUEST = 1337; > > @Override > public void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > > //Ensure we can run the app > if ( !canAccessLocation() ) > requestPermissions( LOCATION_PERMS, LOCATION_REQUEST ); > } > > @Override > public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) > { > //Figure out what was given to us > switch(requestCode) > { > case LOCATION_REQUEST: > if ( canAccessLocation() ) > log("Access to location is granted"); > else > log("Access to location is denied"); > break; > } > } > > private boolean hasPermission(String perm) > { > return ( PackageManager.PERMISSION_GRANTED == checkSelfPermission(perm) ); > } > > public boolean canAccessLocation() > { > return hasPermission(Manifest.permission.ACCESS_FINE_LOCATION); > } > > public static void log( String s ) > { > Log.d("Radius", s ); > } > } > > This "fix" was taken from the following post: > http://stackoverflow.com/questions/32083913/android-gps-requires-access-fine-location-error-even-though-my-manifest-file [2] > > _______________________________________________ > Android-development mailing list > Android-development at qt-project.org > http://lists.qt-project.org/mailman/listinfo/android-development [1] Links: ------ [1] http://lists.qt-project.org/mailman/listinfo/android-development [2] http://stackoverflow.com/questions/32083913/android-gps-requires-access-fine-location-error-even-though-my-manifest-file -------------- next part -------------- An HTML attachment was scrubbed... URL: From eskil.abrahamsen-blomfeldt at theqtcompany.com Mon Feb 15 10:36:31 2016 From: eskil.abrahamsen-blomfeldt at theqtcompany.com (Eskil A. Blomfeldt) Date: Mon, 15 Feb 2016 10:36:31 +0100 Subject: [Android-development] =?utf-8?q?=E2=80=9Cgps_requires_ACCESS=5FFI?= =?utf-8?q?NE=5FLOCATION=E2=80=9D_error_and_workaround_on_Android_API_23+?= In-Reply-To: References: Message-ID: <56C19C1F.2010005@theqtcompany.com> On 12. feb. 2016 23:32, Luke Dupin wrote: > > As of Android API 23, there is a new way to request location > permissions. It doesn't look like QT5.6 beta has been updated to use > this method, so I wrote a quick work around. This API 23 change might > affect the camera and contacts permissions also, I'm not sure. > Hi, Thanks for the work around. By default, Qt applications should not be affected (or currently support) the new permission model in Android 6 since the target SDK version is set to 14. The applications should continue to work normally as long as you do this. Adapting Qt to support the new permission model is work that needs to be done, definitely. -- Eskil -------------- next part -------------- An HTML attachment was scrubbed... URL: From pramod.jadhav at citiustech.com Mon Feb 15 11:27:08 2016 From: pramod.jadhav at citiustech.com (Pramod Jadhav) Date: Mon, 15 Feb 2016 10:27:08 +0000 Subject: [Android-development] QSQLCIPHER driver not loaded In-Reply-To: <56C19C1F.2010005@theqtcompany.com> References: , <56C19C1F.2010005@theqtcompany.com> Message-ID: ________________________________ Hi, This is Pramod Jadhav. I am installed sqlcipher library. From command line the database encryption & decryption is working properly, but when I try to encrypt the database from QT it gives the error. QSqlDatabase: QSQLCIPHER driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 Please give me a reply ASAP. Thanks & Regards, Pramod Jadhav. -------------- next part -------------- An HTML attachment was scrubbed... URL: From krnekit at gmail.com Mon Feb 15 13:10:56 2016 From: krnekit at gmail.com (Nikita Krupenko) Date: Mon, 15 Feb 2016 14:10:56 +0200 Subject: [Android-development] QSQLCIPHER driver not loaded In-Reply-To: References: <56C19C1F.2010005@theqtcompany.com> Message-ID: Library is not enough, Qt need also SQL driver for this database type. And you should compile/install it separately as it is not shipped with Qt. 2016-02-15 12:27 GMT+02:00 Pramod Jadhav : > > ________________________________ > > Hi, > This is Pramod Jadhav. I am installed sqlcipher library. From command line > the database encryption & decryption is working properly, but when I try to > encrypt the database from QT > it gives the error. > > QSqlDatabase: QSQLCIPHER driver not loaded > QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 > > Please give me a reply ASAP. > > > Thanks & Regards, > Pramod Jadhav. > > > _______________________________________________ > Android-development mailing list > Android-development at qt-project.org > http://lists.qt-project.org/mailman/listinfo/android-development > From pramod.jadhav at citiustech.com Mon Feb 15 15:13:10 2016 From: pramod.jadhav at citiustech.com (Pramod Jadhav) Date: Mon, 15 Feb 2016 14:13:10 +0000 Subject: [Android-development] Sqlcipher issue Message-ID: Hi All, I am following the below steps to build & install the sqlcipher on ubuntu. https://www.zetetic.net/sqlcipher/open-source/ git clone https://github.com/sqlcipher/sqlcipher.git Compiling with static linking: (replace /path/to with the path to libcrypto.a) ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/path/to/libcrypto.a" make Compiling with dynamic linking: ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" make It compile successfully & generate a libsqlcipher.so file. >From command line the database encryption is done properly. I am given the path of libsqlcipher.so in my QT project. But it gives me error QSqlDatabase: QSQLCIPHER driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 How can I solve this error. I am using QT5.5 on Ubuntu 14.04. Thanks & Regards, Pramod Jadhav. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanbn at t-online.de Fri Feb 5 16:16:52 2016 From: stefanbn at t-online.de (stefanbn at t-online.de) Date: Fri, 5 Feb 2016 16:16:52 +0100 (MET) Subject: [Android-development] Errors running Android Emulator: eglSurfaceAttrib not implemented Message-ID: <1454685412738.294857.9bb23ef073198d4eeda209eccef381a9b9bef8f4@spica.telekom.de> Hello all, I have been asking this question to the Qt Forums and was redirected here .. I can't get the Android Emulator to work with Qt QML apps at all, even not with the Qt Examples. I'm developing on Windows 7, Intel i7, Qt 5.5.1, QtCreator 3.6.0 I use the most recent versions for Ant, Android NDK and SDK. I use Android x86 with Intel HXVA (but also tried different versions), also I tried different SDK Levels: 19, 21, 22 ... all result in the same errors (here for the QML Caluclator example): W/System.err( 2444): java.lang.ClassNotFoundException: android.graphics.drawable.RippleDrawable W/System.err( 2444): at java.lang.Class.classForName(Native Method) [...] W/EGL_emulation( 2444): eglSurfaceAttrib not implemented D/OpenGLRenderer( 2444): Enabling debug mode 0 F/libc ( 2444): Fatal signal 8 (SIGFPE) at 0xb7744ac8 (code=1), thread 2458 (xample.calqlatr) The app either crashes or shows a white screen on the emulator. I googled a lot for the eglSurfaceAttrib error and there are several posts without any good solution. On the web there are suggestions to disable the "Use Host GPU" setting in the AVD Manager which changes the behavior a little, but doesn't work either. Is there any solution for this? Any help is more than appreciated! Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From bog_dan_ro at yahoo.com Tue Feb 16 11:34:04 2016 From: bog_dan_ro at yahoo.com (BogDan) Date: Tue, 16 Feb 2016 10:34:04 +0000 (UTC) Subject: [Android-development] Errors running Android Emulator: eglSurfaceAttrib not implemented In-Reply-To: <1454685412738.294857.9bb23ef073198d4eeda209eccef381a9b9bef8f4@spica.telekom.de> References: <1454685412738.294857.9bb23ef073198d4eeda209eccef381a9b9bef8f4@spica.telekom.de> Message-ID: <646663605.3842117.1455618845025.JavaMail.yahoo@mail.yahoo.com> Hi, Make sure you have selected "Use host GPU"/"GPU Emulation" on your AVDs. Cheers,BogDan. On Monday, February 15, 2016 8:10 PM, "stefanbn at t-online.de" wrote: Hello all,  I have been asking this question to the Qt Forums and was redirected here .. I can't get the Android Emulator to work with Qt QML apps at all, even not with the Qt Examples. I'm developing on Windows 7, Intel i7, Qt 5.5.1, QtCreator 3.6.0 I use the most recent versions for Ant, Android NDK and SDK. I use Android x86 with Intel HXVA (but also tried different versions), also I tried different SDK Levels: 19, 21, 22 ... all result in the same errors (here for the QML Caluclator example): W/System.err( 2444): java.lang.ClassNotFoundException: android.graphics.drawable.RippleDrawable W/System.err( 2444): at java.lang.Class.classForName(Native Method) [...] W/EGL_emulation( 2444): eglSurfaceAttrib not implemented D/OpenGLRenderer( 2444): Enabling debug mode 0F/libc ( 2444): Fatal signal 8 (SIGFPE) at 0xb7744ac8 (code=1), thread 2458 (xample.calqlatr) The app either crashes or shows a white screen on the emulator. I googled a lot for the eglSurfaceAttrib error and there are several posts without any good solution. On the web there are suggestions to disable the "Use Host GPU" setting in the AVD Manager which changes the behavior a little, but doesn't work either. Is there any solution for this? Any help is more than appreciated! Stefan _______________________________________________ Android-development mailing list Android-development at qt-project.org http://lists.qt-project.org/mailman/listinfo/android-development -------------- next part -------------- An HTML attachment was scrubbed... URL: