diff --git a/app/build.gradle b/app/build.gradle index 81ca796..8cb44b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,21 +11,49 @@ android { defaultConfig { applicationId "com.txtnet.txtnetbrowser" - minSdk 19 + //minSdk 19 targetSdk 33 - versionCode 4 - versionName "2.0.2" + versionCode 210 + versionName "2.1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" signingConfig signingConfigs.debug + //vectorDrawables.useSupportLibrary = true javaCompileOptions { annotationProcessorOptions { arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] } } + } + flavorDimensions "version" + productFlavors { + dev { + // Enable pre-dexing to produce an APK that can be tested on + // Android 5.0+ without the time-consuming DEX build processes. + //noinspection DevModeObsolete + minSdkVersion 21 + dimension "version" + // applicationIdSuffix ".demo" + // versionNameSuffix "-demo" + } + prod { + // The actual minSdkVersion for the production version. + minSdkVersion 19 + dimension "version" + buildTypes{ + debug{ + multiDexEnabled true // We are able to avoid multidex in release builds due to resource shrinking and minifying. + dependencies { + def multidex_version = "2.0.1" + implementation "androidx.multidex:multidex:$multidex_version" + } + } + } + } + } buildTypes { release { //minifyEnabled false @@ -33,12 +61,11 @@ android { minifyEnabled true shrinkResources true } - debug { - //multiDexEnabled true // We are able to avoid multidex in release builds due to resource shrinking and minifying. - defaultConfig.minSdkVersion 21 // Allows android to automatically handle dex management with ART - defaultConfig.vectorDrawables.useSupportLibrary = true - defaultConfig.multiDexEnabled = true - } +// debug { +// //multiDexEnabled true // We are able to avoid multidex in release builds due to resource shrinking and minifying. +// //defaultConfig.minSdkVersion 21 // Allows android to automatically handle dex management with ART +// defaultConfig.multiDexEnabled = true +// } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -115,6 +142,13 @@ dependencies { implementation "androidx.lifecycle:lifecycle-livedata:2.6.1" implementation "androidx.lifecycle:lifecycle-common-java8:2.6.1" - + constraints { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { + because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") + } + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { + because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") + } + } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 87d7563..98a6998 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,7 +21,7 @@ - + Welcome to TxtNet Browser!

With this app, you can view web pages and submit web forms without an internet connection.
To begin, enter a URL in the above address bar and press the magnifying glass icon or enter button to proceed.

-

Options

-

The options section of this app houses 2 major functions. Primarily, you can delete message history with the server once a large amount of web data has been stored. Secondly, you can choose to block incoming message notifications from the server to improve your experience with the app. We recommend that first-time users block the number that they wish to use in the app. To accomplish this, press the three dots in the top right of your screen and choose “Options.”

-

IMPORTANT: In order to Block, Unblock, or Delete Message History, Android requires that this app be registered as the default SMS app beginning with Android 4.4. To accomplish this, choose “Set Default SMS” in Options. When you are done, press the button again to revert to your previous Messaging app.

+

Or, select a link from the list below.

+

Below is a list of links that will be useful to you in your web browsing experience.

@@ -47,19 +46,19 @@ http://lite.cnn.com The official text-only page of CNN. - - - - - + + + + + http://decapi.me/twitter/latest?name=USER_HERE Displays the latest Tweet for any user you specify by replacing “USER_HERE”. - - - - + + + + https://teddit.net/ The front page of Reddit.com @@ -102,4 +101,16 @@ + +

Other App Features:

+

Options

+

The options section of this app houses 2 major functions. Primarily, you can delete message history with the server once a large amount of web data has been stored. Secondly, you can choose to block incoming message notifications from the server to improve your experience with the app. We recommend that first-time users block the number that they wish to use in the app. To accomplish this, press the three dots in the top right of your screen and choose “Options.”

+

IMPORTANT: In order to Block, Unblock, or Delete Message History, Android requires that this app be registered as the default SMS app beginning with Android 4.4. To accomplish this, choose “Set Default SMS” in Options. When you are done, press the button again to revert to your previous Messaging app.

+ +

Select Server Phone Number

+

The server phone number selection screen can be found from the overflow menu (3 dots) to the right of the search bar. In this menu, you can add new server phone numbers by pressing on the plus (+) icon, select a default phone number by tapping it, and delete a phone number by swiping left on the number's cell and selecting "Delete".

+ +

TxtNet Server Hosting

+

TxtNet Browser empowers users to utilize their own Wi-Fi or Cellular Data connection to act as a server to other users who can connect to you through the phone number associated with your default SIM. To enable this functionality, users on Android 4.4-10 must run two adb commands once by connecting their phone to a computer over USB. On Android 11+, users may opt instead to install the Shizuku app through the Google Play store. The "Number of Webviews" refers to the amount of concurrent web requests allowed from multiple users. "Max outgoing SMS per request" specifies how many SMS messages are allowed to be sent resulting from a single web page request. A website with lots of text can exceed this limit, in which case a failure message will be sent instead.

+ \ No newline at end of file diff --git a/app/src/main/java/com/txtnet/txtnetbrowser/MainBrowserScreen.java b/app/src/main/java/com/txtnet/txtnetbrowser/MainBrowserScreen.java index 2ddbbe0..020b771 100644 --- a/app/src/main/java/com/txtnet/txtnetbrowser/MainBrowserScreen.java +++ b/app/src/main/java/com/txtnet/txtnetbrowser/MainBrowserScreen.java @@ -4,6 +4,7 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.widget.PopupMenu; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.core.app.ActivityCompat; @@ -76,9 +77,9 @@ public class MainBrowserScreen extends AppCompatActivity { * TODO: Add database query view depending on country code, by contacting a master list number to return a list of known active server phone numbers for the country code * TODO: In phone number selector, make a FrameLayout with the textview, ping button, and checkmark icon (maybe the checkmark or x icon pushes the textview to the right?) * - * TODO Before beta launch: - * - Add a CDMA network compatibility mode to remove all Greek symbols. How to communicate this? - * -- make a database of CDMA-only numbers and use an initial request text: "TxtNet vXXX charset basic"/"TxtNet vXXX charset full" + * TODO: Add a CDMA network compatibility mode to remove all Greek symbols. + * Q: How to communicate this? + * A: make a database of CDMA-only numbers and use an initial request text: "TxtNet vXXX charset basic"/"TxtNet vXXX charset full" * */ @@ -108,17 +109,21 @@ void showIntroActivity() { } + static { + if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.KITKAT) { + AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); + } + } + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // if (savedInstanceState == null) { TODO: See if we should replace this null check? preferences = getSharedPreferences(getPackageName() + "_preferences", MODE_PRIVATE); mContext = this; - boolean isAccessed = preferences.getBoolean(getString(R.string.is_accessed), false); if (!isAccessed) { SharedPreferences.Editor edit = preferences.edit(); @@ -128,7 +133,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { return; } - setContentView(R.layout.activity_main); //Instantiate database @@ -159,7 +163,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { ActivityCompat.finishAffinity(MainBrowserScreen.this); } - boolean isTosAccepted = preferences.getBoolean(getString(R.string.is_tosaccepted), false); if (!isTosAccepted) { TermsConditionsDialogFragment dialogFragment = new TermsConditionsDialogFragment(); diff --git a/app/src/main/java/com/txtnet/txtnetbrowser/webview/MyWebView.java b/app/src/main/java/com/txtnet/txtnetbrowser/webview/MyWebView.java index fa803c6..4ef29ae 100644 --- a/app/src/main/java/com/txtnet/txtnetbrowser/webview/MyWebView.java +++ b/app/src/main/java/com/txtnet/txtnetbrowser/webview/MyWebView.java @@ -11,9 +11,7 @@ import com.txtnet.txtnetbrowser.R; public class MyWebView extends WebView { - //private static final String TAG = "CosmosWebView"; - - + private static final String TAG = "MyWebView"; private WebViewClient webViewClient; diff --git a/app/src/main/res/layout/unsupported_block.xml b/app/src/main/res/layout/unsupported_block.xml index ad60386..6b7e30e 100644 --- a/app/src/main/res/layout/unsupported_block.xml +++ b/app/src/main/res/layout/unsupported_block.xml @@ -1,71 +1,76 @@ - - + - + - + - + - - /> + - \ No newline at end of file + /> + +