From 2bc28db2cc1ac440930cf6c602c797f028db6216 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Tue, 27 Sep 2022 11:23:16 +0200 Subject: [PATCH] Removed chrome custom tabs. --- androidApp/build.gradle.kts | 1 - .../android/HomeActivity.kt | 16 -- .../android/adapters/ItemCardAdapter.kt | 39 ++--- .../android/adapters/ItemListAdapter.kt | 12 +- .../android/fragments/ArticleFragment.kt | 34 +--- .../android/utils/LinksUtils.kt | 133 ++------------- .../customtabs/CustomTabActivityHelper.java | 153 ------------------ .../utils/customtabs/CustomTabsHelper.java | 129 --------------- .../utils/customtabs/ServiceConnection.java | 33 ---- .../customtabs/ServiceConnectionCallback.java | 19 --- .../customtabs/helpers/KeepAliveService.java | 15 -- .../ic_chrome_reader_mode_white_24dp.xml | 9 -- .../src/main/res/menu/reader_toolbar.xml | 6 - .../src/main/res/values-ca-rES/strings.xml | 9 +- .../src/main/res/values-de-rDE/strings.xml | 9 +- .../src/main/res/values-es-rES/strings.xml | 9 +- .../src/main/res/values-fa-rIR/strings.xml | 9 +- .../src/main/res/values-fr-rFR/strings.xml | 9 +- .../src/main/res/values-gl-rES/strings.xml | 9 +- .../src/main/res/values-in-rID/strings.xml | 9 +- .../src/main/res/values-it-rIT/strings.xml | 9 +- .../src/main/res/values-ko-rKR/strings.xml | 9 +- .../src/main/res/values-nl-rNL/strings.xml | 9 +- .../src/main/res/values-pt-rBR/strings.xml | 9 +- .../src/main/res/values-pt-rPT/strings.xml | 9 +- .../src/main/res/values-si-rLK/strings.xml | 9 +- .../src/main/res/values-tr-rTR/strings.xml | 9 +- .../src/main/res/values-zh-rCN/strings.xml | 9 +- .../src/main/res/values-zh-rTW/strings.xml | 9 +- androidApp/src/main/res/values/strings.xml | 9 +- androidApp/src/main/res/xml/pref_general.xml | 14 +- .../service/AppSettingsService.kt | 13 -- 32 files changed, 89 insertions(+), 690 deletions(-) delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabActivityHelper.java delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabsHelper.java delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnection.java delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnectionCallback.java delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/helpers/KeepAliveService.java delete mode 100644 androidApp/src/main/res/drawable/ic_chrome_reader_mode_white_24dp.xml diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 665c3af..713cc7b 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -129,7 +129,6 @@ dependencies { implementation("androidx.recyclerview:recyclerview:1.3.0-alpha01") implementation("androidx.legacy:legacy-support-v4:1.0.0") implementation("androidx.vectordrawable:vectordrawable:1.2.0-alpha02") - implementation("androidx.browser:browser:1.4.0") implementation("androidx.cardview:cardview:1.0.0") implementation("androidx.annotation:annotation:1.3.0") implementation("androidx.work:work-runtime-ktx:2.7.1") diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt index 3acb5f1..6509219 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt @@ -36,7 +36,6 @@ import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.android.utils.bottombar.maybeShow import bou.amine.apps.readerforselfossv2.android.utils.bottombar.removeBadge -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.CustomTabActivityHelper import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.repository.Repository import bou.amine.apps.readerforselfossv2.service.AppSettingsService @@ -82,7 +81,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar private lateinit var tabNewBadge: TextBadgeItem private lateinit var tabArchiveBadge: TextBadgeItem private lateinit var tabStarredBadge: TextBadgeItem - private lateinit var customTabActivityHelper: CustomTabActivityHelper private lateinit var appColors: AppColors private var offset: Int = 0 private var firstVisible: Int = 0 @@ -106,11 +104,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar data class DrawerData(val tags: List?, val sources: List?) - override fun onStart() { - super.onStart() - customTabActivityHelper.bindCustomTabsService(this) - } - override fun onCreate(savedInstanceState: Bundle?) { // Add appcolors to DI @@ -136,8 +129,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar binding.drawerContainer.addDrawerListener(mDrawerToggle) mDrawerToggle.syncState() - customTabActivityHelper = CustomTabActivityHelper() - handleBottomBar() initDrawer() @@ -299,11 +290,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar getElementsAccordingToTab() } - override fun onStop() { - super.onStop() - customTabActivityHelper.unbindCustomTabsService(this) - } - private fun initDrawer() { DrawerImageLoader.init(object : AbstractDrawerImageLoader() { override fun set(imageView: ImageView, uri: Uri, placeholder: Drawable, tag: String?) { @@ -725,7 +711,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar ItemCardAdapter( this, items, - customTabActivityHelper, appColors, ) { updateItems(it) @@ -735,7 +720,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar ItemListAdapter( this, items, - customTabActivityHelper, appColors, ) { updateItems(it) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt index 23073d7..e418b6a 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt @@ -12,7 +12,6 @@ import bou.amine.apps.readerforselfossv2.android.databinding.CardItemBinding import bou.amine.apps.readerforselfossv2.android.model.toTextDrawableString import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.* -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.CustomTabActivityHelper import bou.amine.apps.readerforselfossv2.android.utils.glide.bitmapCenterCrop import bou.amine.apps.readerforselfossv2.android.utils.glide.circularBitmapDrawable import bou.amine.apps.readerforselfossv2.model.SelfossModel @@ -34,7 +33,6 @@ import org.kodein.di.instance class ItemCardAdapter( override val app: Activity, override var items: ArrayList, - private val helper: CustomTabActivityHelper, override val appColors: AppColors, override val updateItems: (ArrayList) -> Unit ) : ItemsAdapter() { @@ -44,8 +42,8 @@ class ItemCardAdapter( c.resources.getDimension(R.dimen.card_image_max_height).toInt() override val di: DI by closestDI(app) - override val repository : Repository by instance() - override val appSettingsService : AppSettingsService by instance() + override val repository: Repository by instance() + override val appSettingsService: AppSettingsService by instance() override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val binding = CardItemBinding.inflate(LayoutInflater.from(parent.context), parent, false) @@ -83,10 +81,10 @@ class ItemCardAdapter( val color = generator.getColor(itm.title.getHtmlDecoded()) val drawable = - TextDrawable - .builder() - .round() - .build(itm.title.getHtmlDecoded().toTextDrawableString(), color) + TextDrawable + .builder() + .round() + .build(itm.title.getHtmlDecoded().toTextDrawableString(), color) binding.sourceImage.setImageDrawable(drawable) } else { c.circularBitmapDrawable(itm.getIcon(repository.baseUrl), binding.sourceImage) @@ -101,7 +99,7 @@ class ItemCardAdapter( inner class ViewHolder(val binding: CardItemBinding) : RecyclerView.ViewHolder(binding.root) { init { handleClickListeners() - handleCustomTabActions() + handleLinkOpening() } private fun handleClickListeners() { @@ -111,41 +109,34 @@ class ItemCardAdapter( if (item.starred) { CoroutineScope(Dispatchers.IO).launch { repository.unstarr(item) - // TODO: Handle failure } item.starred = false binding.favButton.isSelected = false } else { CoroutineScope(Dispatchers.IO).launch { repository.starr(item) - // TODO: Handle failure } item.starred = true binding.favButton.isSelected = true } } - binding.shareBtn.setOnClickListener { - val item = items[bindingAdapterPosition] - c.shareLink(item.getLinkDecoded(), item.title.getHtmlDecoded()) - } - - binding.browserBtn.setOnClickListener { - c.openInBrowserAsNewTask(items[bindingAdapterPosition]) - } + binding.shareBtn.setOnClickListener { + val item = items[bindingAdapterPosition] + c.shareLink(item.getLinkDecoded(), item.title.getHtmlDecoded()) } - private fun handleCustomTabActions() { - val customTabsIntent = c.buildCustomTabsIntent() - helper.bindCustomTabsService(app) + binding.browserBtn.setOnClickListener { + c.openInBrowserAsNewTask(items[bindingAdapterPosition]) + } + } + private fun handleLinkOpening() { binding.root.setOnClickListener { c.openItemUrl( items, bindingAdapterPosition, items[bindingAdapterPosition].getLinkDecoded(), - customTabsIntent, - appSettingsService.isInternalBrowserEnabled(), appSettingsService.isArticleViewerEnabled(), app ) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt index b4fef63..ba6964e 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt @@ -9,8 +9,6 @@ import bou.amine.apps.readerforselfossv2.android.databinding.ListItemBinding import bou.amine.apps.readerforselfossv2.android.model.toTextDrawableString import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.LinkOnTouchListener -import bou.amine.apps.readerforselfossv2.android.utils.buildCustomTabsIntent -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.CustomTabActivityHelper import bou.amine.apps.readerforselfossv2.android.utils.glide.bitmapCenterCrop import bou.amine.apps.readerforselfossv2.android.utils.glide.circularBitmapDrawable import bou.amine.apps.readerforselfossv2.android.utils.openItemUrl @@ -29,7 +27,6 @@ import org.kodein.di.instance class ItemListAdapter( override val app: Activity, override var items: ArrayList, - private val helper: CustomTabActivityHelper, override val appColors: AppColors, override val updateItems: (ArrayList) -> Unit ) : ItemsAdapter() { @@ -83,20 +80,15 @@ class ItemListAdapter( inner class ViewHolder(val binding: ListItemBinding) : RecyclerView.ViewHolder(binding.root) { init { - handleCustomTabActions() + handleLinkOpening() } - private fun handleCustomTabActions() { - val customTabsIntent = c.buildCustomTabsIntent() - helper.bindCustomTabsService(app) - + private fun handleLinkOpening() { binding.root.setOnClickListener { c.openItemUrl( items, bindingAdapterPosition, items[bindingAdapterPosition].getLinkDecoded(), - customTabsIntent, - appSettingsService.isInternalBrowserEnabled(), appSettingsService.isArticleViewerEnabled(), app ) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt index 7e24dea..3e3558b 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt @@ -15,7 +15,6 @@ import android.webkit.WebView import android.webkit.WebViewClient import android.widget.Toast import androidx.appcompat.app.AlertDialog -import androidx.browser.customtabs.CustomTabsIntent import androidx.core.content.res.ResourcesCompat import androidx.core.widget.NestedScrollView import androidx.fragment.app.Fragment @@ -28,11 +27,8 @@ import bou.amine.apps.readerforselfossv2.android.model.ParecelableItem import bou.amine.apps.readerforselfossv2.android.model.toModel import bou.amine.apps.readerforselfossv2.android.model.toParcelable import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.utils.buildCustomTabsIntent -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.CustomTabActivityHelper import bou.amine.apps.readerforselfossv2.android.utils.glide.getBitmapInputStream import bou.amine.apps.readerforselfossv2.android.utils.openInBrowserAsNewTask -import bou.amine.apps.readerforselfossv2.android.utils.openItemUrlInternalBrowser import bou.amine.apps.readerforselfossv2.android.utils.shareLink import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.repository.Repository @@ -64,7 +60,6 @@ import java.util.concurrent.ExecutionException class ArticleFragment : Fragment(), DIAware { private var fontSize: Int = 16 private lateinit var item: SelfossModel.Item - private var mCustomTabActivityHelper: CustomTabActivityHelper? = null private lateinit var url: String private lateinit var contentText: String private lateinit var contentSource: String @@ -86,13 +81,6 @@ class ArticleFragment : Fragment(), DIAware { private var font = "" private var staticBar = false - override fun onStop() { - super.onStop() - if (mCustomTabActivityHelper != null) { - mCustomTabActivityHelper!!.unbindCustomTabsService(activity) - } - } - override fun onCreate(savedInstanceState: Bundle?) { appColors = AppColors(requireActivity()) @@ -145,16 +133,10 @@ class ArticleFragment : Fragment(), DIAware { floatingToolbar.background = ColorDrawable(appColors.colorAccent) - val customTabsIntent = requireActivity().buildCustomTabsIntent() - mCustomTabActivityHelper = CustomTabActivityHelper() - mCustomTabActivityHelper!!.bindCustomTabsService(activity) - - floatingToolbar.setClickListener( object : FloatingToolbar.ItemClickListener { override fun onItemClick(item: MenuItem) { when (item.itemId) { - R.id.more_action -> getContentFromMercury(customTabsIntent) R.id.share_action -> requireActivity().shareLink(url, contentTitle) R.id.open_action -> requireActivity().openInBrowserAsNewTask(this@ArticleFragment.item) R.id.unread_action -> if (context != null) { @@ -200,7 +182,7 @@ class ArticleFragment : Fragment(), DIAware { } if (contentText.isEmptyOrNullOrNullString()) { - getContentFromMercury(customTabsIntent) + getContentFromMercury() } else { binding.titleView.text = contentTitle if (typeface != null) { @@ -266,7 +248,7 @@ class ArticleFragment : Fragment(), DIAware { } } - private fun getContentFromMercury(customTabsIntent: CustomTabsIntent) { + private fun getContentFromMercury() { if (repository.isNetworkAvailable()) { binding.progressBar.visibility = View.VISIBLE val parser = MercuryApi() @@ -333,7 +315,7 @@ class ArticleFragment : Fragment(), DIAware { } } else { try { - openInBrowserAfterFailing(customTabsIntent) + openInBrowserAfterFailing() } catch (e: Exception) { if (context != null) { } @@ -348,7 +330,7 @@ class ArticleFragment : Fragment(), DIAware { override fun onFailure( call: Call, t: Throwable - ) = openInBrowserAfterFailing(customTabsIntent) + ) = openInBrowserAfterFailing() } ) } @@ -507,13 +489,9 @@ class ArticleFragment : Fragment(), DIAware { binding.nestedScrollView.smoothScrollBy(0, -height/2) } - private fun openInBrowserAfterFailing(customTabsIntent: CustomTabsIntent) { + private fun openInBrowserAfterFailing() { binding.progressBar.visibility = View.GONE - requireActivity().openItemUrlInternalBrowser( - url, - customTabsIntent, - requireActivity() - ) + requireActivity().openInBrowserAsNewTask(this@ArticleFragment.item) } companion object { diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/LinksUtils.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/LinksUtils.kt index 20cc998..2dfa44e 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/LinksUtils.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/LinksUtils.kt @@ -15,109 +15,16 @@ import android.view.MotionEvent import android.view.View import android.widget.TextView import android.widget.Toast -import androidx.browser.customtabs.CustomTabsIntent import bou.amine.apps.readerforselfossv2.android.R import bou.amine.apps.readerforselfossv2.android.ReaderActivity -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.CustomTabActivityHelper import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.utils.toStringUriWithHttp import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -fun Context.buildCustomTabsIntent(): CustomTabsIntent { - - val actionIntent = Intent(Intent.ACTION_SEND) - actionIntent.type = "text/plain" - val pflags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - PendingIntent.FLAG_IMMUTABLE - } else { - 0 - } - val createPendingShareIntent: PendingIntent = PendingIntent.getActivity( - this, - 0, - actionIntent, - pflags - ) - - val intentBuilder = CustomTabsIntent.Builder() - - // TODO: change to primary when it's possible to customize custom tabs title color - //intentBuilder.setToolbarColor(c.getResources().getColor(R.color.colorPrimary)); - intentBuilder.setToolbarColor(resources.getColor(R.color.colorAccentDark)) - intentBuilder.setShowTitle(true) - - - intentBuilder.setStartAnimations( - this, - R.anim.slide_in_right, - R.anim.slide_out_left - ) - intentBuilder.setExitAnimations( - this, - android.R.anim.slide_in_left, - android.R.anim.slide_out_right - ) - - val closeicon = BitmapFactory.decodeResource(resources, R.drawable.ic_close_white_24dp) - intentBuilder.setCloseButtonIcon(closeicon) - - val shareLabel = this.getString(R.string.label_share) - val icon = BitmapFactory.decodeResource( - resources, - R.drawable.ic_share_white_24dp - ) - intentBuilder.setActionButton(icon, shareLabel, createPendingShareIntent) - - return intentBuilder.build() -} - -fun Context.openItemUrlInternally( - allItems: ArrayList, - currentItem: Int, - linkDecoded: String, - customTabsIntent: CustomTabsIntent, - articleViewer: Boolean, - app: Activity -) { - if (articleViewer) { - ReaderActivity.allItems = allItems - val intent = Intent(this, ReaderActivity::class.java) - intent.putExtra("currentItem", currentItem) - app.startActivity(intent) - } else { - this.openItemUrlInternalBrowser( - linkDecoded, - customTabsIntent, - app) - } -} - -fun Context.openItemUrlInternalBrowser( - linkDecoded: String, - customTabsIntent: CustomTabsIntent, - app: Activity -) { - try { - CustomTabActivityHelper.openCustomTab( - app, - customTabsIntent, - Uri.parse(linkDecoded) - ) { _, uri -> - val intent = Intent(Intent.ACTION_VIEW, uri) - intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK - startActivity(intent) - } - } catch (e: Exception) { - openInBrowser(linkDecoded, app) - } -} - fun Context.openItemUrl( allItems: ArrayList, currentItem: Int, linkDecoded: String, - customTabsIntent: CustomTabsIntent, - internalBrowser: Boolean, articleViewer: Boolean, app: Activity ) { @@ -129,37 +36,20 @@ fun Context.openItemUrl( Toast.LENGTH_LONG ).show() } else { - if (!internalBrowser) { - openInBrowser(linkDecoded, app) - } else if (articleViewer) { - this.openItemUrlInternally( - allItems, - currentItem, - linkDecoded, - customTabsIntent, - articleViewer, - app - ) + if (articleViewer) { + ReaderActivity.allItems = allItems + val intent = Intent(this, ReaderActivity::class.java) + intent.putExtra("currentItem", currentItem) + app.startActivity(intent) } else { - this.openItemUrlInternalBrowser( - linkDecoded, - customTabsIntent, - app - ) + val intent = Intent(Intent.ACTION_VIEW) + intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK + intent.data = Uri.parse(linkDecoded.toStringUriWithHttp()) + startActivity(intent) } } } -private fun openInBrowser(linkDecoded: String, app: Activity) { - val intent = Intent(Intent.ACTION_VIEW) - intent.data = Uri.parse(linkDecoded) - try { - app.startActivity(intent) - } catch (e: ActivityNotFoundException) { - Toast.makeText(app.baseContext, e.message, Toast.LENGTH_LONG).show() - } -} - fun String.isUrlValid(): Boolean = this.toHttpUrlOrNull() != null && Patterns.WEB_URL.matcher(this).matches() @@ -181,7 +71,7 @@ fun Context.openInBrowserAsNewTask(i: SelfossModel.Item) { startActivity(intent) } -class LinkOnTouchListener: View.OnTouchListener { +class LinkOnTouchListener : View.OnTouchListener { override fun onTouch(v: View?, event: MotionEvent?): Boolean { var ret = false val widget: TextView = v as TextView @@ -191,7 +81,8 @@ class LinkOnTouchListener: View.OnTouchListener { val action = event!!.action if (action == MotionEvent.ACTION_UP || - action == MotionEvent.ACTION_DOWN) { + action == MotionEvent.ACTION_DOWN + ) { var x: Float = event.x var y: Float = event.y diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabActivityHelper.java b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabActivityHelper.java deleted file mode 100644 index cfdd8d8..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabActivityHelper.java +++ /dev/null @@ -1,153 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.utils.customtabs; - - -import android.app.Activity; -import android.net.Uri; -import android.os.Bundle; -import androidx.browser.customtabs.CustomTabsClient; -import androidx.browser.customtabs.CustomTabsIntent; -import androidx.browser.customtabs.CustomTabsServiceConnection; -import androidx.browser.customtabs.CustomTabsSession; - -import java.util.List; - -/** - * This is a helper class to manage the connection to the Custom Tabs Service. - */ -public class CustomTabActivityHelper implements ServiceConnectionCallback { - private CustomTabsSession mCustomTabsSession; - private CustomTabsClient mClient; - private CustomTabsServiceConnection mConnection; - private ConnectionCallback mConnectionCallback; - - /** - * Opens the URL on a Custom Tab if possible. Otherwise fallsback to opening it on a WebView. - * - * @param activity The host activity. - * @param customTabsIntent a CustomTabsIntent to be used if Custom Tabs is available. - * @param uri the Uri to be opened. - * @param fallback a CustomTabFallback to be used if Custom Tabs is not available. - */ - public static void openCustomTab(Activity activity, - CustomTabsIntent customTabsIntent, - Uri uri, - CustomTabFallback fallback) { - String packageName = CustomTabsHelper.getPackageNameToUse(activity); - - //If we cant find a package name, it means theres no browser that supports - //Chrome Custom Tabs installed. So, we fallback to the webview - if (packageName == null) { - if (fallback != null) { - fallback.openUri(activity, uri); - } - } else { - customTabsIntent.intent.setPackage(packageName); - customTabsIntent.launchUrl(activity, uri); - } - } - - /** - * Unbinds the Activity from the Custom Tabs Service. - * - * @param activity the activity that is connected to the service. - */ - public void unbindCustomTabsService(Activity activity) { - if (mConnection == null) return; - activity.unbindService(mConnection); - mClient = null; - mCustomTabsSession = null; - mConnection = null; - } - - /** - * Creates or retrieves an exiting CustomTabsSession. - * - * @return a CustomTabsSession. - */ - public CustomTabsSession getSession() { - if (mClient == null) { - mCustomTabsSession = null; - } else if (mCustomTabsSession == null) { - mCustomTabsSession = mClient.newSession(null); - } - return mCustomTabsSession; - } - - /** - * Register a Callback to be called when connected or disconnected from the Custom Tabs Service. - * - * @param connectionCallback - */ - public void setConnectionCallback(ConnectionCallback connectionCallback) { - this.mConnectionCallback = connectionCallback; - } - - /** - * Binds the Activity to the Custom Tabs Service. - * - * @param activity the activity to be binded to the service. - */ - public void bindCustomTabsService(Activity activity) { - if (mClient != null) return; - - String packageName = CustomTabsHelper.getPackageNameToUse(activity); - if (packageName == null) return; - - mConnection = new ServiceConnection(this); - CustomTabsClient.bindCustomTabsService(activity, packageName, mConnection); - } - - /** - * @return true if call to mayLaunchUrl was accepted. - * @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}. - */ - public boolean mayLaunchUrl(Uri uri, Bundle extras, List otherLikelyBundles) { - if (mClient == null) return false; - - CustomTabsSession session = getSession(); - return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles); - - } - - @Override - public void onServiceConnected(CustomTabsClient client) { - mClient = client; - mClient.warmup(0L); - if (mConnectionCallback != null) mConnectionCallback.onCustomTabsConnected(); - } - - @Override - public void onServiceDisconnected() { - mClient = null; - mCustomTabsSession = null; - if (mConnectionCallback != null) mConnectionCallback.onCustomTabsDisconnected(); - } - - /** - * A Callback for when the service is connected or disconnected. Use those callbacks to - * handle UI changes when the service is connected or disconnected. - */ - public interface ConnectionCallback { - /** - * Called when the service is connected. - */ - void onCustomTabsConnected(); - - /** - * Called when the service is disconnected. - */ - void onCustomTabsDisconnected(); - } - - /** - * To be used as a fallback to open the Uri when Custom Tabs is not available. - */ - public interface CustomTabFallback { - /** - * @param activity The Activity that wants to open the Uri. - * @param uri The uri to be opened by the fallback. - */ - void openUri(Activity activity, Uri uri); - } - -} \ No newline at end of file diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabsHelper.java b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabsHelper.java deleted file mode 100644 index f4fe0d4..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/CustomTabsHelper.java +++ /dev/null @@ -1,129 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.utils.customtabs; - - -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.net.Uri; -import android.text.TextUtils; -import android.util.Log; -import androidx.browser.customtabs.CustomTabsService; -import bou.amine.apps.readerforselfossv2.android.utils.customtabs.helpers.KeepAliveService; - -import java.util.ArrayList; -import java.util.List; - -@SuppressWarnings("ALL") -class CustomTabsHelper { - private static final String TAG = "CustomTabsHelper"; - private static final String STABLE_PACKAGE = "com.android.chrome"; - private static final String BETA_PACKAGE = "com.chrome.beta"; - private static final String DEV_PACKAGE = "com.chrome.dev"; - private static final String LOCAL_PACKAGE = "com.google.android.apps.chrome"; - private static final String EXTRA_CUSTOM_TABS_KEEP_ALIVE = - "android.support.customtabs.extra.KEEP_ALIVE"; - - private static String sPackageNameToUse; - - private CustomTabsHelper() { - } - - public static void addKeepAliveExtra(Context context, Intent intent) { - Intent keepAliveIntent = new Intent().setClassName( - context.getPackageName(), KeepAliveService.class.getCanonicalName()); - intent.putExtra(EXTRA_CUSTOM_TABS_KEEP_ALIVE, keepAliveIntent); - } - - /** - * Goes through all apps that handle VIEW intents and have a warmup service. Picks - * the one chosen by the user if there is one, otherwise makes a best effort to return a - * valid package name. - *

- * This is not threadsafe. - * - * @param context {@link Context} to use for accessing {@link PackageManager}. - * @return The package name recommended to use for connecting to custom tabs related components. - */ - public static String getPackageNameToUse(Context context) { - if (sPackageNameToUse != null) return sPackageNameToUse; - - PackageManager pm = context.getPackageManager(); - // Get default VIEW intent handler. - Intent activityIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.example.com")); - ResolveInfo defaultViewHandlerInfo = pm.resolveActivity(activityIntent, 0); - String defaultViewHandlerPackageName = null; - if (defaultViewHandlerInfo != null) { - defaultViewHandlerPackageName = defaultViewHandlerInfo.activityInfo.packageName; - } - - // Get all apps that can handle VIEW intents. - List resolvedActivityList = pm.queryIntentActivities(activityIntent, 0); - List packagesSupportingCustomTabs = new ArrayList<>(); - for (ResolveInfo info : resolvedActivityList) { - Intent serviceIntent = new Intent(); - serviceIntent.setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION); - serviceIntent.setPackage(info.activityInfo.packageName); - if (pm.resolveService(serviceIntent, 0) != null) { - packagesSupportingCustomTabs.add(info.activityInfo.packageName); - } - } - - // Now packagesSupportingCustomTabs contains all apps that can handle both VIEW intents - // and service calls. - if (packagesSupportingCustomTabs.isEmpty()) { - sPackageNameToUse = null; - } else if (packagesSupportingCustomTabs.size() == 1) { - sPackageNameToUse = packagesSupportingCustomTabs.get(0); - } else if (!TextUtils.isEmpty(defaultViewHandlerPackageName) - && !hasSpecializedHandlerIntents(context, activityIntent) - && packagesSupportingCustomTabs.contains(defaultViewHandlerPackageName)) { - sPackageNameToUse = defaultViewHandlerPackageName; - } else if (packagesSupportingCustomTabs.contains(STABLE_PACKAGE)) { - sPackageNameToUse = STABLE_PACKAGE; - } else if (packagesSupportingCustomTabs.contains(BETA_PACKAGE)) { - sPackageNameToUse = BETA_PACKAGE; - } else if (packagesSupportingCustomTabs.contains(DEV_PACKAGE)) { - sPackageNameToUse = DEV_PACKAGE; - } else if (packagesSupportingCustomTabs.contains(LOCAL_PACKAGE)) { - sPackageNameToUse = LOCAL_PACKAGE; - } - return sPackageNameToUse; - } - - /** - * Used to check whether there is a specialized handler for a given intent. - * - * @param intent The intent to check with. - * @return Whether there is a specialized handler for the given intent. - */ - private static boolean hasSpecializedHandlerIntents(Context context, Intent intent) { - try { - PackageManager pm = context.getPackageManager(); - List handlers = pm.queryIntentActivities( - intent, - PackageManager.GET_RESOLVED_FILTER); - if (handlers == null || handlers.isEmpty()) { - return false; - } - for (ResolveInfo resolveInfo : handlers) { - IntentFilter filter = resolveInfo.filter; - if (filter == null) continue; - if (filter.countDataAuthorities() == 0 || filter.countDataPaths() == 0) continue; - if (resolveInfo.activityInfo == null) continue; - return true; - } - } catch (RuntimeException e) { - Log.e(TAG, "Runtime exception while getting specialized handlers"); - } - return false; - } - - /** - * @return All possible chrome package names that provide custom tabs feature. - */ - public static String[] getPackages() { - return new String[]{"", STABLE_PACKAGE, BETA_PACKAGE, DEV_PACKAGE, LOCAL_PACKAGE}; - } -} diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnection.java b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnection.java deleted file mode 100644 index f1c2214..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnection.java +++ /dev/null @@ -1,33 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.utils.customtabs; - - -import android.content.ComponentName; -import androidx.browser.customtabs.CustomTabsClient; -import androidx.browser.customtabs.CustomTabsServiceConnection; - -import java.lang.ref.WeakReference; - -/** - * Implementation for the CustomTabsServiceConnection that avoids leaking the - * ServiceConnectionCallback - */ -public class ServiceConnection extends CustomTabsServiceConnection { - // A weak reference to the ServiceConnectionCallback to avoid leaking it. - private WeakReference mConnectionCallback; - - public ServiceConnection(ServiceConnectionCallback connectionCallback) { - mConnectionCallback = new WeakReference<>(connectionCallback); - } - - @Override - public void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client) { - ServiceConnectionCallback connectionCallback = mConnectionCallback.get(); - if (connectionCallback != null) connectionCallback.onServiceConnected(client); - } - - @Override - public void onServiceDisconnected(ComponentName name) { - ServiceConnectionCallback connectionCallback = mConnectionCallback.get(); - if (connectionCallback != null) connectionCallback.onServiceDisconnected(); - } -} \ No newline at end of file diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnectionCallback.java b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnectionCallback.java deleted file mode 100644 index 78a34fa..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/ServiceConnectionCallback.java +++ /dev/null @@ -1,19 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.utils.customtabs; - - -import androidx.browser.customtabs.CustomTabsClient; - - -public interface ServiceConnectionCallback { - /** - * Called when the service is connected. - * - * @param client a CustomTabsClient - */ - void onServiceConnected(CustomTabsClient client); - - /** - * Called when the service is disconnected. - */ - void onServiceDisconnected(); -} diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/helpers/KeepAliveService.java b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/helpers/KeepAliveService.java deleted file mode 100644 index c754941..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/utils/customtabs/helpers/KeepAliveService.java +++ /dev/null @@ -1,15 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.utils.customtabs.helpers; - -import android.app.Service; -import android.content.Intent; -import android.os.Binder; -import android.os.IBinder; - -public class KeepAliveService extends Service { - private static final Binder sBinder = new Binder(); - - @Override - public IBinder onBind(Intent intent) { - return sBinder; - } -} diff --git a/androidApp/src/main/res/drawable/ic_chrome_reader_mode_white_24dp.xml b/androidApp/src/main/res/drawable/ic_chrome_reader_mode_white_24dp.xml deleted file mode 100644 index 43fd20a..0000000 --- a/androidApp/src/main/res/drawable/ic_chrome_reader_mode_white_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/androidApp/src/main/res/menu/reader_toolbar.xml b/androidApp/src/main/res/menu/reader_toolbar.xml index 38a1d3b..a66022c 100644 --- a/androidApp/src/main/res/menu/reader_toolbar.xml +++ b/androidApp/src/main/res/menu/reader_toolbar.xml @@ -8,12 +8,6 @@ android:title="@string/unmark" app:showAsAction="ifRoom" /> - - "Recompte d'articles no llegits" "Recompte d'articles llegits i preferits" "Sembla que esteu utilitzant un URL no vàlid. Assegureu-vos que és correcte, i si el problema persisteix, poseu-vos en contacte amb mi (a través de l'enllaç de contacte que hi ha a la Botiga). Tingueu en compte que per utilitzar aquesta aplicació cal que també utilitzeu Selfoss. Si no, no podreu accedir a canals RSS." - "Obre els enllaços dins de l'aplicació" - "Els articles s'obriran dins de l'aplicació" - "Els articles s'obriran amb el navegador predeterminat" - "Obre el visualitzador d'articles" - "S'obrirà el visualitzador d'articles en lloc del navegador intern" - "S'obrirà el navegador intern en lloc del visualitzador d'articles" + "Obre els enllaços dins de l'aplicació" + "Els articles s'obriran dins de l'aplicació" + "Els articles s'obriran amb el navegador predeterminat" "Gestió d'enllaços" "Visualització" "Els articles es mostraran com a targetes" diff --git a/androidApp/src/main/res/values-de-rDE/strings.xml b/androidApp/src/main/res/values-de-rDE/strings.xml index 09c81ca..caf8a5b 100644 --- a/androidApp/src/main/res/values-de-rDE/strings.xml +++ b/androidApp/src/main/res/values-de-rDE/strings.xml @@ -47,12 +47,9 @@ "Zeige Anzahl ungelesener Artikel" "Zeige Anzahl der Favoriten und gelesenen Artikel" "Sie scheinen eine ungültige URL verwenden. Stellen Sie sicher, dass die URL richtig ist. Sollte das Problem weiterhin bestehen kontaktieren Sie mich (über den Playstore-Kontakt-Link). Bitte beachten Sie, dass Sie Selfoss benötigen um RSS-Feeds zu lesen." - "Öffne Links innerhalb der App" - "Artikel werden innerhalb der App geöffnet" - "Artikel werden mit deinem Standard-Browser geöffnet" - "Verwenden Sie den Artikel-viewer" - "Artikel-Viewer wird anstelle des internen Browser verwendet" - "Der internen Browser wird anstelle des Artikel-Viewer verwendet" + "Öffne Links innerhalb der App" + "Artikel werden innerhalb der App geöffnet" + "Artikel werden mit deinem Standard-Browser geöffnet" "Umgang mit Links" "Ansicht" "Artikel werden als Kacheln angezeigt" diff --git a/androidApp/src/main/res/values-es-rES/strings.xml b/androidApp/src/main/res/values-es-rES/strings.xml index 54ca2a8..43661d4 100644 --- a/androidApp/src/main/res/values-es-rES/strings.xml +++ b/androidApp/src/main/res/values-es-rES/strings.xml @@ -47,12 +47,9 @@ "Mostrar recuento no leído" "Mostrar recuento de favoritos y leídos" "Parece estar tratando de utilizar una dirección URL inválida. Asegúrese de que sea correcta y si el problema persiste, póngase en contacto conmigo (mediante el enlace de contacto de la tienda). Tenga en cuenta que la aplicación necesita utilizar Selfoss. No se puede acceder al contenido RSS sin él." - "Abrir enlaces dentro de la aplicación" - "Los artículos se abrirán dentro de la aplicación" - "Los artículos se abrirán con tu navegador predeterminado" - "Utilizar el visor de artículo" - "Se usará el visor de artículos en lugar del navegador interno" - "Se utilizará el navegador interno en lugar del visor de artículo" + "Abrir enlaces dentro de la aplicación" + "Los artículos se abrirán dentro de la aplicación" + "Los artículos se abrirán con tu navegador predeterminado" "Control de enlaces" "Mostrando" "Los artículos se mostrarán como tarjetas" diff --git a/androidApp/src/main/res/values-fa-rIR/strings.xml b/androidApp/src/main/res/values-fa-rIR/strings.xml index 2c5a6f3..efbceb6 100644 --- a/androidApp/src/main/res/values-fa-rIR/strings.xml +++ b/androidApp/src/main/res/values-fa-rIR/strings.xml @@ -47,12 +47,9 @@ "Display unread count" "Display count for favorite and read" "You seem to be trying to use an invalid URL. Make sure it is correct, and if the problem persists, contact me (via the store contact link). Please note that the app needs you to be using Selfoss. You can't access RSS feeds without it." - "Open links inside the app" - "Articles will open inside the app" - "Articles will open with your default browser" - "Use the article viewer" - "Will use the article viewer instead of the internal browser" - "Will use the internal browser instead of the article viewer" + "Open links inside the app" + "Articles will open inside the app" + "Articles will open with your default browser" "Link handling" "Displaying" "The articles will be displayed as cards" diff --git a/androidApp/src/main/res/values-fr-rFR/strings.xml b/androidApp/src/main/res/values-fr-rFR/strings.xml index d5a34a4..e3b366c 100644 --- a/androidApp/src/main/res/values-fr-rFR/strings.xml +++ b/androidApp/src/main/res/values-fr-rFR/strings.xml @@ -47,12 +47,9 @@ "Afficher le nombre de non lus" "Afficher le nombre de favoris et d'articles lus" "Vous semblez essayer de vous connecter avec une URL invalide. Assurez-vous que c'est la bonne, et si le problème persiste, contactez-moi via le lien du play store. Notez aussi que l'application ne peut fonctionner sans l'application web Selfoss. Vous ne pouvez pas utiliser l'application pour accéder directement aux flux RSS." - "Ouvrir les liens dans l'application" - "Les articles s'ouvriront dans l'application" - "Les articles s'ouvriront dans votre naviguateur par défaut" - "Utiliser le visionneur d'articles" - "Utiliser le naviguateur interne" - "Utiliser le naviguateur interne au lieu du visionneur d'articles" + "Ouvrir les liens dans l'application" + "Les articles s'ouvriront dans l'application" + "Les articles s'ouvriront dans votre naviguateur par défaut" "Gestion des liens" "Affichage" "Les articles seront affichés en forme de carte" diff --git a/androidApp/src/main/res/values-gl-rES/strings.xml b/androidApp/src/main/res/values-gl-rES/strings.xml index 3630b12..f4d819a 100644 --- a/androidApp/src/main/res/values-gl-rES/strings.xml +++ b/androidApp/src/main/res/values-gl-rES/strings.xml @@ -47,12 +47,9 @@ "Mostrar reconto de artigos non lidos" "Mostrar reconto de artigos lidos e favoritos" "Semella que intentas usar unha URL non válida. Asegúrate de que é correcta, e se o problema persiste, ponte en contacto conmigo (a través da ligazón de contacto na tenda). Por favor ten en conta que a aplicación precisa que uses Selfoss. Non podes acceder a canles RSS se non o tes." - "Abrir ligazóns dentro da aplicación" - "Os artigos abriranse dentro da aplicación" - "Os artigos abriranse co teu navegador prederminado" - "Usar o visor de artigos" - "Usarase o visor de artigos en lugar do navegador interno" - "Usarase o navegador interno en lugar do visor de artigos" + "Abrir ligazóns dentro da aplicación" + "Os artigos abriranse dentro da aplicación" + "Os artigos abriranse co teu navegador prederminado" "Xestión de ligazóns" "Visualización" "Os artigos amosaranse coma tarxetas" diff --git a/androidApp/src/main/res/values-in-rID/strings.xml b/androidApp/src/main/res/values-in-rID/strings.xml index bb4083e..c4a9e94 100644 --- a/androidApp/src/main/res/values-in-rID/strings.xml +++ b/androidApp/src/main/res/values-in-rID/strings.xml @@ -47,12 +47,9 @@ "Tampilkan jumlah item yang belum dibaca" "Tampilkan jumlah item untuk favorit dan sudah dibaca" "Sepertinya Anda mencoba menggunakan URL yang tidak valid. Pastikan itu benar, jika masalah terus berlanjut, hubungi saya (melalui link kontak toko). Harap dicatat bahwa aplikasi ini mengharuskan Anda menggunakan Selfoss. Tanpa itu, Anda tidak bisa mengakses umpan RSS." - "Buka tautan dalam aplikasi" - "Artikel akan dibuka di dalam aplikasi" - "Artikel akan dibuka dalam peramban bawaan Anda" - "Gunakan pratinjau artikel" - "Lihat artikel di penampil daripada peramban internal" - "Gunakan peramban internal dan bukan penampil artikel" + "Buka tautan dalam aplikasi" + "Artikel akan dibuka di dalam aplikasi" + "Artikel akan dibuka dalam peramban bawaan Anda" "Pengolahan tautan" "Tampilan" "Artikel ini akan ditampilkan dalam bentuk kartu" diff --git a/androidApp/src/main/res/values-it-rIT/strings.xml b/androidApp/src/main/res/values-it-rIT/strings.xml index e28ac35..041f602 100644 --- a/androidApp/src/main/res/values-it-rIT/strings.xml +++ b/androidApp/src/main/res/values-it-rIT/strings.xml @@ -47,12 +47,9 @@ "Display unread count" "Display count for favorite and read" "You seem to be trying to use an invalid URL. Make sure it is correct, and if the problem persists, contact me (via the store contact link). Please note that the app needs you to be using Selfoss. You can't access RSS feeds without it." - "Open links inside the app" - "Articles will open inside the app" - "Articles will open with your default browser" - "Use the article viewer" - "Will use the article viewer instead of the internal browser" - "Will use the internal browser instead of the article viewer" + "Open links inside the app" + "Articles will open inside the app" + "Articles will open with your default browser" "Link handling" "Displaying" "The articles will be displayed as cards" diff --git a/androidApp/src/main/res/values-ko-rKR/strings.xml b/androidApp/src/main/res/values-ko-rKR/strings.xml index ee12219..5478b18 100644 --- a/androidApp/src/main/res/values-ko-rKR/strings.xml +++ b/androidApp/src/main/res/values-ko-rKR/strings.xml @@ -47,12 +47,9 @@ "Display unread count" "Display count for favorite and read" "You seem to be trying to use an invalid URL. Make sure it is correct, and if the problem persists, contact me (via the store contact link). Please note that the app needs you to be using Selfoss. You can't access RSS feeds without it." - "Open links inside the app" - "Articles will open inside the app" - "Articles will open with your default browser" - "Use the article viewer" - "Will use the article viewer instead of the internal browser" - "Will use the internal browser instead of the article viewer" + "Open links inside the app" + "Articles will open inside the app" + "Articles will open with your default browser" "Link handling" "Displaying" "The articles will be displayed as cards" diff --git a/androidApp/src/main/res/values-nl-rNL/strings.xml b/androidApp/src/main/res/values-nl-rNL/strings.xml index fd3e652..e4a0120 100644 --- a/androidApp/src/main/res/values-nl-rNL/strings.xml +++ b/androidApp/src/main/res/values-nl-rNL/strings.xml @@ -47,12 +47,9 @@ "Geef aantal ongelezen weer" "Geef aantal weer bij favorieten en gelezen" "De gebruikte link lijkt onjuist. Controleer deze. Mocht het probleem blijven, neem dan contact met me op (via de contact link in de store). Om deze app te kunnen gebruiken heb je Selfoss nodig." - "Links opnemen in interne browser" - "Artikelen worden in de interne browser geopend" - "Artikelen worden geopend in de standaard browser" - "Gebruik artikel viewer" - "Artikelen in viewer weergeven in plaats van de interne browser" - "Artikelen in interne browser weergeven in plaats van viewer" + "Links opnemen in interne browser" + "Artikelen worden in de interne browser geopend" + "Artikelen worden geopend in de standaard browser" "Links" "Weergave" "De artikelen worden als kaarten weergegeven" diff --git a/androidApp/src/main/res/values-pt-rBR/strings.xml b/androidApp/src/main/res/values-pt-rBR/strings.xml index 250c567..045f660 100644 --- a/androidApp/src/main/res/values-pt-rBR/strings.xml +++ b/androidApp/src/main/res/values-pt-rBR/strings.xml @@ -47,12 +47,9 @@ "Exibir contagem de artigos não lidos" "Exibir contagem de lidos e favoritos" "Parece que você está tentando utilizar uma URL inválida. Certifique-se de que está correto, e se o problema persistir, entre em contato comigo (através do link de contato da loja). Por favor, note que o aplicativo precisa que você esteja usando o Selfoss. Você não pode acessar feeds RSS sem ele." - "Abrir links dentro do aplicativo" - "Os artigos serão abertos dentro do aplicativo" - "Os artigos serão abertos com seu navegador padrão" - "Use o visualizador de artigos" - "Usará o visualizador de artigos em vez do navegador" - "Utilizará o navegador em vez do visualizador de artigos" + "Abrir links dentro do aplicativo" + "Os artigos serão abertos dentro do aplicativo" + "Os artigos serão abertos com seu navegador padrão" "Manipulação de links" "Mostrando" "Os artigos serão exibidos no formato de cards" diff --git a/androidApp/src/main/res/values-pt-rPT/strings.xml b/androidApp/src/main/res/values-pt-rPT/strings.xml index d6373d4..c090915 100644 --- a/androidApp/src/main/res/values-pt-rPT/strings.xml +++ b/androidApp/src/main/res/values-pt-rPT/strings.xml @@ -47,12 +47,9 @@ "Exibir a contagem não lida" "Exibir a contagem para o favorito e leitura" "Você parece estar tentando usar um URL inválido. Certifique-se de que está correto, e se o problema persistir, entre em contato comigo (através do link de contato da loja). Por favor, note que o aplicativo precisa que você esteja usando o Selfoss. Você não pode acessar feeds RSS sem ele." - "Abrir links dentro do app" - "Artigos serão aberto dentro do aplicativo" - "Artigos serão aberto com o seu navegador padrão" - "Use o Visualizador de artigo" - "Vai usar o Visualizador de artigo em vez do navegador interno" - "Vai usar o navegador interno em vez do Visualizador de artigo" + "Abrir links dentro do app" + "Artigos serão aberto dentro do aplicativo" + "Artigos serão aberto com o seu navegador padrão" "Manipulação de ligações" "Mostrando" "Os artigos serão exibidos como cartões" diff --git a/androidApp/src/main/res/values-si-rLK/strings.xml b/androidApp/src/main/res/values-si-rLK/strings.xml index c8f40f7..664f42d 100644 --- a/androidApp/src/main/res/values-si-rLK/strings.xml +++ b/androidApp/src/main/res/values-si-rLK/strings.xml @@ -47,12 +47,9 @@ "Display unread count" "Display count for favorite and read" "You seem to be trying to use an invalid URL. Make sure it is correct, and if the problem persists, contact me (via the store contact link). Please note that the app needs you to be using Selfoss. You can't access RSS feeds without it." - "Open links inside the app" - "Articles will open inside the app" - "Articles will open with your default browser" - "Use the article viewer" - "Will use the article viewer instead of the internal browser" - "Will use the internal browser instead of the article viewer" + "Open links inside the app" + "Articles will open inside the app" + "Articles will open with your default browser" "Link handling" "Displaying" "The articles will be displayed as cards" diff --git a/androidApp/src/main/res/values-tr-rTR/strings.xml b/androidApp/src/main/res/values-tr-rTR/strings.xml index a1a02dd..2f8b4c3 100644 --- a/androidApp/src/main/res/values-tr-rTR/strings.xml +++ b/androidApp/src/main/res/values-tr-rTR/strings.xml @@ -47,12 +47,9 @@ "Okunmamış sayıyı görüntüle" "Favori ve okunan sayıları göster" "Geçersiz bir URL kullanmaya çalışıyormuş gibi görünüyorsunuz. Doğru olduğundan emin olun ve sorun devam ederse, bana ulaşın (mağaza iletişim bağlantısıyla). Uygulamanın, Selfoss'u kullanmanız gerektiğini lütfen unutmayın. RSS özet akışlarına olmadan erişemezsiniz." - "Uygulamadaki bağlantıları açın" - "Makale, uygulama içinde açılacaktır" - "Makaleler varsayılan tarayıcınızla açılır" - "Makale görüntüleyiciyi kullanın" - "Dahili tarayıcı yerine makale görüntüleyicisini kullanacak" - "Makale görüntüleyicisi yerine dahili tarayıcıyı kullanacak" + "Uygulamadaki bağlantıları açın" + "Makale, uygulama içinde açılacaktır" + "Makaleler varsayılan tarayıcınızla açılır" "Bağlantı açma şekli" "Gösteriliyor" "Makaleler kart olarak gösterilecek" diff --git a/androidApp/src/main/res/values-zh-rCN/strings.xml b/androidApp/src/main/res/values-zh-rCN/strings.xml index ab966e5..fafa455 100644 --- a/androidApp/src/main/res/values-zh-rCN/strings.xml +++ b/androidApp/src/main/res/values-zh-rCN/strings.xml @@ -47,12 +47,9 @@ "显示未读数" "显示收藏和已读的计数" "您似乎试图使用无效的 URL。确保它是正确的,如果问题仍然存在,请与我联系 (通过商店的联系链接)。请注意,该应用程序需要您使用 Selfoss。没有它,您无法访问 RSS 源。" - "打开应用程序中的链接" - "文章将在应用程序内打开" - "文章将使用默认浏览器打开" - "使用文章查看器" - "将使用文章查看器而不是内部浏览器" - "将使用内部浏览器而不是文章查看器" + "打开应用程序中的链接" + "文章将在应用程序内打开" + "文章将使用默认浏览器打开" "链接处理" "显示" "这些文章将以卡片形式显示" diff --git a/androidApp/src/main/res/values-zh-rTW/strings.xml b/androidApp/src/main/res/values-zh-rTW/strings.xml index aab3602..3fc4874 100644 --- a/androidApp/src/main/res/values-zh-rTW/strings.xml +++ b/androidApp/src/main/res/values-zh-rTW/strings.xml @@ -47,12 +47,9 @@ "显示未读数" "显示收藏和已读的计数" "您似乎试图使用无效的 URL。确保它是正确的,如果问题仍然存在,请与我联系 (通过商店的联系链接)。请注意,该应用程序需要您使用 Selfoss。没有它,您无法访问 RSS 源。" - "打开应用程序中的链接" - "文章将在应用程序内打开" - "文章将使用默认浏览器打开" - "使用文章查看器" - "将使用文章查看器而不是内部浏览器" - "将使用内部浏览器而不是文章查看器" + "打开应用程序中的链接" + "文章将在应用程序内打开" + "文章将使用默认浏览器打开" "链接处理" "显示" "这些文章将以卡片形式显示" diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index 2e3dd99..6f03a6f 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -46,12 +46,9 @@ "Display unread count" "Display count for favorite and read" "You seem to be trying to use an invalid URL. Make sure it is correct, and if the problem persists, contact me (via the store contact link). Please note that the app needs you to be using Selfoss. You can't access RSS feeds without it." - "Open links inside the app" - "Articles will open inside the app" - "Articles will open with your default browser" - "Use the article viewer" - "Will use the article viewer instead of the internal browser" - "Will use the internal browser instead of the article viewer" + "Open links inside the app" + "Articles will open inside the app" + "Articles will open with your default browser" "Link handling" "Displaying" "The articles will be displayed as cards" diff --git a/androidApp/src/main/res/xml/pref_general.xml b/androidApp/src/main/res/xml/pref_general.xml index 7ea909a..52b1649 100644 --- a/androidApp/src/main/res/xml/pref_general.xml +++ b/androidApp/src/main/res/xml/pref_general.xml @@ -34,18 +34,10 @@ -