Skip to content

Commit a7908dd

Browse files
Fixed AllSet, changed png to WebP added correct order for lottie ADDED Permissions in tutorial
1 parent 4d41a62 commit a7908dd

File tree

8 files changed

+33
-14
lines changed

8 files changed

+33
-14
lines changed

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ dependencies {
5555
implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.3'
5656
implementation 'com.google.firebase:firebase-auth:20.0.2'
5757
//Vision
58-
implementation 'com.google.android.gms:play-services-vision:20.1.3'
58+
implementation 'com.google.android.gms:play-services-vision:20.1.2'
5959

6060
// ML Kit dependencies
6161
implementation 'com.google.firebase:firebase-ml-vision:24.1.0'
62-
implementation 'com.google.android.gms:play-services-vision-image-label:18.1.1'
63-
implementation 'com.google.firebase:firebase-messaging:21.0.1'
64-
implementation 'com.google.firebase:firebase-analytics:18.0.1'
62+
implementation 'com.google.android.gms:play-services-vision-image-label:18.1.0'
63+
implementation 'com.google.firebase:firebase-messaging:21.0.0'
64+
implementation 'com.google.firebase:firebase-analytics:18.0.0'
6565
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
6666
implementation 'com.google.firebase:firebase-ml-vision:24.1.0'
67-
implementation 'com.google.android.gms:play-services-vision-image-label:18.1.1'
68-
implementation 'com.google.firebase:firebase-core:18.0.1'
67+
implementation 'com.google.android.gms:play-services-vision-image-label:18.1.0'
68+
implementation 'com.google.firebase:firebase-core:18.0.0'
6969
implementation 'com.google.android.gms:play-services-auth:19.0.0'
7070
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
7171

app/src/main/java/com/aaxena/takenotes/SignUp.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ private void handleSignInResult(Task<GoogleSignInAccount> completedTask){
174174
if (account !=null){
175175
Intent i=new Intent(SignUp.this,Landing.class);
176176
startActivity(i);
177+
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
177178
finish();
178179
}
179180
FirebaseGoogleAuth(acc);

app/src/main/java/com/aaxena/takenotes/WelcomeActivity.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package com.aaxena.takenotes;
22

3+
import android.Manifest;
34
import android.content.Context;
45
import android.content.Intent;
6+
import android.content.pm.PackageManager;
57
import android.graphics.Color;
68
import android.os.Bundle;
9+
import android.os.Handler;
10+
import android.util.Log;
711
import android.view.LayoutInflater;
812
import android.view.View;
913
import android.view.ViewGroup;
@@ -56,7 +60,9 @@ protected void onCreate(Bundle savedInstanceState) {
5660
R.layout.welcome_side7,
5761
R.layout.welcome_side9,
5862
R.layout.welcome_side10,
59-
R.layout.welcome_side8};
63+
R.layout.welcome_all_set,
64+
R.layout.welcome_side8,
65+
};
6066

6167
// making notification bar transparent
6268
changeStatusBarColor();
@@ -84,9 +90,18 @@ private int getItem(int i) {
8490
}
8591

8692
private void launchHomeScreen() {
87-
prefManager.setFirstTimeLaunch(false);
88-
startActivity(new Intent(WelcomeActivity.this, SignUp.class));
89-
finish();
93+
if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
94+
== PackageManager.PERMISSION_DENIED) {
95+
Log.d("permission", "permission denied to WRITE_EXTERNAL_STORAGE - requesting it");
96+
String[] permissions = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
97+
requestPermissions(permissions, 1);
98+
}
99+
else{
100+
prefManager.setFirstTimeLaunch(false);
101+
startActivity(new Intent(WelcomeActivity.this, SignUp.class));
102+
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
103+
finish();
104+
}
90105
}
91106

92107
// viewpager change listener
@@ -117,6 +132,7 @@ public void onPageScrollStateChanged(int arg0) {
117132
}
118133
};
119134

135+
120136
/**
121137
* Making notification bar transparent
122138
*/
-63.5 KB
Binary file not shown.
24.6 KB
Binary file not shown.

app/src/main/res/layout/welcome_AllSet.xml renamed to app/src/main/res/layout/welcome_all_set.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
android:layout_width="280dp"
1818
android:layout_height="280dp"
1919
app:lottie_autoPlay="true"
20-
app:lottie_fileName="permissions.json"
20+
app:lottie_fileName="final_go.json"
2121
app:lottie_loop="true" />
2222

2323
<TextView

app/src/main/res/layout/welcome_side8.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
android:layout_width="280dp"
1818
android:layout_height="280dp"
1919
app:lottie_autoPlay="true"
20-
app:lottie_fileName="final_go.json"
20+
app:lottie_fileName="permissions.json"
2121
app:lottie_loop="true" />
2222

2323
<TextView
2424
android:layout_width="wrap_content"
2525
android:layout_height="wrap_content"
2626
android:fontFamily="@font/productsansbold"
27-
android:text="Oh! One More Thing!"
27+
android:text="@string/oh_one_more_thing"
2828
android:textAlignment="center"
2929
android:textColor="@android:color/black"
3030
android:textSize="@dimen/slide_title"
@@ -37,7 +37,7 @@
3737
android:fontFamily="@font/productsans"
3838
android:paddingLeft="@dimen/desc_padding"
3939
android:paddingRight="@dimen/desc_padding"
40-
android:text="Please provide the storage permissions or else where will the saved documents Go?"
40+
android:text="@string/asking_storage_perm"
4141
android:textAlignment="center"
4242
android:textColor="@android:color/black"
4343
android:textSize="18sp" />

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,6 @@
8181
<string name="save">save</string>
8282
<string name="more_info_text">TakeNotes saves your name in your device\'s internal storage, so everytime you save assignments it adds up this name to the file to save your time in renaming.\n\nNO Data is SENT ANYWHERE!\n\nPretty Great Right?</string>
8383
<string name="more_info_title">When you enter your name...</string>
84+
<string name="oh_one_more_thing">Oh! One More Thing!</string>
85+
<string name="asking_storage_perm">Please provide the storage permissions otherwise where will the saved assignments go?</string>
8486
</resources>

0 commit comments

Comments
 (0)