Compare commits

...

23 Commits

Author SHA1 Message Date
LubuWest 48a70b8395 version v0.6.7 with moderation
2 months ago
LubuWest 5f8edccdfe Changes for upload to Playstore
4 months ago
LubuWest 400241ec6a create and delete events
4 months ago
LubuWest 27cd83db3c Patch files for Faltpak autostart and mobile
1 year ago
LubuWest 48a904b8c0 bugfixes reply in Friendica 3/2022 and image download
1 year ago
LubuWest 4ffae4ac31 bugfixes timeline refresh and screenshots
1 year ago
LubuWest 5032c78de1 v0.6.4 contact search
1 year ago
LubuWest 66e5c33b00 v0.6.3 Dark Mode
1 year ago
LubuWest 06499466be v0.6.2 Flatpak link in Readme
2 years ago
LubuWest d09a55bcd9 v0.6.2 Bugfix: download and upload public images, comments in timeline
2 years ago
LubuWest baccd64303 v0.6.2 Follow and Unfollow contacts, Systray on Linux
2 years ago
LubuWest 1d62a8ddc1 v0.6.1 WebView patch
2 years ago
LubuWest c5df85b820 v0.6.1 no conversation update with news length 0
2 years ago
LubuWest 72d0f8ff69 v0.6.1 Changelog
2 years ago
LubuWest ee851789ee v0.6.1 Flatpak preparation and update on start for Linux
2 years ago
LubuWest 30bc7df431 version v0.6.1 requestLegacyExternalStorage in AndroidManifest and changelog typo
2 years ago
LubuWest 8d388af6b9 version v0.6 changelog and Android drawer width
2 years ago
LubuWest 8b58785517 version v0.6 bugfixes
2 years ago
LubuWest 8482bde3ed version v0.6
2 years ago
LubuWest bdc28e632e correct place for filesystemandroid.cpp
2 years ago
LubuWest 21dee36398 new version with hashtags and permissions
2 years ago
LubuWest 56bdb80ea0 new version with hashtags
2 years ago
LubuWest d81ad52031 Link to AUR
3 years ago

