Skip to content

Unuseable On Android 10, sql error -> un #155

@gmanic

Description

@gmanic

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Have Android 10 installed with latest (Nov) patchlevel
  2. Start app
  3. See error - multiple popups with the following error message

`Invalid SQL - use default instead
SQL-error 'Invalid column max(width, height) as col_width'

SELECT _id._data AS disp_text, max(width, height) AS col_width, longitude, datetaken, _data, orientation
FROM content://media/external/file
WHERE (( media_type=1)) `

The app has to be killed with the app switcher. There is no log written.

Expected behavior
Start of App showing map with photos.

Smartphone (please complete the following information):

Additional context
Add any other context about the problem here.

Crash Report
If you report an app crash: Can you add the crash logfile to this ticket?

When APhotoManager crashes it tries to write a crash log file in the Error Log Folder.

  • [ExternalStorageDirectory]/copy/log/androFotofinder.logcat-2017....txt
    • i.e. /storage/sdcard0/copy/log/androFotofinder.logcat-20170728-135704.txt
      • crash data from 2017-07-28 13:57

For more details on Error Loging see diagnostic settings.


[Update 2020-04-13]

Technical Problem

Android-10 (api29) prevents apps from using sql-functions on media-content-provider colums where APhotoManager heavily depends on.

To achive android-10 compatibility i have seperated all database access logic into a seperate layer where there are two implementations for:

  • A Contentprovider-implementation for android-9 and below
    ** is used since APhotoManager-0.8.1
  • A database implementation that works with a data clone of media-contentprovider
    ** will be used in android-10 and up, when finished
    ** done: code to one-time copy all data from media-contentprovider to database
    ** done: code to query database
    ** done: datachanges from within APhotoManager are written to media-contentprovider and to database
    ** open todo: when changes are done to media-contentprovider outside APhotoManager (i.e. when camera shoots a photo) the changes must be transfered to database, too

Currently work on this ticket is stopped, because i work on sd-card-support #169 to make APhotoManager run on my new android-9 device.

[Update k3b 20210122]

since android-10 it is not allowed to query the media database for latitude/longitude any more ( https://developer.android.com/reference/android/provider/MediaStore.Images.ImageColumns#LATITUDE ) :-(

As consequence APhotoManager needs

  • its own local copy of the media database
  • a full media rescan (or the import of the gps data through a csv file).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions