Skip to content

Commit

Permalink
Merge pull request #50 from banditAmit/vedant
Browse files Browse the repository at this point in the history
Vedant
  • Loading branch information
banditAmit committed Dec 1, 2023
2 parents a827292 + c0b32c8 commit 33728e4
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

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

24 changes: 20 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,29 @@ plugins {

android {
namespace 'com.BugBazaar'
compileSdk 32
compileSdk 33

sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
signingConfigs {
release {
storeFile file('loki.jks')
storePassword 'Loki$$8090'
keyAlias 'loki'
keyPassword 'Loki$$8090'
}
}

buildTypes {
release {
signingConfig signingConfigs.release
// Other release-specific configurations
//debuggable false
}
}

defaultConfig {
applicationId "com.BugBazaar"
Expand Down Expand Up @@ -61,9 +77,9 @@ dependencies {
releaseImplementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
//testImplementation 'junit:junit:4.13.2'
//androidTestImplementation 'androidx.test.ext:junit:1.1.5'
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

//Custom installed modules
implementation 'de.hdodenhof:circleimageview:3.1.0'
Expand Down
Binary file added app/release/app-release.apk
Binary file not shown.
20 changes: 20 additions & 0 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.BugBazaar",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}

This file was deleted.

33 changes: 15 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:testOnly="false"
android:theme="@style/Theme.BugBazaar"
android:usesCleartextTraffic="true"
tools:ignore="CustomPermissionTypo"
tools:ignore="CustomPermissionTypo,HardcodedDebugMode"
tools:replace="android:fullBackupContent"
tools:targetApi="31">
<activity
Expand Down Expand Up @@ -70,27 +70,24 @@
android:exported="false" />
<activity
android:name=".ui.addresses.Address"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.Wallet"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.myorders.OrderHistoryActivity"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.payment.OrderSummary"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.ContactsPack.SelectContacts"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.ContactsPack.ReferUs"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.cart.CartActivity"
android:exported="true" />
<activity
android:name=".ui.cart.Cart"
android:exported="false" />
<activity
android:name=".ui.SplashActivity"
Expand Down Expand Up @@ -119,22 +116,22 @@
android:exported="false" />
<activity
android:name=".ui.CreatePasscode"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.NavigationDrawer_Dashboard"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.MyProfile"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.TermsAndConditionsActivity"
android:exported="true" />
<activity
android:name=".ui.Contact_us"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.PasscodeActivity"
android:exported="true" />
android:exported="false" />
<activity
android:name=".ui.Signin"
android:clearTaskOnLaunch="true"
Expand Down Expand Up @@ -169,12 +166,12 @@

<service
android:name="com.darvin.security.IsolatedService"
android:enabled="true"
android:enabled="false"
android:isolatedProcess="true"
android:process=":tmpService" />
<service
android:name=".MyFirebaseInstanceIDService"
android:exported="true">
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onClick(View v) {
String searchText = String.valueOf(searchEditText.getText());

if (searchText.length() <= 30) {
if (searchText.length() <= 15) {

ArrayList<Product> filteredList = new ArrayList<>();
for (Product product : productList) {
Expand All @@ -185,11 +185,12 @@ public void onClick(View v) {
// Hide the keyboard
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
}else{
//DO NOT REMOVEIf you search for empty searchbox and app crashed, it is intentional. It is a "Improper Exception Handling" bug
String filteredList = null;
Log.d("Exception",filteredList);
}
}
});

//Drawer and Navigation bar layout view find
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/BugBazaar/ui/SplashActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

public class SplashActivity extends AppCompatActivity implements DetectMagisk.DetectionListener {

private static final int SPLASH_TIMEOUT = 2000; // 2 seconds
private static final int SPLASH_TIMEOUT = 500; //half second

AlertDialogManager alertDialogManager = new AlertDialogManager();


Expand Down
31 changes: 7 additions & 24 deletions app/src/main/java/com/BugBazaar/ui/TermsAndConditionsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,70 +40,50 @@ protected void onCreate(Bundle savedInstanceState) {
this.webViewUrl = getIntent().getExtras().getString(AppConstants.KEY_WEBVIEW_URL);
startWebView(this.webViewUrl);
}


}

else {
startdefaultwebview(AppConstants.Terms_Conditions_URL);


}



}

private void startdefaultwebview(String terms_conditions_url) {

webView.loadUrl(webViewUrl);


webView.loadUrl(terms_conditions_url);
}

private void setupwebview(WebView webView) {
webView.setWebViewClient(new WebViewClient());
webView.setWebChromeClient(new WebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);


}

private void startWebView(String webViewUrl) {

if (webViewUrl.startsWith("bugbazaar.com")) {
webView.addJavascriptInterface(new JavaScriptInterface(), "Androidinterface");
webView.loadUrl(webViewUrl);


}

else if (webViewUrl.endsWith(".bugbazaar.com")){
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setCookie(webViewUrl, getsessionid());

Log.d("hello","cookieset");


// Log.d("hello","cookieset");
}

webView.loadUrl(webViewUrl);




}

private String getsessionid() {

return String.valueOf(UUID.randomUUID());
}

//Code to handle backbutton
public void onBackButtonClick(View view) {
onBackPressed(); // Navigate back to the previous activity
}


private class JavaScriptInterface {
@android.webkit.JavascriptInterface
Expand All @@ -119,7 +99,6 @@ public String showToast(String message) {

@android.webkit.JavascriptInterface
public String gettoken(){

return String.valueOf(UUID.randomUUID());
}

Expand All @@ -136,4 +115,8 @@ public String getpassword(){
}

}
//Code to handle backbutton
public void onBackButtonClick(View view) {
onBackPressed(); // Navigate back to the previous activity
}
}
8 changes: 0 additions & 8 deletions app/src/main/java/com/BugBazaar/ui/addresses/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_address);
addressListLayout = findViewById(R.id.addressListLayout);
//Session check
sessionManager = new SessionManager(this);
if (sessionManager.getUserToken()==null) {
Toast.makeText(getApplicationContext(),"Please login first",Toast.LENGTH_SHORT).show();
// The user is not logged in; redirect to the login activity
startActivity(new Intent(this, Signin.class));
finish(); // Prevent going back to the previous activity
}

//Toolbar title set
TextView toolbarTitle = findViewById(R.id.toolbarTitle);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/BugBazaar/utils/AppConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class AppConstants {

public static final String KEY_WEBVIEW_URL = "webViewUrl";
public static final String Terms_Conditions_URL ="https://payatu.io";
public static final String Terms_Conditions_URL ="https://payatu.com";

Context context;

Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/BugBazaar/utils/checkWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ private double executeDynamicallyLoadedCode(String fileName) {
double totalPrice = 100.0; // Replace with your actual price
discountedPrice = (double) discountModuleClass.getMethod("applyDiscount", double.class).invoke(discountModule, totalPrice);

Toast.makeText(context, "discountedPrice price" + discountedPrice, Toast.LENGTH_SHORT).show();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<string name="my_profile">My Profile</string>
<!-- Items Description -->
<string name="desc_cycle">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</string>

<string name="hardc0d3d_passw0rd">BugBazaarSeccool</string>

</resources>
17 changes: 0 additions & 17 deletions app/src/test/java/com/BugBazaar/ExampleUnitTest.java

This file was deleted.

1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ android.enableJetifier=true
android.nonTransitiveRClass=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding\=UTF-8
android.injected.testOnly=false

0 comments on commit 33728e4

Please sign in to comment.