├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── API.md ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── lint.xml ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── indieweb │ │ └── indigenous │ │ └── WritePostTest.java │ ├── fdroid │ └── java │ │ └── com │ │ └── indieweb │ │ └── indigenous │ │ └── post │ │ └── BasePlatformCreate.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── changelog │ ├── ic_launcher-playstore.png │ ├── java │ │ └── com │ │ │ └── indieweb │ │ │ └── indigenous │ │ │ ├── General.java │ │ │ ├── GeneralBase.java │ │ │ ├── GeneralFactory.java │ │ │ ├── IndiePass.java │ │ │ ├── LaunchActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── contacts │ │ │ ├── ContactFragment.java │ │ │ └── ContactListAdapter.java │ │ │ ├── db │ │ │ └── DatabaseHelper.java │ │ │ ├── draft │ │ │ ├── DraftFragment.java │ │ │ └── DraftListAdapter.java │ │ │ ├── general │ │ │ ├── AboutFragment.java │ │ │ ├── BaseFragment.java │ │ │ ├── DebugActivity.java │ │ │ └── SettingsFragment.java │ │ │ ├── indieweb │ │ │ ├── IndiewebGeneral.java │ │ │ ├── indieauth │ │ │ │ ├── AuthenticatorIndieWeb.java │ │ │ │ ├── AuthenticatorServiceIndieWeb.java │ │ │ │ ├── IndieAuthAction.java │ │ │ │ └── IndiewebAuth.java │ │ │ ├── micropub │ │ │ │ ├── Endpoints.java │ │ │ │ ├── IndieWebPost.java │ │ │ │ ├── MicropubAction.java │ │ │ │ └── source │ │ │ │ │ ├── PostListAdapter.java │ │ │ │ │ ├── PostListFilterActivity.java │ │ │ │ │ └── PostListFragment.java │ │ │ └── microsub │ │ │ │ ├── IndieWebReader.java │ │ │ │ ├── MicrosubAction.java │ │ │ │ └── manage │ │ │ │ ├── FeedActivity.java │ │ │ │ ├── ItemMoveCallback.java │ │ │ │ ├── ManageChannelActivity.java │ │ │ │ ├── ManageChannelListAdapter.java │ │ │ │ ├── ManageFeedsActivity.java │ │ │ │ ├── ManageFeedsListAdapter.java │ │ │ │ └── StartDragListener.java │ │ │ ├── mastodon │ │ │ ├── AuthenticatorMastodon.java │ │ │ ├── AuthenticatorServiceMastodon.java │ │ │ ├── MastodonAuth.java │ │ │ ├── MastodonGeneral.java │ │ │ ├── MastodonPost.java │ │ │ └── MastodonReader.java │ │ │ ├── model │ │ │ ├── Cache.java │ │ │ ├── Channel.java │ │ │ ├── ChannelCounter.java │ │ │ ├── Contact.java │ │ │ ├── Draft.java │ │ │ ├── Feed.java │ │ │ ├── HCard.java │ │ │ ├── Place.java │ │ │ ├── PostListItem.java │ │ │ ├── PostType.java │ │ │ ├── Syndication.java │ │ │ ├── TimelineItem.java │ │ │ ├── TimelineStyle.java │ │ │ └── User.java │ │ │ ├── pixelfed │ │ │ ├── AuthenticatorPixelfed.java │ │ │ ├── AuthenticatorServicePixelfed.java │ │ │ ├── PixelfedAuth.java │ │ │ ├── PixelfedGeneral.java │ │ │ ├── PixelfedPost.java │ │ │ └── PixelfedReader.java │ │ │ ├── pleroma │ │ │ ├── AuthenticatorPleroma.java │ │ │ ├── AuthenticatorServicePleroma.java │ │ │ ├── PleromaAuth.java │ │ │ ├── PleromaGeneral.java │ │ │ ├── PleromaPost.java │ │ │ └── PleromaReader.java │ │ │ ├── post │ │ │ ├── ArticleActivity.java │ │ │ ├── AudioGalleryAdapter.java │ │ │ ├── Base.java │ │ │ ├── BaseCreate.java │ │ │ ├── BookmarkActivity.java │ │ │ ├── CheckinActivity.java │ │ │ ├── ContactActivity.java │ │ │ ├── EventActivity.java │ │ │ ├── GeocacheActivity.java │ │ │ ├── ImageGalleryAdapter.java │ │ │ ├── IssueActivity.java │ │ │ ├── LikeActivity.java │ │ │ ├── NoteActivity.java │ │ │ ├── Post.java │ │ │ ├── PostBase.java │ │ │ ├── PostFactory.java │ │ │ ├── ReadActivity.java │ │ │ ├── ReplyActivity.java │ │ │ ├── RepostActivity.java │ │ │ ├── RsvpActivity.java │ │ │ ├── SendPostInterface.java │ │ │ ├── ShareActivity.java │ │ │ ├── TripActivity.java │ │ │ ├── UpdateActivity.java │ │ │ ├── UploadActivity.java │ │ │ ├── VenueActivity.java │ │ │ └── VideoGalleryAdapter.java │ │ │ ├── reader │ │ │ ├── ChannelFragment.java │ │ │ ├── ChannelListAdapter.java │ │ │ ├── Reader.java │ │ │ ├── ReaderBase.java │ │ │ ├── ReaderFactory.java │ │ │ ├── TimelineActivity.java │ │ │ ├── TimelineAudioActivity.java │ │ │ ├── TimelineDetailActivity.java │ │ │ ├── TimelineImageActivity.java │ │ │ ├── TimelineListAdapter.java │ │ │ └── TimelineVideoActivity.java │ │ │ ├── users │ │ │ ├── Accounts.java │ │ │ ├── AnonymousFragment.java │ │ │ ├── Auth.java │ │ │ ├── AuthActivity.java │ │ │ ├── AuthBase.java │ │ │ ├── AuthFactory.java │ │ │ ├── AuthenticatorBase.java │ │ │ ├── UsersFragment.java │ │ │ └── UsersListAdapter.java │ │ │ ├── util │ │ │ ├── HTTPRequest.java │ │ │ ├── NetworkResponseRequest.java │ │ │ ├── Preferences.java │ │ │ ├── Utility.java │ │ │ ├── VolleyMultipartRequest.java │ │ │ ├── VolleyRequestListener.java │ │ │ └── mf2 │ │ │ │ ├── JsonDict.java │ │ │ │ ├── JsonList.java │ │ │ │ └── Mf2Parser.java │ │ │ └── widget │ │ │ ├── ExpandableTextView.java │ │ │ └── ViewPagerCatchException.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_background.xml │ │ ├── drawable │ │ ├── avatar.xml │ │ ├── avatar_white.xml │ │ ├── border.xml │ │ ├── border_box.xml │ │ ├── button_add.xml │ │ ├── button_add_account.xml │ │ ├── button_article.xml │ │ ├── button_article_idle.xml │ │ ├── button_article_pressed.xml │ │ ├── button_attach_file.xml │ │ ├── button_audio.xml │ │ ├── button_audio_idle.xml │ │ ├── button_audio_pressed.xml │ │ ├── button_bookmark.xml │ │ ├── button_bookmark_idle.xml │ │ ├── button_bookmark_pressed.xml │ │ ├── button_close.xml │ │ ├── button_close_idle.xml │ │ ├── button_close_pressed.xml │ │ ├── button_create_white.xml │ │ ├── button_delete.xml │ │ ├── button_delete_idle.xml │ │ ├── button_delete_pressed.xml │ │ ├── button_delete_white.xml │ │ ├── button_drag.xml │ │ ├── button_event.xml │ │ ├── button_event_idle.xml │ │ ├── button_event_pressed.xml │ │ ├── button_external.xml │ │ ├── button_external_idle.xml │ │ ├── button_external_pressed.xml │ │ ├── button_feed_idle.xml │ │ ├── button_feed_pressed.xml │ │ ├── button_filter_white.xml │ │ ├── button_geocache_idle.xml │ │ ├── button_issue_idle.xml │ │ ├── button_like.xml │ │ ├── button_like_idle.xml │ │ ├── button_like_pressed.xml │ │ ├── button_list_idle.xml │ │ ├── button_location_white.xml │ │ ├── button_map.xml │ │ ├── button_map_idle.xml │ │ ├── button_map_pressed.xml │ │ ├── button_mark_all_read.xml │ │ ├── button_media_idle.xml │ │ ├── button_menu.xml │ │ ├── button_menu_idle.xml │ │ ├── button_menu_pressed.xml │ │ ├── button_note.xml │ │ ├── button_note_idle.xml │ │ ├── button_note_pressed.xml │ │ ├── button_photo_add_white.xml │ │ ├── button_read.xml │ │ ├── button_read_idle.xml │ │ ├── button_read_pressed.xml │ │ ├── button_reply.xml │ │ ├── button_reply_idle.xml │ │ ├── button_reply_pressed.xml │ │ ├── button_repost.xml │ │ ├── button_repost_idle.xml │ │ ├── button_repost_pressed.xml │ │ ├── button_rsvp.xml │ │ ├── button_rsvp_idle.xml │ │ ├── button_rsvp_pressed.xml │ │ ├── button_send_white.xml │ │ ├── button_swap.xml │ │ ├── button_swap_header.xml │ │ ├── button_swap_idle.xml │ │ ├── button_swap_pressed.xml │ │ ├── button_swap_white.xml │ │ ├── button_sync.xml │ │ ├── button_sync_idle.xml │ │ ├── button_sync_pressed.xml │ │ ├── button_trip_idle.xml │ │ ├── button_update.xml │ │ ├── button_update_idle.xml │ │ ├── button_update_pressed.xml │ │ ├── button_venue_idle.xml │ │ ├── button_video.xml │ │ ├── button_video_idle.xml │ │ ├── button_video_pressed.xml │ │ ├── clipboard.xml │ │ ├── ic_launcher_foreground.xml │ │ ├── ic_launcher_mono.xml │ │ ├── indieweb.xml │ │ ├── loading.xml │ │ ├── mastodon.xml │ │ ├── nav_accounts.xml │ │ ├── nav_contacts.xml │ │ ├── nav_create.xml │ │ ├── nav_drafts.xml │ │ ├── nav_help.xml │ │ ├── nav_item_background.xml │ │ ├── nav_reader.xml │ │ ├── nav_settings.xml │ │ ├── no_connection.xml │ │ ├── pixelfed.xml │ │ ├── pleroma.xml │ │ ├── progress_loading.xml │ │ ├── red_marker.xml │ │ ├── rounded_border_text_view.xml │ │ ├── search_white.xml │ │ ├── settings_white.xml │ │ └── side_nav_bar.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_article.xml │ │ ├── activity_auth.xml │ │ ├── activity_bookmark.xml │ │ ├── activity_channels.xml │ │ ├── activity_checkin.xml │ │ ├── activity_contact.xml │ │ ├── activity_contacts.xml │ │ ├── activity_debug.xml │ │ ├── activity_drafts.xml │ │ ├── activity_event.xml │ │ ├── activity_feed.xml │ │ ├── activity_geocache.xml │ │ ├── activity_issue.xml │ │ ├── activity_like.xml │ │ ├── activity_main.xml │ │ ├── activity_manage_channels.xml │ │ ├── activity_manage_feed.xml │ │ ├── activity_note.xml │ │ ├── activity_read.xml │ │ ├── activity_reply.xml │ │ ├── activity_repost.xml │ │ ├── activity_rsvp.xml │ │ ├── activity_share.xml │ │ ├── activity_source_post_list.xml │ │ ├── activity_source_post_list_filter.xml │ │ ├── activity_timeline.xml │ │ ├── activity_timeline_audio.xml │ │ ├── activity_timeline_detail.xml │ │ ├── activity_timeline_image.xml │ │ ├── activity_timeline_video.xml │ │ ├── activity_trip.xml │ │ ├── activity_update.xml │ │ ├── activity_upload.xml │ │ ├── activity_user_anonymous.xml │ │ ├── activity_users.xml │ │ ├── activity_venue.xml │ │ ├── app_bar_main.xml │ │ ├── content_main.xml │ │ ├── dialog_single_input.xml │ │ ├── gallery_thumbnail.xml │ │ ├── gallery_thumbnail_audio.xml │ │ ├── gallery_thumbnail_audio_single.xml │ │ ├── gallery_thumbnail_single.xml │ │ ├── list_item_channel.xml │ │ ├── list_item_contact.xml │ │ ├── list_item_draft.xml │ │ ├── list_item_feed_search.xml │ │ ├── list_item_manage_channel.xml │ │ ├── list_item_manage_feed.xml │ │ ├── list_item_source_post.xml │ │ ├── list_item_timeline.xml │ │ ├── list_item_timeline_compact.xml │ │ ├── list_item_user.xml │ │ ├── nav_header_main.xml │ │ ├── popup_item.xml │ │ ├── preference_category_custom.xml │ │ ├── toolbar_settings.xml │ │ ├── widget_body.xml │ │ ├── widget_category.xml │ │ ├── widget_image_slide.xml │ │ ├── widget_location.xml │ │ ├── widget_media_preview.xml │ │ ├── widget_media_preview_single.xml │ │ ├── widget_no_connection.xml │ │ ├── widget_post_account.xml │ │ ├── widget_post_options.xml │ │ ├── widget_spoiler.xml │ │ └── widget_targets.xml │ │ ├── menu │ │ ├── accounts_menu.xml │ │ ├── channel_menu.xml │ │ ├── contact_menu.xml │ │ ├── debug_menu.xml │ │ ├── drawer_menu.xml │ │ ├── image_list_item_media_menu.xml │ │ ├── image_list_item_menu.xml │ │ ├── manage_channel_menu.xml │ │ ├── manage_feed_menu.xml │ │ ├── post_create_menu.xml │ │ ├── post_update_menu.xml │ │ ├── share_menu.xml │ │ ├── source_list_menu.xml │ │ ├── timeline_list_item_menu.xml │ │ └── timeline_menu.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ ├── colors.xml │ │ └── styles.xml │ │ ├── values-nl │ │ └── strings.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── authenticator_indieweb.xml │ │ ├── authenticator_mastodon.xml │ │ ├── authenticator_pixelfed.xml │ │ ├── authenticator_pleroma.xml │ │ ├── preferences.xml │ │ └── searchable.xml │ ├── playstore │ └── java │ │ └── com │ │ └── indieweb │ │ └── indigenous │ │ └── post │ │ └── BasePlatformCreate.java │ └── test │ └── java │ └── com │ └── indieweb │ └── indigenous │ └── ParseTest.java ├── build.gradle ├── fastlane └── metadata │ └── android │ └── en-US │ └── images │ └── phoneScreenshots │ ├── 01.jpg │ ├── 02.jpg │ ├── 03.jpg │ ├── 04.jpg │ └── 05.jpg ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Smartphone (please complete the following information):** 27 | - Device: [e.g. iPhone6] 28 | - Android version: [e.g. 8.0.0] 29 | 30 | **Additional context** 31 | Add any other context about the problem here. This may contain strack traces if available 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | /.idea 7 | .DS_Store 8 | /app/playstore 9 | /app/fdroid 10 | /build 11 | /captures 12 | .externalNativeBuild 13 | app/release 14 | -------------------------------------------------------------------------------- /API.md: -------------------------------------------------------------------------------- 1 | # API documentation 2 | 3 | ## Adding a new account type 4 | 5 | To add a new account type, you will have to create a few classes which 6 | have a dedicated purpose in the application. For inspiration, take a 7 | look at the mastodon directory for an example. 8 | 9 | - General class: general functionality and features 10 | - Reader class: parsing responses, endpoints etc 11 | - Post class: creating and deleting posts etc 12 | - Auth class: syncing accounts and revoking tokens 13 | 14 | Base classes are available which handle some default cases. 15 | 16 | The Factory classes will need to be updated so your new account type 17 | can be detected: 18 | 19 | - GeneralFactory 20 | - ReaderFactory 21 | - PostFactory 22 | - AuthFactory 23 | 24 | The authentication dance for a new account type is managed in AuthActivity.java 25 | This code will be updated in the future to become more abstract so more 26 | functions can be moved to the respective account type auth class. 27 | 28 | An authenticator (service) needs to create and registered in the Manifest. 29 | You can use the BaseAuthenticator class which handles most of the classes. 30 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | #-dontwarn me.pushy.** 23 | #noinspection ShrinkerUnresolvedReference 24 | #-keep class me.pushy.** { *; } -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndiePass/indiepass-android/cf42270dc3e1baf5a2daac1bd0836d56cfff0008/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/General.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous; 2 | 3 | import java.util.ArrayList; 4 | 5 | public interface General { 6 | 7 | String FEATURE_CHANNELS_REFRESH = "channels_refresh"; 8 | String FEATURE_CHANNELS_MANAGE = "channels_manage"; 9 | String FEATURE_CHANNELS_SHOW_SOURCES = "channels_show_sources"; 10 | String FEATURE_CHANNELS_HIDE_READ = "channels_hide_read"; 11 | String FEATURE_CHANNELS_READ_LATER = "channels_read_later"; 12 | String FEATURE_HIDE_POST_TYPES = "hide_posts_types"; 13 | String FEATURE_POSTS = "posts"; 14 | String FEATURE_UPLOAD = "upload"; 15 | String FEATURE_CONTACTS = "contacts"; 16 | 17 | /** 18 | * Whether the app supports a certain general feature. 19 | * 20 | * @param feature The feature to check. 21 | * @return boolean 22 | */ 23 | boolean supports(String feature); 24 | 25 | /** 26 | * Handle the post action button click. 27 | */ 28 | void handlePostActionButtonClick(); 29 | 30 | /** 31 | * Handle the write post button click. 32 | */ 33 | void handleWritePostClick(); 34 | 35 | /** 36 | * Whether to hide post types on the share activity. 37 | * 38 | * @return boolean 39 | */ 40 | boolean hidePostTypes(); 41 | 42 | /** 43 | * Return protected post types. 44 | * 45 | * @return ArrayList 46 | */ 47 | ArrayList getProtectedPostTypes(); 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/GeneralBase.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.model.User; 5 | 6 | abstract public class GeneralBase implements General { 7 | 8 | private final Context context; 9 | private User user; 10 | 11 | public GeneralBase(Context context, User user) { 12 | this.context = context; 13 | this.user = user; 14 | } 15 | 16 | public Context getContext() { 17 | return context; 18 | } 19 | 20 | public User getUser() { 21 | return user; 22 | } 23 | 24 | public void setUser(User user) { 25 | this.user = user; 26 | } 27 | 28 | @Override 29 | public boolean supports(String feature) { 30 | return true; 31 | } 32 | 33 | @Override 34 | public void handlePostActionButtonClick() { 35 | ((MainActivity) this.getContext()).openDrawer(R.id.nav_create); 36 | } 37 | 38 | @Override 39 | public void handleWritePostClick() { 40 | ((MainActivity) this.getContext()).toggleGroupItems(false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/IndiePass.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous; 2 | 3 | import android.app.Application; 4 | import com.indieweb.indigenous.model.Channel; 5 | import com.indieweb.indigenous.model.Contact; 6 | import com.indieweb.indigenous.model.TimelineItem; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | public class IndiePass extends Application { 12 | 13 | public static String debug; 14 | public static TimelineItem timelineItem; 15 | public static Contact contactItem; 16 | public static boolean refreshChannels; 17 | public static List channelsList = new ArrayList<>(); 18 | private static IndiePass singleton; 19 | 20 | public static IndiePass getInstance() { 21 | return singleton; 22 | } 23 | 24 | public String getDebug() { 25 | return debug; 26 | } 27 | 28 | public void setDebug(String text) { 29 | debug = text; 30 | } 31 | 32 | public boolean isRefreshChannels() { 33 | return refreshChannels; 34 | } 35 | 36 | public void setRefreshChannels(boolean refresh) { 37 | refreshChannels = refresh; 38 | } 39 | 40 | public TimelineItem getTimelineItem() { 41 | return timelineItem; 42 | } 43 | 44 | public void setTimelineItem(TimelineItem item) { 45 | timelineItem = item; 46 | } 47 | 48 | public Contact getContact() { 49 | return contactItem; 50 | } 51 | 52 | public void setContact(Contact contact) { 53 | contactItem = contact; 54 | } 55 | 56 | public void setChannels(List channels) { 57 | channelsList = channels; 58 | } 59 | 60 | public List getChannelsList() { 61 | return channelsList; 62 | } 63 | 64 | @Override 65 | public void onCreate() { 66 | super.onCreate(); 67 | singleton = this; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/LaunchActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import com.indieweb.indigenous.model.User; 7 | import com.indieweb.indigenous.users.Accounts; 8 | import com.indieweb.indigenous.users.AuthActivity; 9 | 10 | public class LaunchActivity extends AppCompatActivity { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | 16 | User user = new Accounts(this).getDefaultUser(); 17 | if (user.isValid()) { 18 | Intent MainActivity = new Intent(getBaseContext(), MainActivity.class); 19 | startActivity(MainActivity); 20 | } else { 21 | Intent IndieAuth = new Intent(getBaseContext(), AuthActivity.class); 22 | startActivity(IndieAuth); 23 | } 24 | this.finish(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/indieweb/IndiewebGeneral.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.indieweb; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.GeneralBase; 5 | import com.indieweb.indigenous.R; 6 | import com.indieweb.indigenous.model.User; 7 | import com.indieweb.indigenous.util.Preferences; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class IndiewebGeneral extends GeneralBase { 12 | 13 | public IndiewebGeneral(Context context, User user) { 14 | super(context, user); 15 | } 16 | 17 | @Override 18 | public boolean supports(String feature) { 19 | boolean supported = true; 20 | 21 | switch (feature) { 22 | case FEATURE_UPLOAD: 23 | String micropubMediaEndpoint = this.getUser().getMicropubMediaEndpoint(); 24 | if (micropubMediaEndpoint == null || micropubMediaEndpoint.length() == 0) { 25 | supported = false; 26 | } 27 | break; 28 | case FEATURE_POSTS: 29 | supported = Preferences.getPreference(this.getContext(), "pref_key_source_post_list", false); 30 | break; 31 | case FEATURE_CONTACTS: 32 | supported = Preferences.getPreference(this.getContext(), "pref_key_contact_manage", false); 33 | break; 34 | case FEATURE_HIDE_POST_TYPES: 35 | supported = Preferences.getPreference(this.getContext(), "pref_key_post_type_hide", false); 36 | break; 37 | } 38 | 39 | return supported; 40 | } 41 | 42 | @Override 43 | public boolean hidePostTypes() { 44 | return false; 45 | } 46 | 47 | @Override 48 | public ArrayList getProtectedPostTypes() { 49 | ArrayList protectedTypes = new ArrayList<>(); 50 | protectedTypes.add(R.id.createMedia); 51 | return protectedTypes; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/indieweb/indieauth/AuthenticatorIndieWeb.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.indieweb.indieauth; 2 | 3 | import android.accounts.AccountAuthenticatorResponse; 4 | import android.accounts.AccountManager; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import com.indieweb.indigenous.users.AuthActivity; 9 | import com.indieweb.indigenous.users.AuthenticatorBase; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.INDIEWEB_ACCOUNT_TYPE; 12 | import static com.indieweb.indigenous.users.AuthActivity.INDIEWEB_TOKEN_TYPE; 13 | 14 | public class AuthenticatorIndieWeb extends AuthenticatorBase { 15 | 16 | private final Context context; 17 | 18 | public AuthenticatorIndieWeb(Context context) { 19 | super(context); 20 | this.context = context; 21 | } 22 | 23 | @Override 24 | public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) { 25 | final Intent intent = new Intent(context, AuthActivity.class); 26 | intent.putExtra("com.indieweb.indigenous.AccountType", accountType); 27 | intent.putExtra(INDIEWEB_TOKEN_TYPE, authTokenType); 28 | final Bundle bundle = new Bundle(); 29 | bundle.putParcelable(AccountManager.KEY_INTENT, intent); 30 | return bundle; 31 | } 32 | 33 | @Override 34 | public String getAuthTokenLabel(String authTokenType) { 35 | return INDIEWEB_ACCOUNT_TYPE; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/indieweb/indieauth/AuthenticatorServiceIndieWeb.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.indieweb.indieauth; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | 7 | public class AuthenticatorServiceIndieWeb extends Service { 8 | 9 | private AuthenticatorIndieWeb authenticator; 10 | 11 | @Override 12 | public void onCreate() { 13 | authenticator = new AuthenticatorIndieWeb(this); 14 | } 15 | 16 | @Override 17 | public IBinder onBind(Intent intent) { 18 | return authenticator.getIBinder(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/indieweb/indieauth/IndiewebAuth.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.indieweb.indieauth; 2 | 3 | import android.content.Context; 4 | import android.widget.RelativeLayout; 5 | import com.indieweb.indigenous.indieweb.micropub.Endpoints; 6 | import com.indieweb.indigenous.indieweb.micropub.MicropubAction; 7 | import com.indieweb.indigenous.model.User; 8 | import com.indieweb.indigenous.users.AuthBase; 9 | 10 | public class IndiewebAuth extends AuthBase { 11 | 12 | public IndiewebAuth(Context context, User user) { 13 | super(context, user); 14 | } 15 | 16 | @Override 17 | public void syncAccount(RelativeLayout layout) { 18 | new Endpoints(this.getContext(), this.getUser(), layout).refresh(); 19 | new MicropubAction(this.getContext(), this.getUser(), layout).refreshConfig(); 20 | } 21 | 22 | @Override 23 | public void revokeToken(User user) { 24 | new IndieAuthAction(getContext(), user).revoke(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/indieweb/microsub/manage/StartDragListener.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.indieweb.microsub.manage; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | 5 | public interface StartDragListener { 6 | void requestDrag(RecyclerView.ViewHolder viewHolder); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/mastodon/AuthenticatorMastodon.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.mastodon; 2 | 3 | import android.accounts.AccountAuthenticatorResponse; 4 | import android.accounts.AccountManager; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import com.indieweb.indigenous.users.AuthActivity; 9 | import com.indieweb.indigenous.users.AuthenticatorBase; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.MASTODON_ACCOUNT_TYPE; 12 | import static com.indieweb.indigenous.users.AuthActivity.MASTODON_TOKEN_TYPE; 13 | 14 | public class AuthenticatorMastodon extends AuthenticatorBase { 15 | 16 | private final Context context; 17 | 18 | public AuthenticatorMastodon(Context context) { 19 | super(context); 20 | this.context = context; 21 | } 22 | 23 | @Override 24 | public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) { 25 | final Intent intent = new Intent(context, AuthActivity.class); 26 | intent.putExtra("com.indieweb.indigenous.AccountType", accountType); 27 | intent.putExtra(MASTODON_TOKEN_TYPE, authTokenType); 28 | final Bundle bundle = new Bundle(); 29 | bundle.putParcelable(AccountManager.KEY_INTENT, intent); 30 | return bundle; 31 | } 32 | 33 | @Override 34 | public String getAuthTokenLabel(String authTokenType) { 35 | return MASTODON_ACCOUNT_TYPE; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/mastodon/AuthenticatorServiceMastodon.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.mastodon; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | 7 | public class AuthenticatorServiceMastodon extends Service { 8 | 9 | private AuthenticatorMastodon authenticator; 10 | 11 | @Override 12 | public void onCreate() { 13 | authenticator = new AuthenticatorMastodon(this); 14 | } 15 | 16 | @Override 17 | public IBinder onBind(Intent intent) { 18 | return authenticator.getIBinder(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/mastodon/MastodonGeneral.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.mastodon; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.GeneralBase; 5 | import com.indieweb.indigenous.MainActivity; 6 | import com.indieweb.indigenous.R; 7 | import com.indieweb.indigenous.model.User; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class MastodonGeneral extends GeneralBase { 12 | 13 | public MastodonGeneral(Context context, User user) { 14 | super(context, user); 15 | } 16 | 17 | @Override 18 | public boolean supports(String feature) { 19 | boolean supported = true; 20 | 21 | switch (feature) { 22 | case FEATURE_CHANNELS_REFRESH: 23 | case FEATURE_CHANNELS_MANAGE: 24 | case FEATURE_CHANNELS_SHOW_SOURCES: 25 | case FEATURE_CHANNELS_HIDE_READ: 26 | case FEATURE_CHANNELS_READ_LATER: 27 | case FEATURE_CONTACTS: 28 | case FEATURE_UPLOAD: 29 | case FEATURE_POSTS: 30 | supported = false; 31 | break; 32 | } 33 | 34 | return supported; 35 | } 36 | 37 | @Override 38 | public void handlePostActionButtonClick() { 39 | ((MainActivity) this.getContext()).clickOnMenuItem(R.id.createArticle); 40 | } 41 | 42 | @Override 43 | public void handleWritePostClick() { 44 | this.handlePostActionButtonClick(); 45 | } 46 | 47 | @Override 48 | public boolean hidePostTypes() { 49 | return true; 50 | } 51 | 52 | @Override 53 | public ArrayList getProtectedPostTypes() { 54 | ArrayList protectedTypes = new ArrayList<>(); 55 | protectedTypes.add(R.id.createArticle); 56 | return protectedTypes; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/Channel.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class Channel { 4 | 5 | private String uid; 6 | private String name; 7 | private int unread; 8 | private String sourceId = ""; 9 | private int unreadSources = 0; 10 | private boolean countInteger = false; 11 | private boolean countNew = false; 12 | 13 | public String getUid() { 14 | return uid; 15 | } 16 | 17 | public void setUid(String uid) { 18 | this.uid = uid; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | public int getUnread() { 30 | return unread; 31 | } 32 | 33 | public void setUnread(int unread) { 34 | this.unread = unread; 35 | } 36 | 37 | public boolean isCountInteger() { 38 | return countInteger; 39 | } 40 | 41 | public void setCountInteger(boolean countInteger) { 42 | this.countInteger = countInteger; 43 | } 44 | 45 | public boolean isCountNew() { 46 | return countNew; 47 | } 48 | 49 | public void setCountNew(boolean countNew) { 50 | this.countNew = countNew; 51 | } 52 | 53 | public String getSourceId() { 54 | return sourceId; 55 | } 56 | 57 | public void setSourceId(String sourceId) { 58 | this.sourceId = sourceId; 59 | } 60 | 61 | public int getUnreadSources() { 62 | return unreadSources; 63 | } 64 | 65 | public void setUnreadSources(int unreadSources) { 66 | this.unreadSources = unreadSources; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/ChannelCounter.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class ChannelCounter { 4 | 5 | Integer counter = -1; 6 | boolean isSource = false; 7 | 8 | public Integer getCounter() { 9 | return counter; 10 | } 11 | 12 | public void setCounter(Integer counter) { 13 | this.counter = counter; 14 | } 15 | 16 | public boolean isSource() { 17 | return isSource; 18 | } 19 | 20 | public void setSource(boolean source) { 21 | isSource = source; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/Contact.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import java.io.Serializable; 6 | 7 | public class Contact implements Serializable { 8 | 9 | public String name = ""; 10 | public String nickname = ""; 11 | public String url = ""; 12 | public String photo = ""; 13 | public String internalUrl = ""; 14 | 15 | @NonNull 16 | @Override 17 | public String toString() { 18 | return this.getName(); 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | public String getNickname() { 30 | return nickname; 31 | } 32 | 33 | public void setNickname(String nickname) { 34 | this.nickname = nickname; 35 | } 36 | 37 | public String getUrl() { 38 | return url; 39 | } 40 | 41 | public void setUrl(String url) { 42 | this.url = url; 43 | } 44 | 45 | public String getPhoto() { 46 | return photo; 47 | } 48 | 49 | public void setPhoto(String photo) { 50 | this.photo = photo; 51 | } 52 | 53 | public String getInternalUrl() { 54 | return internalUrl; 55 | } 56 | 57 | public void setInternalUrl(String internalUrl) { 58 | this.internalUrl = internalUrl; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/Feed.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class Feed { 4 | 5 | public String url; 6 | public String channel; 7 | public String type; 8 | 9 | public String getUrl() { 10 | return url; 11 | } 12 | 13 | public void setUrl(String url) { 14 | this.url = url; 15 | } 16 | 17 | public String getChannel() { 18 | return channel; 19 | } 20 | 21 | public void setChannel(String channel) { 22 | this.channel = channel; 23 | } 24 | 25 | public String getType() { 26 | return type; 27 | } 28 | 29 | public void setType(String type) { 30 | this.type = type; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/HCard.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class HCard { 4 | 5 | private String name; 6 | private String avatar; 7 | private String url; 8 | 9 | public HCard() { 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | public String getAvatar() { 21 | return avatar; 22 | } 23 | 24 | public void setAvatar(String avatar) { 25 | this.avatar = avatar; 26 | } 27 | 28 | public String getUrl() { 29 | return url; 30 | } 31 | 32 | public void setUrl(String url) { 33 | this.url = url; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/Place.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | public class Place { 6 | 7 | public String name = ""; 8 | public String latitude = ""; 9 | public String longitude = ""; 10 | public String url = ""; 11 | 12 | @NonNull 13 | @Override 14 | public String toString() { 15 | return this.getName(); 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public String getLatitude() { 27 | return latitude; 28 | } 29 | 30 | public void setLatitude(String latitude) { 31 | this.latitude = latitude; 32 | } 33 | 34 | public String getLongitude() { 35 | return longitude; 36 | } 37 | 38 | public void setLongitude(String longitude) { 39 | this.longitude = longitude; 40 | } 41 | 42 | public String getUrl() { 43 | return url; 44 | } 45 | 46 | public void setUrl(String url) { 47 | this.url = url; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/PostListItem.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class PostListItem { 4 | 5 | public String name; 6 | public String content; 7 | public String url; 8 | public String published; 9 | public String postStatus; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public String getContent() { 20 | return content; 21 | } 22 | 23 | public void setContent(String content) { 24 | this.content = content; 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url; 33 | } 34 | 35 | public String getPublished() { 36 | return published; 37 | } 38 | 39 | public void setPublished(String published) { 40 | this.published = published; 41 | } 42 | 43 | public String getPostStatus() { 44 | return postStatus; 45 | } 46 | 47 | public void setPostStatus(String postStatus) { 48 | this.postStatus = postStatus; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/PostType.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class PostType { 4 | 5 | private String id; 6 | private String name; 7 | 8 | public PostType(String id, String name) { 9 | this.id = id; 10 | this.name = name; 11 | } 12 | 13 | public String getId() { 14 | return id; 15 | } 16 | 17 | public void setId(String id) { 18 | this.id = id; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | // To display an object as a string in spinner. 30 | @Override 31 | public String toString() { 32 | return name; 33 | } 34 | 35 | @Override 36 | public boolean equals(Object obj) { 37 | if (obj instanceof PostType) { 38 | PostType pt = (PostType) obj; 39 | return pt.getName().equals(name) && pt.getId().equals(id); 40 | } 41 | 42 | return false; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/Syndication.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class Syndication { 4 | 5 | private String uid; 6 | private String name; 7 | private boolean checked = false; 8 | 9 | public String getUid() { 10 | return uid; 11 | } 12 | 13 | public void setUid(String uid) { 14 | this.uid = uid; 15 | } 16 | 17 | public String getName() { 18 | return name; 19 | } 20 | 21 | public void setName(String name) { 22 | this.name = name; 23 | } 24 | 25 | public boolean isChecked() { 26 | return checked; 27 | } 28 | 29 | public void setChecked(boolean checked) { 30 | this.checked = checked; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/model/TimelineStyle.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.model; 2 | 3 | public class TimelineStyle { 4 | 5 | public static final int TIMELINE_STYLE_COMPACT = 0; 6 | public static final int TIMELINE_STYLE_SUMMARY = 1; 7 | 8 | public static final String TABLE_NAME = "timeline_style"; 9 | public static final String COLUMN_TYPE = "type"; 10 | public static final String COLUMN_CHANNEL_ID = "channel"; 11 | 12 | public static final String CREATE_TABLE = 13 | "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + "(" 14 | + COLUMN_TYPE + " INTEGER," 15 | + COLUMN_CHANNEL_ID + " TEXT" 16 | + ")"; 17 | 18 | private Integer type; 19 | private String channel_id = ""; 20 | 21 | public Integer getType() { 22 | return type; 23 | } 24 | 25 | public void setType(Integer type) { 26 | this.type = type; 27 | } 28 | 29 | public String getChannelId() { 30 | return channel_id; 31 | } 32 | 33 | public void setChannelId(String channel_id) { 34 | this.channel_id = channel_id; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pixelfed/AuthenticatorPixelfed.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pixelfed; 2 | 3 | import android.accounts.AccountAuthenticatorResponse; 4 | import android.accounts.AccountManager; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import com.indieweb.indigenous.users.AuthActivity; 9 | import com.indieweb.indigenous.users.AuthenticatorBase; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.PIXELFED_ACCOUNT_TYPE; 12 | import static com.indieweb.indigenous.users.AuthActivity.PIXELFED_TOKEN_TYPE; 13 | 14 | public class AuthenticatorPixelfed extends AuthenticatorBase { 15 | 16 | private final Context context; 17 | 18 | public AuthenticatorPixelfed(Context context) { 19 | super(context); 20 | this.context = context; 21 | } 22 | 23 | @Override 24 | public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) { 25 | final Intent intent = new Intent(context, AuthActivity.class); 26 | intent.putExtra("com.indieweb.indigenous.AccountType", accountType); 27 | intent.putExtra(PIXELFED_TOKEN_TYPE, authTokenType); 28 | final Bundle bundle = new Bundle(); 29 | bundle.putParcelable(AccountManager.KEY_INTENT, intent); 30 | return bundle; 31 | } 32 | 33 | @Override 34 | public String getAuthTokenLabel(String authTokenType) { 35 | return PIXELFED_ACCOUNT_TYPE; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pixelfed/AuthenticatorServicePixelfed.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pixelfed; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | 7 | public class AuthenticatorServicePixelfed extends Service { 8 | 9 | private AuthenticatorPixelfed authenticator; 10 | 11 | @Override 12 | public void onCreate() { 13 | authenticator = new AuthenticatorPixelfed(this); 14 | } 15 | 16 | @Override 17 | public IBinder onBind(Intent intent) { 18 | return authenticator.getIBinder(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pixelfed/PixelfedGeneral.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pixelfed; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.GeneralBase; 5 | import com.indieweb.indigenous.MainActivity; 6 | import com.indieweb.indigenous.R; 7 | import com.indieweb.indigenous.model.User; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class PixelfedGeneral extends GeneralBase { 12 | 13 | public PixelfedGeneral(Context context, User user) { 14 | super(context, user); 15 | } 16 | 17 | @Override 18 | public boolean supports(String feature) { 19 | boolean supported = true; 20 | 21 | switch (feature) { 22 | case FEATURE_CHANNELS_REFRESH: 23 | case FEATURE_CHANNELS_MANAGE: 24 | case FEATURE_CHANNELS_SHOW_SOURCES: 25 | case FEATURE_CHANNELS_HIDE_READ: 26 | case FEATURE_CHANNELS_READ_LATER: 27 | case FEATURE_CONTACTS: 28 | case FEATURE_UPLOAD: 29 | case FEATURE_POSTS: 30 | supported = false; 31 | break; 32 | } 33 | 34 | return supported; 35 | } 36 | 37 | @Override 38 | public void handlePostActionButtonClick() { 39 | ((MainActivity) this.getContext()).clickOnMenuItem(R.id.createArticle); 40 | } 41 | 42 | @Override 43 | public void handleWritePostClick() { 44 | this.handlePostActionButtonClick(); 45 | } 46 | 47 | @Override 48 | public boolean hidePostTypes() { 49 | return true; 50 | } 51 | 52 | @Override 53 | public ArrayList getProtectedPostTypes() { 54 | ArrayList protectedTypes = new ArrayList<>(); 55 | protectedTypes.add(R.id.createArticle); 56 | return protectedTypes; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pleroma/AuthenticatorPleroma.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pleroma; 2 | 3 | import android.accounts.AccountAuthenticatorResponse; 4 | import android.accounts.AccountManager; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import com.indieweb.indigenous.users.AuthActivity; 9 | import com.indieweb.indigenous.users.AuthenticatorBase; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.PLEROMA_ACCOUNT_TYPE; 12 | import static com.indieweb.indigenous.users.AuthActivity.PLEROMA_TOKEN_TYPE; 13 | 14 | public class AuthenticatorPleroma extends AuthenticatorBase { 15 | 16 | private final Context context; 17 | 18 | public AuthenticatorPleroma(Context context) { 19 | super(context); 20 | this.context = context; 21 | } 22 | 23 | @Override 24 | public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) { 25 | final Intent intent = new Intent(context, AuthActivity.class); 26 | intent.putExtra("com.indieweb.indigenous.AccountType", accountType); 27 | intent.putExtra(PLEROMA_TOKEN_TYPE, authTokenType); 28 | final Bundle bundle = new Bundle(); 29 | bundle.putParcelable(AccountManager.KEY_INTENT, intent); 30 | return bundle; 31 | } 32 | 33 | @Override 34 | public String getAuthTokenLabel(String authTokenType) { 35 | return PLEROMA_ACCOUNT_TYPE; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pleroma/AuthenticatorServicePleroma.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pleroma; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | 7 | public class AuthenticatorServicePleroma extends Service { 8 | 9 | private AuthenticatorPleroma authenticator; 10 | 11 | @Override 12 | public void onCreate() { 13 | authenticator = new AuthenticatorPleroma(this); 14 | } 15 | 16 | @Override 17 | public IBinder onBind(Intent intent) { 18 | return authenticator.getIBinder(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/pleroma/PleromaGeneral.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.pleroma; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.GeneralBase; 5 | import com.indieweb.indigenous.MainActivity; 6 | import com.indieweb.indigenous.R; 7 | import com.indieweb.indigenous.model.User; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class PleromaGeneral extends GeneralBase { 12 | 13 | public PleromaGeneral(Context context, User user) { 14 | super(context, user); 15 | } 16 | 17 | @Override 18 | public boolean supports(String feature) { 19 | boolean supported = true; 20 | 21 | switch (feature) { 22 | case FEATURE_CHANNELS_REFRESH: 23 | case FEATURE_CHANNELS_MANAGE: 24 | case FEATURE_CHANNELS_SHOW_SOURCES: 25 | case FEATURE_CHANNELS_HIDE_READ: 26 | case FEATURE_CHANNELS_READ_LATER: 27 | case FEATURE_CONTACTS: 28 | case FEATURE_UPLOAD: 29 | case FEATURE_POSTS: 30 | supported = false; 31 | break; 32 | } 33 | 34 | return supported; 35 | } 36 | 37 | @Override 38 | public void handlePostActionButtonClick() { 39 | ((MainActivity) this.getContext()).clickOnMenuItem(R.id.createArticle); 40 | } 41 | 42 | @Override 43 | public void handleWritePostClick() { 44 | this.handlePostActionButtonClick(); 45 | } 46 | 47 | @Override 48 | public boolean hidePostTypes() { 49 | return true; 50 | } 51 | 52 | @Override 53 | public ArrayList getProtectedPostTypes() { 54 | ArrayList protectedTypes = new ArrayList<>(); 55 | protectedTypes.add(R.id.createArticle); 56 | return protectedTypes; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/ArticleActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class ArticleActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | canAddMedia = true; 13 | canAddLocation = true; 14 | addCounter = true; 15 | setContentView(R.layout.activity_article); 16 | super.onCreate(savedInstanceState); 17 | setTitle(post.getMainPostTitle()); 18 | } 19 | 20 | @Override 21 | public void onPostButtonClick(MenuItem item) { 22 | boolean hasErrors = false; 23 | 24 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 25 | saveDraft("article", null); 26 | return; 27 | } 28 | 29 | if (post.supports(Post.FEATURE_TITLE) && TextUtils.isEmpty(title.getText())) { 30 | hasErrors = true; 31 | title.setError(getString(R.string.required_field)); 32 | } 33 | 34 | if (TextUtils.isEmpty(body.getText())) { 35 | hasErrors = true; 36 | body.setError(getString(R.string.required_field)); 37 | } 38 | 39 | if (!hasErrors) { 40 | sendBasePost(item); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/BookmarkActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class BookmarkActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | urlPostKey = "bookmark-of"; 13 | autoSubmit = "pref_key_share_bookmark_auto_submit"; 14 | addCounter = true; 15 | setContentView(R.layout.activity_bookmark); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | 22 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 23 | saveDraft("bookmark", null); 24 | return; 25 | } 26 | 27 | if (TextUtils.isEmpty(url.getText())) { 28 | url.setError(getString(R.string.required_field)); 29 | } else { 30 | sendBasePost(item); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/CheckinActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.view.MenuItem; 5 | import com.indieweb.indigenous.R; 6 | 7 | public class CheckinActivity extends BaseCreate { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | canAddMedia = true; 12 | canAddLocation = true; 13 | isCheckin = true; 14 | addCounter = true; 15 | setContentView(R.layout.activity_checkin); 16 | super.onCreate(savedInstanceState); 17 | if (!preparedDraft && !isTesting) { 18 | startLocationUpdates(); 19 | } 20 | } 21 | 22 | @Override 23 | public void onPostButtonClick(MenuItem item) { 24 | 25 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 26 | saveDraft("checkin", null); 27 | return; 28 | } 29 | 30 | sendBasePost(item); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/GeocacheActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.view.MenuItem; 5 | import com.indieweb.indigenous.R; 6 | import com.indieweb.indigenous.model.Draft; 7 | 8 | public class GeocacheActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | canAddMedia = true; 13 | canAddLocation = true; 14 | isCheckin = true; 15 | addCounter = true; 16 | setContentView(R.layout.activity_geocache); 17 | geocacheLogType = findViewById(R.id.geocacheLogType); 18 | super.onCreate(savedInstanceState); 19 | if (!preparedDraft && !isTesting) { 20 | startLocationUpdates(); 21 | } 22 | } 23 | 24 | @Override 25 | public void onPostButtonClick(MenuItem item) { 26 | 27 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 28 | Draft draft = new Draft(); 29 | draft.setSpinner(geocacheLogType.getSelectedItem().toString()); 30 | saveDraft("geocache", draft); 31 | return; 32 | } 33 | 34 | bodyParams.put("geocache-log-type", getResources().getStringArray(R.array.geocache_array_values)[geocacheLogType.getSelectedItemPosition()]); 35 | sendBasePost(item); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/IssueActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class IssueActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | urlPostKey = "in-reply-to"; 13 | addCounter = true; 14 | canAddMedia = true; 15 | setContentView(R.layout.activity_issue); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | boolean hasErrors = false; 22 | 23 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 24 | saveDraft("issue", null); 25 | return; 26 | } 27 | 28 | if (TextUtils.isEmpty(url.getText())) { 29 | hasErrors = true; 30 | url.setError(getString(R.string.required_field)); 31 | } 32 | 33 | if (TextUtils.isEmpty(title.getText())) { 34 | hasErrors = true; 35 | title.setError(getString(R.string.required_field)); 36 | } 37 | 38 | if (TextUtils.isEmpty(body.getText())) { 39 | hasErrors = true; 40 | body.setError(getString(R.string.required_field)); 41 | } 42 | 43 | if (!hasErrors) { 44 | sendBasePost(item); 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/LikeActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class LikeActivity extends BaseCreate { 9 | 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | urlPostKey = "like-of"; 14 | autoSubmit = "pref_key_share_like_auto_submit"; 15 | setContentView(R.layout.activity_like); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | 22 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 23 | saveDraft("like", null); 24 | return; 25 | } 26 | 27 | if (TextUtils.isEmpty(url.getText())) { 28 | url.setError(getString(R.string.required_field)); 29 | } else { 30 | sendBasePost(item); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/NoteActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class NoteActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | canAddMedia = true; 13 | canAddLocation = true; 14 | addCounter = true; 15 | setContentView(R.layout.activity_note); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | 22 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 23 | saveDraft("note", null); 24 | return; 25 | } 26 | 27 | if (TextUtils.isEmpty(body.getText())) { 28 | body.setError(getString(R.string.required_field)); 29 | } else { 30 | sendBasePost(item); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/PostBase.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.content.Context; 4 | import android.widget.MultiAutoCompleteTextView; 5 | import com.indieweb.indigenous.R; 6 | import com.indieweb.indigenous.model.User; 7 | 8 | abstract public class PostBase implements Post { 9 | 10 | private final Context context; 11 | private final User user; 12 | 13 | public PostBase(Context context, User user) { 14 | this.context = context; 15 | this.user = user; 16 | } 17 | 18 | public Context getContext() { 19 | return context; 20 | } 21 | 22 | public User getUser() { 23 | return user; 24 | } 25 | 26 | @Override 27 | public boolean supportsPostParam(String name) { 28 | return true; 29 | } 30 | 31 | @Override 32 | public boolean useMediaEndpoint() { 33 | return true; 34 | } 35 | 36 | @Override 37 | public String getPostParamName(String name) { 38 | return name; 39 | } 40 | 41 | @Override 42 | public void prepareTagsAutocomplete(MultiAutoCompleteTextView tags) { 43 | } 44 | 45 | @Override 46 | public void prepareContactsAutocomplete(MultiAutoCompleteTextView body) { 47 | } 48 | 49 | @Override 50 | public boolean hideUrlField() { 51 | return false; 52 | } 53 | 54 | @Override 55 | public String anonymousPostMessage() { 56 | return getContext().getString(R.string.no_anonymous_posting); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/PostFactory.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import com.indieweb.indigenous.indieweb.micropub.IndieWebPost; 6 | import com.indieweb.indigenous.mastodon.MastodonPost; 7 | import com.indieweb.indigenous.model.User; 8 | import com.indieweb.indigenous.pixelfed.PixelfedPost; 9 | import com.indieweb.indigenous.pleroma.PleromaPost; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.*; 12 | 13 | public class PostFactory { 14 | 15 | @NonNull 16 | public static Post getPost(User user, Context context) { 17 | String type = "indieweb"; 18 | 19 | if (user.isAuthenticated()) { 20 | if (user.getAccountType().equals(PIXELFED_ACCOUNT_TYPE)) { 21 | type = "pixelfed"; 22 | } 23 | if (user.getAccountType().equals(MASTODON_ACCOUNT_TYPE)) { 24 | type = "mastodon"; 25 | } 26 | if (user.getAccountType().equals(PLEROMA_ACCOUNT_TYPE)) { 27 | type = "pleroma"; 28 | } 29 | } 30 | 31 | switch (type) { 32 | case "indieweb": 33 | return new IndieWebPost(context, user); 34 | case "pixelfed": 35 | return new PixelfedPost(context, user); 36 | case "pleroma": 37 | return new PleromaPost(context, user); 38 | case "mastodon": 39 | return new MastodonPost(context, user); 40 | } 41 | 42 | return null; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/ReadActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | import com.indieweb.indigenous.model.Draft; 8 | import com.indieweb.indigenous.util.Preferences; 9 | 10 | public class ReadActivity extends BaseCreate { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | urlPostKey = "read-of"; 15 | addCounter = true; 16 | setContentView(R.layout.activity_read); 17 | read = findViewById(R.id.read); 18 | super.onCreate(savedInstanceState); 19 | if (!preparedDraft) { 20 | read.setSelection(Preferences.getPreference(getApplicationContext(), "pref_key_read_default", 1)); 21 | } 22 | } 23 | 24 | @Override 25 | public void onPostButtonClick(MenuItem item) { 26 | 27 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 28 | Draft draft = new Draft(); 29 | draft.setSpinner(read.getSelectedItem().toString()); 30 | saveDraft("read", draft); 31 | return; 32 | } 33 | 34 | if (TextUtils.isEmpty(url.getText())) { 35 | url.setError(getString(R.string.required_field)); 36 | } else { 37 | if (read.getSelectedItemPosition() != 0) { 38 | String readStatus = getResources().getStringArray(R.array.read_array_post_values)[read.getSelectedItemPosition()]; 39 | bodyParams.put("read-status", readStatus); 40 | } 41 | sendBasePost(item); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/ReplyActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class ReplyActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | urlPostKey = "in-reply-to"; 13 | addCounter = true; 14 | canAddMedia = true; 15 | setContentView(R.layout.activity_reply); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | boolean hasErrors = false; 22 | 23 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 24 | saveDraft("reply", null); 25 | return; 26 | } 27 | 28 | if (TextUtils.isEmpty(url.getText())) { 29 | hasErrors = true; 30 | url.setError(getString(R.string.required_field)); 31 | } 32 | 33 | if (TextUtils.isEmpty(body.getText())) { 34 | hasErrors = true; 35 | body.setError(getString(R.string.required_field)); 36 | } 37 | 38 | if (!hasErrors) { 39 | sendBasePost(item); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/RepostActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | 8 | public class RepostActivity extends BaseCreate { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | urlPostKey = "repost-of"; 13 | autoSubmit = "pref_key_share_repost_auto_submit"; 14 | addCounter = true; 15 | setContentView(R.layout.activity_repost); 16 | super.onCreate(savedInstanceState); 17 | } 18 | 19 | @Override 20 | public void onPostButtonClick(MenuItem item) { 21 | 22 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 23 | saveDraft("repost", null); 24 | return; 25 | } 26 | 27 | if (TextUtils.isEmpty(url.getText())) { 28 | url.setError(getString(R.string.required_field)); 29 | } else { 30 | sendBasePost(item); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/RsvpActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.view.MenuItem; 6 | import com.indieweb.indigenous.R; 7 | import com.indieweb.indigenous.model.Draft; 8 | 9 | public class RsvpActivity extends BaseCreate { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | urlPostKey = "in-reply-to"; 14 | addCounter = true; 15 | setContentView(R.layout.activity_rsvp); 16 | rsvp = findViewById(R.id.rsvp); 17 | super.onCreate(savedInstanceState); 18 | } 19 | 20 | @Override 21 | public void onPostButtonClick(MenuItem item) { 22 | 23 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 24 | Draft draft = new Draft(); 25 | draft.setSpinner(rsvp.getSelectedItem().toString()); 26 | saveDraft("rsvp", draft); 27 | return; 28 | } 29 | 30 | if (TextUtils.isEmpty(url.getText())) { 31 | url.setError(getString(R.string.required_field)); 32 | } else { 33 | bodyParams.put("rsvp", getResources().getStringArray(R.array.rsvp_array_values)[rsvp.getSelectedItemPosition()]); 34 | sendBasePost(item); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/SendPostInterface.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.view.MenuItem; 4 | 5 | public interface SendPostInterface { 6 | 7 | /** 8 | * Onclick method that is called when hitting the send post button. 9 | *

