Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
Update v1.5.9
Browse files Browse the repository at this point in the history
- Added a basic tutorial Slide Show for first time users, as well as an option menu item to provide the manual.
- Added an option menu item to link the Privacy Policy of the App.
- Bug Fixes and Performance Improvements.
  • Loading branch information
Nalin-Angrish committed Feb 8, 2021
1 parent 996849d commit 31dfd4f
Show file tree
Hide file tree
Showing 123 changed files with 1,792 additions and 1,142 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Developer Notes:

This project is based upon a customized version of NeutrinosPlatform's scanLibrary at https://github.com/NeutrinosPlatform/scanlibrary .
### Setting up native libraries:

Uncompress the jniLibs.7z from IScan/app/src/main/ using 7-Zip to IScan/app/src/main/jniLibs. Your directory structure should look something like this:
~~~shell
main\
+- java
|
+- res
|
+- jniLibs\
| +- arm64-v8a\
| | +-libopencv_java3.so
| | +-libScanner.so
| +- armeabi\
| | +-libopencv_java3.so
| | +-libScanner.so
| +- ....
|
+- AndroidManifest.xml
~~~

Currently the native code is the default as the one present in the master branch of the ScanLibrary but when the code will be edited for improvisation, it would be available on the GitHub repo.

If you need the documentation for the code of this project you can get it **[here](http://docs.nalinangrish.me/IScan)**
Binary file added GPlay/114x114-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GPlay/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 8 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IScan
The Indian Scanner App - Made for the Indians, By the Indians<br>
Official website: [https://nalinstudios.herokuapp.com/IScan](https://nalinstudios.herokuapp.com/IScan) <br><br>
Official website: [http://www.nalinangrish.me/apps/iscan](http://www.nalinangrish.me/apps/iscan) <br><br>


IScan - The Indian Scanner app, Made for Indians, By an Indian.<br>
Expand All @@ -25,7 +25,7 @@ What’s better than knowing what an app does and what things it has access to.
<br><br>
If you ever feel that there is any bug in the Application, you can report that bug and even collaborate with us on this project and provide one of the best experiences to every user of this application.
<br><br>
Visit https://nalinstudios.herokuapp.com/IScan for more details.<br><br><br>
Visit http://www.nalinangrish.me/apps/iscan for more details.<br><br><br>



Expand Down Expand Up @@ -65,27 +65,9 @@ Visit https://nalinstudios.herokuapp.com/IScan for more details.<br><br><br>


<br><br>
# Developer Zone:
This project is based upon a customized version of NeutrinosPlatform's scanLibrary at https://github.com/NeutrinosPlatform/scanlibrary .
### Setting up native libraries:

Uncompress the jniLibs.7z from IScan/app/src/main/ using 7-Zip to IScan/app/src/main/jniLibs. Your directory structure should look something like this:
~~~shell
main\
+- java
|
+- res
|
+- jniLibs\
| +- arm64-v8a\
| | +-libopencv_java3.so
| | +-libScanner.so
| +- armeabi\
| | +-libopencv_java3.so
| | +-libScanner.so
| +- ....
|
+- AndroidManifest.xml
~~~

If you need the documentation for the code of this project you can get it **[here](https://nalin-2005.github.io/IScan)**
# Related Resources:
- Developer Notes: [Visit on GitHub](DEVELOPER.md)
- Privacy Policy: [Visit on GitHub](PrivacyPolicy.md) | [Visit on Website](http://www.nalinangrish.me/apps/iscan/privacy-policy)
- Download: [GitHub Releases](http://github.com/Nalin-2005/IScan/releases/latest) | [Google Play Store](http://play.google.com/store/apps/details?id=com.nalinstudios.iscan)
- Code Documentation: [Visit the Docs](http://docs.nalinangrish.me/IScan/)
- Website: [nalinangrish.me/apps/IScan](http://www.nalinangrish.me/apps/iscan)
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.nalinstudios.iscan"
minSdkVersion 19
targetSdkVersion 29
versionCode 158
versionName "1.5.8"
versionCode 159
versionName "1.5.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
}
Expand All @@ -35,10 +35,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "androidx.exifinterface:exifinterface:1.3.1"
implementation "androidx.exifinterface:exifinterface:1.3.2"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down
20 changes: 8 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,50 @@
<uses-permission android:name="android.permission.VIBRATE" />

<application
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/icon_round"
android:supportsRtl="false">
<activity android:name=".SplashActivity"
<activity android:name=".TutorialActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" >

android:theme="@style/AppTheme.NoActionBar">
</activity>
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".EditViewActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name=".ScannerActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name=".ListFileActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name=".edit.PDFEditActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />




<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
Expand Down
91 changes: 71 additions & 20 deletions app/src/main/java/com/nalinstudios/iscan/EditViewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.nalinstudios.iscan.internal.Statics;
import com.nalinstudios.iscan.scanlibrary.ProgressDialogFragment;
import com.nalinstudios.iscan.scanlibrary.ResultFragment;
import com.nalinstudios.iscan.scanlibrary.ScanConstants;

Expand All @@ -36,8 +37,10 @@ public class EditViewActivity extends FragmentActivity implements View.OnClickLi
File dir;
/** A list of all the ResultFragments created...*/
List<ResultFragment> fragList = new ArrayList<>();


/** A progressbar to inform the user that the PDF is being created */
ProgressDialogFragment progressDialogFragment = new ProgressDialogFragment("Creating PDF..");
/** A popup for letting the user enter a name for the PDF.*/
PopupWindow window;

/**
* The oncreate function to load the opencv library and initialize the main function.
Expand Down Expand Up @@ -96,32 +99,53 @@ public void run() {
protected void Askname(){
View p = getLayoutInflater().inflate(R.layout.popup_enter_name, null);

final PopupWindow window = new PopupWindow(p, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true);
window = new PopupWindow();
window.setContentView(p);
window.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
window.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
window.setAnimationStyle(android.R.style.Animation_Dialog);
window.showAtLocation(p, Gravity.CENTER, 0, 0);
window.setFocusable(true);
window.update();
window.getContentView().findViewById(R.id.end).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
EditText tBox = window.getContentView().findViewById(R.id.pdfName);
window.dismiss();
try {
if (Statics.isAvailable(tBox.getText().toString())) {
for (ResultFragment frag : fragList) {
if (!frag.deleted){
frag.finish();
showProgressDialog("Converting to PDF...");
new Thread(new Runnable() {
@Override
public void run() {
boolean shouldClose = true;
try {
EditText tBox = window.getContentView().findViewById(R.id.pdfName);
if (Statics.isAvailable(tBox.getText().toString())) {
for (ResultFragment frag : fragList) {
if (!frag.deleted){
frag.finish();
}
}
Statics.createPdf(getApplication(), tBox.getText().toString());
}else {
Toast.makeText(getApplicationContext(), "A PDF with this name already exists. Please try again with a different name.", Toast.LENGTH_LONG).show();
shouldClose = false;
}
}catch (Exception e){
Toast.makeText(getApplicationContext(), "Couldn't create PDF, Please try again", Toast.LENGTH_LONG).show();
e.printStackTrace();
shouldClose = false;
}
dismissDialog();
if (shouldClose){
runOnUiThread(new Runnable() {
@Override
public void run() {
Intent i = new Intent(EditViewActivity.this, MainActivity.class);
startActivity(i);
finish();
}
});
}
Statics.createPdf(getApplication(), tBox.getText().toString());
Intent intent = new Intent(EditViewActivity.this, MainActivity.class);
startActivity(intent);
finish();
}else {
Toast.makeText(getApplicationContext(), "A PDF with this name already exists. Please try again with a different name.", Toast.LENGTH_LONG).show();
}
}catch (Exception e){
Toast.makeText(getApplicationContext(), "Couldn't create PDF, Please try again", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}).start();
}
});
window.getContentView().findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
Expand Down Expand Up @@ -170,4 +194,31 @@ public void delete(ResultFragment fragment){
this.onBackPressed();
}
}


/**
* A function to show the progress dialog.
* @param message the message to show.
*/
protected synchronized void showProgressDialog(String message) {
if (progressDialogFragment != null && progressDialogFragment.isVisible()) {
// Before creating another loading dialog, close all opened loading dialogs (if any)
progressDialogFragment.dismissAllowingStateLoss();
}
progressDialogFragment = null;
progressDialogFragment = new ProgressDialogFragment(message);
FragmentManager fm = getFragmentManager();
progressDialogFragment.show(fm, ProgressDialogFragment.class.toString());
}



/**
* A function to dismiss the progress dialog.
*/
protected synchronized void dismissDialog() {
progressDialogFragment.dismissAllowingStateLoss();
}


}
Loading

0 comments on commit 31dfd4f

Please sign in to comment.