mirror of
https://github.com/Nezumi-2711/Foodify-Shipper.git
synced 2026-09-22 13:38:42 +00:00
Release app
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ android {
|
|||||||
minSdk 26
|
minSdk 26
|
||||||
targetSdk 30
|
targetSdk 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.5.2"
|
versionName "1.0.0"
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.FoodifyShipper"
|
android:theme="@style/Theme.FoodifyShipper"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
<activity
|
||||||
|
android:name=".Activity.WebViewActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".Activity.ForgotPasswordActivity"
|
android:name=".Activity.ForgotPasswordActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -61,8 +63,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".Activity.MainActivity"
|
android:name=".Activity.MainActivity"
|
||||||
android:exported="false"
|
android:exported="false" />
|
||||||
/>
|
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".Service.NotificationService"
|
android:name=".Service.NotificationService"
|
||||||
@@ -71,10 +72,9 @@
|
|||||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
<service
|
||||||
<service android:name=".Service.RefreshTokenService"
|
android:name=".Service.RefreshTokenService"
|
||||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||||
/>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -41,6 +41,7 @@ import com.google.android.gms.tasks.Task;
|
|||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
import com.google.android.material.navigation.NavigationBarView;
|
import com.google.android.material.navigation.NavigationBarView;
|
||||||
import com.google.firebase.appdistribution.AppDistributionRelease;
|
import com.google.firebase.appdistribution.AppDistributionRelease;
|
||||||
|
import com.google.firebase.appdistribution.InterruptionLevel;
|
||||||
import com.google.firebase.appdistribution.OnProgressListener;
|
import com.google.firebase.appdistribution.OnProgressListener;
|
||||||
import com.google.firebase.appdistribution.UpdateProgress;
|
import com.google.firebase.appdistribution.UpdateProgress;
|
||||||
import com.google.firebase.messaging.FirebaseMessaging;
|
import com.google.firebase.messaging.FirebaseMessaging;
|
||||||
@@ -69,6 +70,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
|
// Common.firebaseAppDistribution.showFeedbackNotification("Cảm ơn đóng góp ý kiến của các bạn",
|
||||||
|
// InterruptionLevel.HIGH);
|
||||||
|
|
||||||
if(Common.firebaseAppDistribution.isTesterSignedIn()){
|
if(Common.firebaseAppDistribution.isTesterSignedIn()){
|
||||||
|
|
||||||
//Customise progress dialog
|
//Customise progress dialog
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.capstone.foodify.shipper.Activity;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.webkit.WebResourceError;
|
||||||
|
import android.webkit.WebResourceRequest;
|
||||||
|
import android.webkit.WebView;
|
||||||
|
import android.webkit.WebViewClient;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.capstone.foodify.shipper.R;
|
||||||
|
|
||||||
|
public class WebViewActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
WebView mWebview = new WebView(this);
|
||||||
|
|
||||||
|
mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript
|
||||||
|
|
||||||
|
final Activity activity = this;
|
||||||
|
|
||||||
|
mWebview.setWebViewClient(new WebViewClient() {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||||
|
Toast.makeText(activity, description, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
@TargetApi(android.os.Build.VERSION_CODES.M)
|
||||||
|
@Override
|
||||||
|
public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {
|
||||||
|
// Redirect to deprecated method, so you can use it in all SDK versions
|
||||||
|
onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mWebview .loadUrl("https://appdistribution.firebase.dev/i/66ad6caf01e38710");
|
||||||
|
setContentView(mWebview);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
package com.capstone.foodify.shipper.Fragment;
|
package com.capstone.foodify.shipper.Fragment;
|
||||||
|
|
||||||
import static com.capstone.foodify.shipper.Common.firebaseAppDistribution;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -16,8 +13,8 @@ import androidx.fragment.app.Fragment;
|
|||||||
|
|
||||||
import com.capstone.foodify.shipper.Activity.AccountAndProfileActivity;
|
import com.capstone.foodify.shipper.Activity.AccountAndProfileActivity;
|
||||||
import com.capstone.foodify.shipper.Activity.ChangePasswordActivity;
|
import com.capstone.foodify.shipper.Activity.ChangePasswordActivity;
|
||||||
import com.capstone.foodify.shipper.Activity.MainActivity;
|
|
||||||
import com.capstone.foodify.shipper.Activity.SignInActivity;
|
import com.capstone.foodify.shipper.Activity.SignInActivity;
|
||||||
|
import com.capstone.foodify.shipper.Activity.WebViewActivity;
|
||||||
import com.capstone.foodify.shipper.Common;
|
import com.capstone.foodify.shipper.Common;
|
||||||
import com.capstone.foodify.shipper.R;
|
import com.capstone.foodify.shipper.R;
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
@@ -29,7 +26,7 @@ import com.squareup.picasso.Picasso;
|
|||||||
|
|
||||||
public class ProfileFragment extends Fragment {
|
public class ProfileFragment extends Fragment {
|
||||||
EditText edt_birthday, edt_phone, edt_fullName, edt_email;
|
EditText edt_birthday, edt_phone, edt_fullName, edt_email;
|
||||||
LinearLayout changePasswordLayout, changeInformationLayout, logOutLayout, feed_back;
|
LinearLayout changePasswordLayout, changeInformationLayout, logOutLayout, register_app_beta;
|
||||||
RoundedImageView profile_avatar;
|
RoundedImageView profile_avatar;
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
@@ -59,10 +56,10 @@ public class ProfileFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
feed_back.setOnClickListener(new View.OnClickListener() {
|
register_app_beta.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
firebaseAppDistribution.startFeedback("Cảm ơn vì sự đóng góp ý kiến từ các bạn!");
|
startActivity(new Intent(getActivity(), WebViewActivity.class));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -86,7 +83,7 @@ public class ProfileFragment extends Fragment {
|
|||||||
changePasswordLayout = view.findViewById(R.id.change_password);
|
changePasswordLayout = view.findViewById(R.id.change_password);
|
||||||
changeInformationLayout = view.findViewById(R.id.change_information);
|
changeInformationLayout = view.findViewById(R.id.change_information);
|
||||||
logOutLayout = view.findViewById(R.id.log_out);
|
logOutLayout = view.findViewById(R.id.log_out);
|
||||||
feed_back = view.findViewById(R.id.feedback);
|
register_app_beta = view.findViewById(R.id.register_beta_app);
|
||||||
|
|
||||||
edt_phone = view.findViewById(R.id.edt_phone);
|
edt_phone = view.findViewById(R.id.edt_phone);
|
||||||
edt_birthday = view.findViewById(R.id.edt_birthDay);
|
edt_birthday = view.findViewById(R.id.edt_birthDay);
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M10,4h4v4h-4z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M4,16h4v4h-4z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M4,10h4v4h-4z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M4,4h4v4h-4z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M14,12.42l0,-2.42l-4,0l0,4l2.42,0z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M20.88,11.29l-1.17,-1.17c-0.16,-0.16 -0.42,-0.16 -0.58,0L18.25,11L20,12.75l0.88,-0.88C21.04,11.71 21.04,11.45 20.88,11.29z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M11,18.25l0,1.75l1.75,0l6.67,-6.67l-1.75,-1.75z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M16,4h4v4h-4z"/>
|
||||||
|
</vector>
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/feedback"
|
android:id="@+id/register_beta_app"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:fontFamily="@font/koho"
|
android:fontFamily="@font/koho"
|
||||||
android:text="Đóng góp ý kiến"
|
android:text="Đăng ký người dùng thử nghiệm"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
@@ -283,7 +283,7 @@
|
|||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/feedback"
|
app:layout_constraintTop_toBottomOf="@id/register_beta_app"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user