10 | * Add extra params to send in the post request into bodyParams. 11 | *

12 | * Call sendBasePost(item); at the end to send the request. 13 | */ 14 | @SuppressWarnings("unused") 15 | void onPostButtonClick(MenuItem item); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/UploadActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.view.MenuItem; 5 | import android.view.View; 6 | import com.google.android.material.snackbar.Snackbar; 7 | import com.indieweb.indigenous.R; 8 | import com.indieweb.indigenous.util.Preferences; 9 | 10 | public class UploadActivity extends BaseCreate { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | isMediaRequest = true; 15 | finishActivity = false; 16 | canAddMedia = true; 17 | setContentView(R.layout.activity_upload); 18 | super.onCreate(savedInstanceState); 19 | 20 | if (title != null && Preferences.getPreference(getApplicationContext(), "pref_key_media_name", false)) { 21 | title.setVisibility(View.VISIBLE); 22 | } 23 | } 24 | 25 | @Override 26 | public void onPostButtonClick(MenuItem item) { 27 | if (image.size() == 1 || video.size() == 1 || audio.size() == 1) { 28 | sendBasePost(item); 29 | } else { 30 | Snackbar.make(layout, getString(R.string.required_select_media), Snackbar.LENGTH_SHORT).show(); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/post/VenueActivity.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.post; 2 | 3 | import android.os.Bundle; 4 | import android.view.MenuItem; 5 | import com.indieweb.indigenous.R; 6 | 7 | public class VenueActivity extends BaseCreate { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | canAddMedia = true; 12 | canAddLocation = true; 13 | isCheckin = true; 14 | addCounter = true; 15 | hType = "card"; 16 | setContentView(R.layout.activity_venue); 17 | super.onCreate(savedInstanceState); 18 | if (!preparedDraft && !isTesting) { 19 | startLocationUpdates(); 20 | } 21 | } 22 | 23 | @Override 24 | public void onPostButtonClick(MenuItem item) { 25 | 26 | if (saveAsDraft != null && saveAsDraft.isChecked()) { 27 | saveDraft("venue", null); 28 | return; 29 | } 30 | 31 | sendBasePost(item); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/users/Auth.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.users; 2 | 3 | import android.widget.RelativeLayout; 4 | import com.indieweb.indigenous.model.User; 5 | 6 | public interface Auth { 7 | 8 | /** 9 | * Sync an account. 10 | * 11 | * @param layout The current layout 12 | */ 13 | void syncAccount(RelativeLayout layout); 14 | 15 | /** 16 | * Revoke a token. 17 | * 18 | * @param user The current user. 19 | */ 20 | void revokeToken(User user); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/users/AuthBase.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.users; 2 | 3 | import android.content.Context; 4 | import com.indieweb.indigenous.model.User; 5 | 6 | abstract public class AuthBase implements Auth { 7 | 8 | private final Context context; 9 | private final User user; 10 | 11 | public AuthBase(Context context, User user) { 12 | this.context = context; 13 | this.user = user; 14 | } 15 | 16 | public Context getContext() { 17 | return context; 18 | } 19 | 20 | public User getUser() { 21 | return user; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/users/AuthFactory.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.users; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import com.indieweb.indigenous.indieweb.indieauth.IndiewebAuth; 6 | import com.indieweb.indigenous.mastodon.MastodonAuth; 7 | import com.indieweb.indigenous.model.User; 8 | import com.indieweb.indigenous.pixelfed.PixelfedAuth; 9 | import com.indieweb.indigenous.pleroma.PleromaAuth; 10 | 11 | import static com.indieweb.indigenous.users.AuthActivity.*; 12 | 13 | public class AuthFactory { 14 | 15 | @NonNull 16 | public static Auth getAuth(User user, Context context) { 17 | String type = "indieweb"; 18 | 19 | if (user.isAuthenticated()) { 20 | if (user.getAccountType().equals(PIXELFED_ACCOUNT_TYPE)) { 21 | type = "pixelfed"; 22 | } 23 | if (user.getAccountType().equals(MASTODON_ACCOUNT_TYPE)) { 24 | type = "mastodon"; 25 | } 26 | if (user.getAccountType().equals(PLEROMA_ACCOUNT_TYPE)) { 27 | type = "pleroma"; 28 | } 29 | } 30 | 31 | switch (type) { 32 | case "indieweb": 33 | return new IndiewebAuth(context, user); 34 | case "pixelfed": 35 | return new PixelfedAuth(context, user); 36 | case "pleroma": 37 | return new PleromaAuth(context, user); 38 | case "mastodon": 39 | return new MastodonAuth(context, user); 40 | } 41 | 42 | return null; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/users/AuthenticatorBase.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.users; 2 | 3 | import android.accounts.AbstractAccountAuthenticator; 4 | import android.accounts.Account; 5 | import android.accounts.AccountAuthenticatorResponse; 6 | import android.content.Context; 7 | import android.os.Bundle; 8 | 9 | abstract public class AuthenticatorBase extends AbstractAccountAuthenticator { 10 | 11 | public AuthenticatorBase(Context context) { 12 | super(context); 13 | } 14 | 15 | @Override 16 | public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { 17 | throw new UnsupportedOperationException(); 18 | } 19 | 20 | @Override 21 | public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) { 22 | throw new UnsupportedOperationException(); 23 | } 24 | 25 | @Override 26 | public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) { 27 | throw new UnsupportedOperationException(); 28 | } 29 | 30 | @Override 31 | public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) { 32 | throw new UnsupportedOperationException(); 33 | } 34 | 35 | @Override 36 | public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) { 37 | throw new UnsupportedOperationException(); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/util/VolleyRequestListener.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.util; 2 | 3 | import com.android.volley.VolleyError; 4 | 5 | public interface VolleyRequestListener { 6 | 7 | void OnSuccessRequest(String response); 8 | 9 | void OnFailureRequest(VolleyError error); 10 | 11 | } -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/util/mf2/JsonList.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.util.mf2; 2 | 3 | import java.util.ArrayList; 4 | 5 | public class JsonList extends ArrayList { 6 | 7 | private static final long serialVersionUID = 1280821270688138705L; 8 | 9 | public JsonList() { 10 | super(); 11 | } 12 | 13 | public String toString() { 14 | StringBuilder sb = new StringBuilder("["); 15 | boolean first = true; 16 | for (Object value : this) { 17 | if (!first) { 18 | sb.append(","); 19 | } 20 | first = false; 21 | if (value instanceof String) { 22 | sb.append("\"" + JsonDict.escapeString((String) value) + "\""); 23 | } else { 24 | sb.append(value); 25 | } 26 | } 27 | sb.append("]"); 28 | return sb.toString(); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/indieweb/indigenous/widget/ViewPagerCatchException.java: -------------------------------------------------------------------------------- 1 | package com.indieweb.indigenous.widget; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | import androidx.viewpager.widget.ViewPager; 8 | 9 | // See https://github.com/chrisbanes/PhotoView/issues/31#issuecomment-19803926 10 | public class ViewPagerCatchException extends ViewPager { 11 | 12 | public ViewPagerCatchException(Context context) { 13 | super(context); 14 | } 15 | 16 | public ViewPagerCatchException(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | } 19 | 20 | @SuppressLint("ClickableViewAccessibility") 21 | @Override 22 | public boolean onTouchEvent(MotionEvent ev) { 23 | try { 24 | return super.onTouchEvent(ev); 25 | } catch (IllegalArgumentException ignored) { 26 | } 27 | return false; 28 | } 29 | 30 | @Override 31 | public boolean onInterceptTouchEvent(MotionEvent ev) { 32 | try { 33 | return super.onInterceptTouchEvent(ev); 34 | } catch (IllegalArgumentException ignored) { 35 | } 36 | return false; 37 | } 38 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 10 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avatar.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avatar_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/border_box.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_add.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_add_account.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_article.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_article_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_article_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_attach_file.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_audio_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_audio_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bookmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bookmark_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bookmark_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_close.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_close_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_close_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_create_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_delete.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_delete_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_delete_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_delete_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_drag.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_event.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_event_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_event_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_external.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_external_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_external_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_feed_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_feed_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_filter_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_geocache_idle.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_issue_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_like.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_like_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_like_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_list_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_location_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_map.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_map_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_map_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_mark_all_read.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_media_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_menu_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_menu_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_note.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_note_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_note_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_photo_add_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_read.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_read_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_read_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_reply.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_reply_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_reply_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_repost.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_repost_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_repost_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_rsvp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_rsvp_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_rsvp_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_send_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_swap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_swap_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_swap_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_swap_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_swap_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_sync.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_sync_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_sync_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_trip_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_update_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_update_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_venue_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_video.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_video_idle.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_video_pressed.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/clipboard.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_mono.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/indieweb.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/loading.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_accounts.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_contacts.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_create.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_drafts.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_help.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_reader.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_settings.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/no_connection.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/red_marker.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_border_text_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/settings_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_article.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_checkin.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_debug.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_drafts.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_geocache.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_manage_feed.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 19 | 20 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_note.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_reply.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_rsvp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_source_post_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 20 | 21 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_source_post_list_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 21 | 22 | 31 | 32 |