@ -1,137 +1,208 @@
## v0.5.3 ##
* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03
* Indentation to see replied to newsitem for conversation view
* News view type config moved from account page to config page
* Simplification of account page on first start
* Bugfixes
## v0.6.7
* Upload multiple images for post and add image descriptions
* Block user
* Report user
* Create Calendar entry from post text
## v0.5.2 ##
* Redesign of news item
* Background sync for Android >8.0
* Bugfixes
## v0.6.6
* Create event
* Delete event
* New sorting of conversations
## v0.5.1 ##
* Videos open in full screen
* Youtube videos open in app
* Option to minimize #nsfw post
* Rotate image in messageSend component
## v0.6.5
## v0.5 ##
* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header
* Android Notifications for News, DMs, Replies
* Global app config separated from account config
* Fix reply in Friendica 3/2022 version due to API bug
* Image downloads work again
* Some additional emojis
## v0.6.4
## v0.4 ##
* Background sync for friends timeline (interval on config page must be > 0) for Android > 5
* Replies timeline
* Bugfix: App asks for storage permission on first start
* Search for new contacts (hashtags, names)
* Filter contacts
* many new emojis
* Replaced Favorite button with Reply button due to buggy Favourite API
* Rebuild contacts handling due to buggy Contacts API
* Removed permissions for new messages due to buggy Contacts API
* Sync all accounts in background (not only active)
## v0.3.4 ##
* Direct message creation from profile page works again
* Profile image upload works again
* Viewing private album pictures of contacts works again
* On first start servername from https://dir.friendica.social/servers/surprise selected
* Register button opens webview of registration page on server
## v0.6.3
* Dark theme
* Account Page: list of largest servers for server field
* Settings page: Tabs for different settings
* Conversation opens on short click on news item
* Linux: Option to Autostart on System start
## v0.3.3 ##
* Update for OpenSSL and At
* Experimental support for Peertube (links are expanded to video widget)
* Some Unicode emojis
* Redesign of contact details (click on contact opens in new stack and shows last news)
## v0.6.2
* Follow and Unfollow contacts (Friendica 2021.07 required)
* Linux: App stays in systemtray after close, syncs in background
* bugfix for bulk image upload and download of public images
* bugfix for conversations in timeline
## v0.3.2 ##
* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app
* Pictures can be renamed or moved to another album
* Bugfix: random crashes for conversations
* Bugfix: attach image to message works again
* Bugfix: check for nickname on Server has been removed due to API change
## v0.6.1
* Add requestLegacyExternalStorage in AndroidManifest for attachment permissions
* Refresh timeline on start for Linux
* DropArea bugfix for Flatpak
## v0.3.1 ##
* By popular demand: Conversations open in a new stack, like in Twidere
* Conversations open after (long) press on news, like in Twidere
* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8)
* New messages are html, line breaks work (solves issue #7)
## v0.6
* New language: Hungarian thank to urbalazs (https://www.urbalazs.hu)
* Multiple photos in post open in separate slideshow
* Layout redesign
* Adaptive sidebar
* Sync Friendship Requests, approve/deny/ignore requests
* Events: show upcoming events below calendar
* Linux: Drag&Drop for new messages and photo upload
* Linux: Remember app size
## v0.3 ##
* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6)
* Refactoring of news part
* Search button for news
* Click on hashtag in newsitem starts search for news with that word
* Public timeline
* Timeline for selected group
* Small redesign of SendMessage page
## v0.5.3
* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03
* Indentation to see replied to newsitem for conversation view
* News view type config moved from account page to config page
* Simplification of account page on first start
* Bugfixes
## v0.2.2 ##
* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5)
* Link to list of public server on Config Tab
* Small redesign of SendMessage page
* Intents for texts/urls (Send text or url from everywhere to create message)
## v0.5.2
* Redesign of news item
* Background sync for Android >8.0
* Bugfixes
## v0.2.1 ##
* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4)
* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689)
* Long posts are automatically truncated
* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album)
## v0.5.1
* Videos open in full screen
* Youtube videos open in app
* Option to minimize #nsfw post
* Rotate image in messageSend component
## v0.2 ##
# News #
* Profile image download completely reworked, resulting in speed improvement
## v0.5
# Contacts #
* New profile tab, data of public and private profiles shown
* Change profile picture
* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived!
* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required)
* News button for forum accounts shows news published via that forum
* Redesign due to QML Components 1 being deprecated in Qt 5.12: Slideview for News, left Drawer for Settings, message creation in listview header
* Android Notifications for News, DMs, Replies
* Global app config separated from account config
# Images #
* Complete rework of image download, fixes bug with private images
* Download all or only new images
## v0.4
# Config #
* Check if nickname exist on server
* Check if password is correct
* Account deletion now also removes news, image data and events from local db
* Background sync for friends timeline (interval on config page must be > 0) for Android > 5
* Replies timeline
* Bugfix: App asks for storage permission on first start
# Translations #
* Italian thanks to Davide de Prisco
## v0.3.4
* Direct message creation from profile page works again
* Profile image upload works again
* Viewing private album pictures of contacts works again
* On first start servername from https://dir.friendica.social/servers/surprise selected
* Register button opens webview of registration page on server
## v0.3.3
* Update for OpenSSL and At
* Experimental support for Peertube (links are expanded to video widget)
* Some Unicode emojis
* Redesign of contact details (click on contact opens in new stack and shows last news)
## v0.3.2
* For news containing url ending with mp3, mp4, avi, webm, ogg: media can be played in app
* Pictures can be renamed or moved to another album
* Bugfix: random crashes for conversations
* Bugfix: attach image to message works again
* Bugfix: check for nickname on Server has been removed due to API change
## v0.3.1
* By popular demand: Conversations open in a new stack, like in Twidere
* Conversations open after (long) press on news, like in Twidere
* Image attachments are shown below text and can be enlarged, like in Twidere (solves issue #8)
* New messages are html, line breaks work (solves issue #7)
## v0.3
* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6)
* Refactoring of news part
* Search button for news
* Click on hashtag in newsitem starts search for news with that word
* Public timeline
* Timeline for selected group
* Small redesign of SendMessage page
## v0.2.2
* Fix for [issue 5](https://github.com/LubuWest/Friendiqa/issues/5)
* Link to list of public server on Config Tab
* Small redesign of SendMessage page
* Intents for texts/urls (Send text or url from everywhere to create message)
## v0.2.1
* Fix for [issue 4](https://github.com/LubuWest/Friendiqa/issues/4)
* Fix for Friendica [issue 4689](https://github.com/friendica/friendica/issues/4689)
* Long posts are automatically truncated
* Intents for pictures (Send one image from gallery: attach to message, send multiple images: upload to album)
## v0.2
# News
* Profile image download completely reworked, resulting in speed improvement
# Contacts
* New profile tab, data of public and private profiles shown
* Change profile picture
* For friends image button shows private images thanks to new remoteAuth API (Friendica 3.6 server required) --> private holiday pictures have finally arrived!
* For friends calendar button shows private events thanks to new remoteAuth API (Friendica 3.6 server required)
* News button for forum accounts shows news published via that forum
# Images
* Complete rework of image download, fixes bug with private images
* Download all or only new images
# Config
* Check if nickname exist on server
* Check if password is correct
* Account deletion now also removes news, image data and events from local db
# Translations
* Italian thanks to Davide de Prisco
## v0.1.2##
* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above
* FIX: Include openssl v1.0.2m for SSL connections in Android v7 and above
## v0.1.1##
* FIX: Spanish translation
* FIX: Empty Newsview after deletion of first newsitem
* FIX: Spanish translation
* FIX: Empty Newsview after deletion of first newsitem
## v0.1##
# News #
# News
* Native Android image selector for new message
* Click on contacts shows contact details on news page
* Fix problem with news list after deletion of item
# Contacts
* Clean contacts with no news
* Native Android image selector for new message
* Click on contacts shows contact details on news page
* Fix problem with news list after deletion of item
# Images
# Contacts #
* Clean contacts with no news
* Upload pictures with description to album (permissions cannot be set due to API problems)
* Delete pictures or albums from client and server (long press on picture in overview)
* Fix problem when enlarging photo
# Images #
* Upload pictures with description to album (permissions cannot be set due to API problems)
* Delete pictures or albums from client and server (long press on picture in overview)
* Fix problem when enlarging photo
# Translations
# Translations #
* German, Spanish
* German, Spanish

@ -0,0 +1,12 @@
--- source-linux/common/filesystem.cpp
+++ source-linux/common/filesystem.cpp
@@ -178,7 +178,7 @@
QTextStream stream(&file);
stream << "[Desktop Entry]" << Qt::endl;
stream << "Name=Friendiqa" << Qt::endl;
- stream << "Exec=friendiqa -background %u" << Qt::endl;
+ stream << "Exec=flatpak run de.manic.friendiqa -background %u" << Qt::endl;
stream << "Terminal=false" << Qt::endl;
stream << "Icon=Friendiqa.svg" << Qt::endl;
stream << "Type=Application" << Qt::endl;

@ -0,0 +1,11 @@
--- source-linux/qml/friendiqa.qml
+++ source-linux/qml/friendiqa.qml
@@ -193,7 +193,7 @@
color: Material.backgroundColor
}
- header: ToolBar{
+ footer: ToolBar{
background: Rectangle{
anchors.fill: parent
color: Material.backgroundDimColor

@ -1,123 +1,136 @@
## Friendiqa ##
QML based client for the Friendica Social Network.
Tabs for news (incl. Direct Messages), friends, photos and events.
OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync).
Source code is a QtCreator project.
## Screenshots ##
![Newstab](Screenshots/NewsTab.jpg)
![Friendstab](Screenshots/FriendsTab.jpg)
![Photostab](Screenshots/PhotoTab.jpg)
![Eventstab](Screenshots/EventsTab.jpg)
![Configtab](Screenshots/ConfigTab.jpg)
## Features ##
# News #
Currently supported:
* Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline
* Background sync with configurable interval of 15 min to 2h for active user for friends timeline, replies and DMs (Android 5.1 required)
* Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs
* Search for news
* Click on hashtag in newsitem starts search for news with that word
* Click on image shows image fullscreen
* Click on video or youtube video shows video fullscreen
* For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app
* Open links in external browser
* Click on contact photo for contact details and last news
* Click on like text for additional contact info
* Deletion, Reposting, Answering of Posts
* Expand truncated news items
* Liking, disliking, favoriting
* Attending for event posts
* Update fetches new posts (up to last 50) since last in local DB
* More shows older posts from local DB
* Create new Message with images or direct messages, Contact/Group access rights (can be stored), smileys
* Send image from Android gallery
* Send text or urls from other apps to Friendiqa
* Native Android image dialog
ToDo:
* Videos and other binary data as attachment (sending, not supported in API)
* More than one attachment
* Attachments for Direct messages (currently not supported in API)
# Friends #
Currently supported:
* Tabs for own profiles, friends, other contacts and groups
* Show profile(s) of user and change profile picture
* List of all known contacts with locally downloaded pictures
* Additional information, last messages and other functionality shown in news tab
* Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme)
* Show public and private events of contact
* Show members of groups
* Open website of contact or connect page (for other contacts)
* Clean other contacts with no news
ToDo:
* More information for contact from description page, possibly private information for friends
(needs API change)
* Groups: create, change, delete
(needs API change)
# Images #
Currently supported:
* Download public and private own images to local directory
* Upload picture to album with descriptions(public), send from gallery
* Delete own pictures and albums on client and server
* Change name or album of existing picture
* Show albums in grid, show images in album in grid and fullscreen
* Show public albums and images of contacts
* Pinch to zoom, swipe to scroll
ToDo:
* Upload private images
# Events #
Currently supported:
* Show own events
* Show public events of Friendica contacts
* List view of events of selected date
* Click on event to show details
ToDo
* Create events (needs API)
# Config/Accounts #
Currently supported:
* Multiple accounts
* View mode for news (tree or timeline)
* Maximum news (deleted after use of Quit button)
* Sync home timeline, replies, DM, Notify yes/no
* Hide #nsfw
ToDo
* OAuth?
# Other #
ToDo
* Video tab
* Translation
* Blingbling
# Translations #
* German, Spanish, Italian
* To contribute translations: Have a look at linux-sources/translations/friendiqa-de.ts and open it with an editor. It's an xml file. Change values and send me the file/do pull request.
# Install #
* F-Droid binary repository: [https://www.ma-nic.de/fdroid/repo](https://www.ma-nic.de/fdroid/repo) or for those who get the "error getting index file" from F-Droid client due to outdated crypto libraries the url without encryption: [http://www.ma-nic.de/fdroid/repo](http://www.ma-nic.de/fdroid/repo) To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url
* [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa)
## License ##
Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.
## Friendiqa
QML based client for the Friendica Social Network. Tabs for news (incl. Direct Messages), friends, photos and events. OS: currently Linux and Android (4.3 Jelly Bean, 5.1 for background sync). Source code is a QtCreator project.
## Screenshots
![Newstab](Screenshots/NewsTab.jpg) ![Friendstab](Screenshots/FriendsTab.jpg) ![Photostab](Screenshots/PhotoTab.jpg) ![Eventstab](Screenshots/EventsTab.jpg) ![Configtab](Screenshots/ConfigTab.jpg)
## Features
# News
Currently supported:
* Shows Posts from friends, replies, Direct Messages and notifications (in swipe view), selected group, replies, favorited messages, public timeline
* Background sync with configurable interval of 15 min to 2h for active user for friends timeline, replies and DMs (Android 5.1 required)
* Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs
* Search for news
* Click on hashtag in newsitem starts search for news with that word
* Only first photo attachment in post is shown, click for more images and fullscreen image
* Click on video shows video fullscreen
* For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app
* Open links in external browser
* Click on contact photo for contact details and last news
* Click on like text for additional contact info
* Click on post text opens conversation
* Deletion, Reposting, Answering of Posts
* Expand truncated news items
* Liking, disliking
* Attending for event posts
* Update fetches new posts (up to last 50) since last in local DB
* More shows older posts from local DB
* Create new Message with images or direct messages,smileys
* Send image(s) from Android gallery
* Send text or urls from other apps to Friendiqa
* Native Android image dialog
ToDo:
* Videos and other binary data as attachment (sending, not supported in API)
* Attachments for Direct messages (currently not supported in API)
# Friends
Currently supported:
* Tabs for own profiles, friends, other contacts and groups
* Show profile(s) of user and change profile picture
* List of all known contacts with locally downloaded pictures
* Follow/unfollow or block/unblock contacts
* Search for new contacts according to topic
* Show follow requests; approve, deny, ignore requests
* Additional information, last messages and other functionality shown in news tab
* Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme)
* Show public and private events of contact
* Show members of groups
* Open website of contact
* Clean other contacts with no news
ToDo:
* More information for contact from description page, possibly private information for friends (needs API change)
* Groups: create, change, delete (needs API change)
# Images
Currently supported:
* Download public own images to local directory (API is currently broken)
* Upload public picture to album with descriptions, send from gallery (API is currently broken)
* Delete own pictures and albums on client and server
* Change name or album of existing picture
* Show albums in grid, show images in album in grid and fullscreen
* Show public albums and images of contacts
* Pinch to zoom, swipe to scroll
ToDo:
* Upload private images
# Events
Currently supported:
* Show own events
* Show public events of Friendica contacts
* List view of events of selected date
* Click on event to show details
* Create event
* Delete event
ToDo
* Show more details and attendance of events (needs API)
# Config/Accounts
Currently supported:
* Multiple accounts
* Dark Mode
* View mode for news (conversation tree or timeline)
* Maximum news (deleted after use of Quit button)
* Sync home timeline, replies, DM, Events, friend requests; Notify yes/no
* Hide #nsfw
ToDo
* OAuth
# Other
* on Linux: App stays in systemtray and syncs in background
* Autostart minimized in systray possible
ToDo
* Video tab
* Translation
* Blingbling
# Translations
* German, Spanish, Italian, Hungarian
* To contribute translations: Have a look at linux-sources/translations/friendiqa-de.ts and open it with an editor. It's an xml file. Change values and send me the file to thomasschmidt45 at gmx.net / do pull request.
# Install
* F-Droid binary repository: <https://www.ma-nic.de/fdroid/repo> or for those who get the "error getting index file" from F-Droid client due to outdated crypto libraries the url without encryption: <http://www.ma-nic.de/fdroid/repo> To include repo in Fdroid: Open config --> package sources --> plus symbol --> paste url
* [Google Playstore](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa)
* Arch User Repository: <https://aur.archlinux.org/packages/friendiqa/>
* Flatpak: <https://friendiqa.ma-nic.de/friendiqa.flatpakref>
## License
Pubished under the [GPL v3](http://gplv3.fsf.org) with the exception of the Openssl library, which is published under OpenSSL License.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.5.3" android:versionCode="21" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.7" android:versionCode="33" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
@ -8,12 +8,21 @@
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
<!-- %%INSERT_FEATURES android:requestLegacyExternalStorage="true" -->
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="false" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:extractNativeLibs="true" android:icon="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light" android:logo="@drawable/friendiqa">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="">
<application android:hardwareAccelerated="true"
android:name="org.qtproject.qt5.android.bindings.QtApplication"
android:label="Friendiqa"
android:extractNativeLibs="true"
android:requestLegacyExternalStorage="true"
android:icon="@drawable/friendiqa"
android:theme="@android:style/Theme.Holo.Light"
android:logo="@drawable/friendiqa">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name="androidnative.friendiqa.FriendiqaActivity"
android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

@ -1,4 +1,7 @@
# androidBuildToolsVersion=25.0.3
# androidCompileSdkVersion=26
buildDir=.build
# qt5AndroidDir=/home/pankraz/Qt/5.11.1/android_armv7/src/android/java
android.useAndroidX=true
android.enableJetifier=true
android.enforceUniquePackageName=false

@ -4,11 +4,10 @@ import android.util.Log;
import android.app.Activity;
import android.os.*;
import java.util.Map;
import java.util.HashMap;
import android.content.pm.PackageManager;
import android.content.Context;
import android.Manifest.permission;
//import android.support.v4.app.ActivityCompat;
//import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
@ -18,7 +17,7 @@ import androidx.core.content.ContextCompat;
*/
public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.QtActivity {
public static final int MY_PERMISSIONS_REQUEST_WRITE_STORAGE = 0x245285a8;
public static final int MY_PERMISSIONS_REQUEST_READ_STORAGE = 0x245285a8;
@Override
@ -30,18 +29,19 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
protected void onResume() {
super.onResume();
if (ContextCompat.checkSelfPermission(this,android.Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
//if (ContextCompat.checkSelfPermission(this,android.Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_WRITE_STORAGE);
// ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_WRITE_STORAGE);
// MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
// app-defined int constant. The callback method gets the
// result of the request.
} else {
//} else {
System.loadLibrary("friendiqa_arm64-v8a");
//System.loadLibrary("friendiqa_armeabi-v7a");
if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) {
SystemDispatcher.onActivityResume();
} else {
@ -68,7 +68,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
} else {
SystemDispatcher.onActivityResume();
}}
}
//}
}
@ -76,10 +76,12 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
@Override public void onRequestPermissionsResult(int requestCode,String permissions[], int[] grantResults) {
switch (requestCode) {
case MY_PERMISSIONS_REQUEST_WRITE_STORAGE: {
case MY_PERMISSIONS_REQUEST_READ_STORAGE: {
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
SystemDispatcher.onActivityResume();
Map message = new HashMap();
message.put("multiple",false);
SystemDispatcher.dispatch("androidnative.ImagePicker.pickImage",message);
} else {
}
return;
@ -91,6 +93,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
protected void onNewIntent(Intent data) {
System.loadLibrary("friendiqa_arm64-v8a");
//System.loadLibrary("friendiqa_armeabi-v7a");
super.onNewIntent(data);
if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){
String type = data.getType();

@ -1,6 +1,7 @@
package androidnative;
import org.qtproject.qt5.android.QtNative;
import android.content.Intent;
import android.content.Context;
import android.util.Log;
import android.app.Activity;
import java.util.Map;
@ -17,12 +18,20 @@ import android.content.ClipData;
import java.util.List;
import java.util.ArrayList;
import android.content.pm.PackageManager;
import android.content.Context;
import android.Manifest.permission;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
public class ImagePicker {
// Random
public static final int PICK_IMAGE_ACTION = 0x245285a3;
public static final int TAKE_PHOTO_ACTION = 0x29fe8748;
public static final int MY_PERMISSIONS_REQUEST_READ_STORAGE = 0x245285a8;
public static final String PICK_IMAGE_MESSAGE = "androidnative.ImagePicker.pickImage";
public static final String TAKE_PHOTO_MESSAGE = "androidnative.ImagePicker.takePhoto";
public static final String CHOSEN_MESSAGE = "androidnative.ImagePicker.chosen";
@ -47,8 +56,15 @@ public class ImagePicker {
}
static void pickImage(Map message) {
Context context;
context = QtNative.activity().getApplicationContext();
Activity activity = org.qtproject.qt5.android.QtNative.activity();
if (ContextCompat.checkSelfPermission(context,android.Manifest.permission.READ_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
ActivityCompat.requestPermissions(activity,new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_READ_STORAGE);
} else {
Boolean multiple = false;
Activity activity = org.qtproject.qt5.android.QtNative.activity();
//Activity activity = org.qtproject.qt5.android.QtNative.activity();
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
@ -63,7 +79,7 @@ public class ImagePicker {
// >= API 18
activity.startActivityForResult(intent, PICK_IMAGE_ACTION);
}
}}
static void takePhoto(Map message) {
if (message.containsKey("broadcast")) {
@ -96,7 +112,6 @@ public class ImagePicker {
return;
int requestCode = (Integer) message.get("requestCode");
Intent data = (Intent) message.get("data");
if (requestCode == PICK_IMAGE_ACTION) {
importImage(data);
} else if (requestCode == TAKE_PHOTO_ACTION) {
@ -111,8 +126,8 @@ public class ImagePicker {
static private void importImage(Intent data) {
Uri uri = data.getData();
Log.d(TAG,"importImage: uri:" + uri);
Log.d(TAG,"importImage: type: " + data.getType());
//Log.d(TAG,"importImage: uri:" + uri);
//Log.d(TAG,"importImage: type: " + data.getType());
if (data.getClipData() != null) {
importImageFromClipData(data);

@ -140,6 +140,7 @@ public class SystemDispatcher {
waitingIntent=null;
isIntentPending=false;
} else { //onIntent start
Log.e(TAG,"notInitialized: onIntentStart "+data);
message.put("text",data.getStringExtra(Intent.EXTRA_TEXT));
message.put("subject",data.getStringExtra(Intent.EXTRA_SUBJECT));
waitingIntent = message;

@ -0,0 +1 @@
../../source-linux/common/filesystemandroid.cpp

@ -38,9 +38,6 @@
#include "filesystem.h"
#include "remoteauthasyncimageprovider.h"
#include "AndroidNative/systemdispatcher.h"
//#include "AndroidNative/environment.h"
//#include "AndroidNative/debug.h"
//#include "AndroidNative/mediascannerconnection.h"
#ifdef Q_OS_ANDROID
@ -64,19 +61,20 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
UPDATENEWS* updatenews= UPDATENEWS::instance();
updatenews->setDatabase();
updatenews->login();
updatenews->setSyncAll(true);
updatenews->startsync();
app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
return app.exec();
}
else{
QApplication app(argc, argv);
QQuickView view;
QQmlApplicationEngine view;
//qDebug()<<"FriendiqaMain started";
QTranslator qtTranslator;
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator);
RemoteAuthAsyncImageProvider *imageProvider = new RemoteAuthAsyncImageProvider;
view.engine()->addImageProvider("remoteauthimage",imageProvider);
view.addImageProvider("remoteauthimage",imageProvider);
view.rootContext()->setContextProperty("remoteauth", imageProvider);
XHR* xhr = XHR::instance();
view.rootContext()->setContextProperty("xhr", xhr);
@ -86,9 +84,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
view.rootContext()->setContextProperty("alarm", alarm);
UPDATENEWS* updatenews = UPDATENEWS::instance();
view.rootContext()->setContextProperty("updatenews", updatenews);
view.setSource(QUrl("qrc:/qml/friendiqa.qml"));
//QtWebEngine::initialize();
view.show();
view.load(QUrl("qrc:/qml/friendiqa.qml"));
view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));
return app.exec();

@ -13,14 +13,14 @@
TEMPLATE = app
TARGET = friendiqa
CONFIG += release
QT += qml quick gui widgets androidextras sql webview #webengine
QT += core core-private qml quick gui widgets sql androidextras #webengine webview
include(androidnative.pri/androidnative.pri)
SOURCES += common/friendiqa.cpp \
common/uploadableimage.cpp \
common/uploadableimage.cpp \
common/xhr.cpp \
common/filesystem.cpp \
common/filesystemandroid.cpp \
common/remoteauthasyncimageprovider.cpp \
common/updatenews.cpp \
common/alarmandroid.cpp
@ -52,7 +52,8 @@ OTHER_FILES += qml/friendiqa.qml \
TRANSLATIONS += translations/friendiqa-de.ts \
translations/friendiqa-es.ts \
translations/friendiqa-it.ts
translations/friendiqa-it.ts \
translations/friendiqa-hu.ts
HEADERS += \
common/uploadableimage.h \
@ -63,6 +64,7 @@ HEADERS += \
common/alarm.h
DISTFILES += \
android/gradle.properties \
qml/calendarqml/*.qml \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
@ -71,6 +73,7 @@ DISTFILES += \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \
qml/configqml/ConfigAppearancePage.qml \
translations/*.ts \
translations/*.qm \
qml/*.qml \
@ -83,4 +86,8 @@ DISTFILES += \
android/src/FriendiqaActivity.java \
android/src/FriendiqaService.java
ANDROID_EXTRA_LIBS = $$PWD/android/arm/libcrypto_1_1.so $$PWD/android/arm/libssl_1_1.so $$PWD/android/arm64/libcrypto_1_1.so $$PWD/android/arm64/libssl_1_1.so
ANDROID_EXTRA_LIBS = /home/pankraz/android-sdk/android_openssl/latest/arm/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm64/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm64/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86_64/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86_64/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm64/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/arm64/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86/libssl_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86_64/libcrypto_1_1.so /home/pankraz/android-sdk/android_openssl/latest/x86_64/libssl_1_1.so
#ANDROID_ABIS = arm64-v8a
#android: include(/home/pankraz/git/android_openssl/openssl.pri)
android: include(/home/pankraz/android-sdk/android_openssl/openssl.pri)

@ -33,46 +33,56 @@ import QtQuick 2.5
import QtQuick.LocalStorage 2.0
import QtQuick.Window 2.0
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.11
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/service.js" as Service
import "qrc:/qml/genericqml"
StackView{
ApplicationWindow{
id:root
title: "Friendiqa"
property var globaloptions: Service.readGO(db)
property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsAndroid.qml");return tmp.createObject(root)}
width: osSettings.appWidth
height:osSettings.appHeight
visible: true
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
property var login: Service.readActiveConfig(db)
property var globaloptions: Service.readGO(db)
property real fontFactor: root.font.pixelSize/root.font.pointSize
property var contactlist: []
property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
signal messageSignal(var friend)
property bool wideScreen : width>height
signal fotoSignal(var username, var friend)
signal directmessageSignal(var friend)
signal newsSignal(var news)
signal newstypeSignal(var type)
signal friendsSignal(var username)
signal contactdetailsSignal(var contact)
signal contactRefreshSignal()
signal searchSignal (var searchterm)
signal eventSignal(var contact)
signal eventcreateSignal(var event)
signal uploadSignal(var urls)
signal sendtextSignal(var intenttext)
signal changeimage(var method, var type, var id)
signal updateSyncinterval(int interval)
signal replySignal(var newsobject)
property var news:[]
property var newContacts:[]
property var contactposts:[]
//property string contactLoadType: ""
property bool imagePicking: false
onLoginChanged:{
if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
else{root.push(rootStackItem)
Material.theme: Material.System
function onLoginChanged(login){
if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")}
else{
if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts})}
}
onNewContactsChanged:{
function onNewContactsChanged(newContacts){
if(newContacts.length>0){// download contact images and update db
var contacturls=[];
var contactnames=[];
@ -91,9 +101,32 @@ StackView{
}
Connections {
target: root
function onWidthChanged(appWidth) {
if(osSettings.osType=="Linux" && Math.abs(appWidth-(globaloptions.appWidth||0))>50){
Service.updateglobaloptions(db,"appWidth",appWidth)
}
}
}
Connections {
target: root
function onHeightChanged(appHeight) {
if(osSettings.osType=="Linux" && Math.abs(appHeight-(globaloptions.appHeight||0))>50){
Service.updateglobaloptions(db,"appHeight",appHeight)
}
}
}
function showContact(contact){
rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact})
}
Connections{
target:xhr
onDownloaded:{
function onDownloaded(type,url,filename,i){
if(type=="contactlist"){
var database=LocalStorage.openDatabaseSync(root.db[0],root.db[1],root.db[2],root.db[3]);
var result;
@ -104,293 +137,135 @@ StackView{
}
}
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth)
if (event.key === osSettings.backKey) {
onClosing: {
if (rootstack.currentIndex==0){
newstab.active=true;
if (newstab.newstabstatus!=globaloptions.newsViewType){
if ((newstab.newstabstatus!="") && (newstab.newstabstatus!=globaloptions.newsViewType)&&(globaloptions.newsViewType!=null)){
newstab.newstabstatus=globaloptions.newsViewType;
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
close.accepted=false;
}
else if (newstab.conversation.length>0){newstab.conversation=[]}
else if (root.depth>1){root.pop()}
else{Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()})
})}
}
else if (rootstack.currentIndex==2){fotoSignal("backButton")}
else {rootstack.currentIndex=0}
event.accepted = true
}}
Drawer{
id: leftDrawer
width: 0.66* root.width
height: root.height
edge: Qt.LeftEdge
position: 1.0
Column{
x:mm
width:parent.width-mm
Label{
text: login.hasOwnProperty("username")?login.username:""
font.pixelSize: 4*mm
width: parent.width
height: 6*mm
}
// Label{
// text:login.hasOwnProperty("server")?"@"+login.server:""
// font.pixelSize: 5*mm
// width: parent.width
// }
Label{
text: "\uf021 " + qsTr("Refresh")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
// newstypeSignal("refresh")
updatenews.setDatabase();
updatenews.login();
updatenews.startsync();
}
}
}
Label{
text: "\uf1da " + qsTr("Timeline")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("timeline")
}
}
}
Label{
text: "\uf086 " + qsTr("Conversations")
width: parent.width
font.pixelSize: 4*mm
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("conversation")
}
}
}
Label{
text: "\uf005 " + qsTr("Favorites")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("favorites")
}
}
}
Label{
text: "\uf0ec " + qsTr("Replies")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("replies")
}
else if (newstab.conversation.length>0){
newstab.conversation=[];
close.accepted=false
}
}
Label{
text: "\uf0ac " + qsTr("Public Timeline")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("publictimeline")
}
else if (rootstackView.depth>1){
rootstackView.pop();
roottoolbar.visible=true;
close.accepted=false
}
}
Label{
text: "\uf0c0 " + qsTr("Group news")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("groupnews")
}
else{
Service.cleanNews(root.db,function(){
Service.cleanHashtags(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()
})
})})
close.accepted=true
}
}
Label{
text: "\uf002 " + qsTr("Search")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
}
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");bar.currentIndex=0;close.accepted=false}
else {rootstack.currentIndex=0;bar.currentIndex=0;close.accepted=false}
}
footer:ToolBar{id:roottoolbar
background: Rectangle{
anchors.fill: parent
color: Material.backgroundDimColor
}
TabBar {
id: bar
width:parent.width
onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
TabButton {
text: "\uf03a"
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
onClicked:{
leftDrawer.close();
newstypeSignal("search")
}
color: Material.backgroundDimColor
}
}
Label{
text: "\uf085 "+ qsTr("Settings")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
TabButton {
text: "\uf0c0"
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
onClicked: {root.push("qrc:qml/configqml/ConfigPage.qml");
leftDrawer.close()
}
color: Material.backgroundDimColor
}
}
Label{
text: "\uf2bb " + qsTr("Accounts")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
TabButton {
text: "\uf03e"
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
onClicked: {root.push("qrc:qml/configqml/AccountPage.qml");
leftDrawer.close()
}
color: Material.backgroundDimColor
}
}
Label{
text: "\uf08b " +qsTr("Quit")
font.pixelSize: 4*mm
width: parent.width
MouseArea{
TabButton {
text: "\uf073"
font.pointSize: osSettings.bigFontSize
background:Rectangle{
anchors.fill: parent
onClicked:{
Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()})
})
}
color: Material.backgroundDimColor
}
}
}
}
Item{
id:rootStackItem
width:parent.width
height: parent.height
//anchors.fill:parent
states: State {
name: "fullscreen";
PropertyChanges { target: bar; height:0 }
PropertyChanges { target: rootstack; height:parent.height }
}
transitions: Transition {
PropertyAnimation { properties: "height";
easing.type: Easing.InOutQuad
duration: 1000
}
}
TabBar {
id: bar
width: parent.width
height: 7*mm
position:TabBar.Footer
anchors.top: rootstack.bottom
onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
TabButton {
text: "\uf03a"
font.pixelSize: 3*mm
height: 6*mm
}
TabButton {
text: "\uf0c0"
font.pixelSize: 3*mm
height: 6*mm
}
TabButton {
text: "\uf03e"
font.pixelSize: 3*mm
height: 6*mm
}
TabButton {
text: "\uf073"
font.pixelSize: 3*mm
height: 6*mm
}
}
StackLayout{
StackView{id:rootstackView
width:root.width
height: root.height
initialItem: StackLayout{
id:rootstack
width:parent.width
height: parent.height-7*mm
width:rootstackView.width
height: rootstackView.height
currentIndex:bar.currentIndex
Loader{
id: newstab
Layout.fillWidth:true
Layout.fillHeight: true