Skip to content

Commit

Permalink
This android app is not recognized by TPC. The app was developed as a…
Browse files Browse the repository at this point in the history
… resource to assist the users. The TPC reserves the right to change any gateways or product promo codes without prior notification.
  • Loading branch information
albert committed Jul 10, 2022
0 parents commit ad478cd
Show file tree
Hide file tree
Showing 79 changed files with 4,237 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

1 change: 1 addition & 0 deletions .idea/.name

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

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.

20 changes: 20 additions & 0 deletions .idea/gradle.xml

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

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

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

53 changes: 53 additions & 0 deletions .idea/misc.xml

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

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
39 changes: 39 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.aqp.mye_loading"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName '1.5.8'

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
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.aqp.mye_loading",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.1-AlphaBert",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.aqp.mye_loading;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.aqp.mye_loading", appContext.getPackageName());
}
}
44 changes: 44 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.aqp.mye_loading">

<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyELoading">
<activity
android:name=".PromoProcessActivity"
android:exported="false" />
<activity
android:name=".AddPromoActivity"
android:windowSoftInputMode="adjustResize"
android:exported="false" />
<activity
android:name=".SmartTNTActivity"
android:windowSoftInputMode="adjustResize"
android:exported="false" />
<activity
android:name=".GlobeTMProcessActivity"
android:windowSoftInputMode="adjustResize"
android:exported="false" />
<activity android:name=".MainActivity"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions app/src/main/java/com/aqp/mye_loading/AddPromoActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package com.aqp.mye_loading;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.aqp.mye_loading.other.DBHandler;

import java.util.Objects;

public class AddPromoActivity extends AppCompatActivity {

EditText edtPromoCode, edtSMS, edtCall, edtData, edtValidity, edtPrice;
Button btnAddPromo, btnClose;
TextView tvTelecomName;
private DBHandler dbHandler;
String telecom;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); //will hide the title
Objects.requireNonNull(getSupportActionBar()).hide(); // hide the title bar
setContentView(R.layout.activity_add_promo);

if (Build.VERSION.SDK_INT >= 23) {
Window window = this.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.setStatusBarColor(this.getResources().getColor(R.color.white_smoke));
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}

edtCall = findViewById(R.id.idEdtCall);
edtData = findViewById(R.id.idEdtData);
edtPrice = findViewById(R.id.idEdtPrice);
edtPromoCode = findViewById(R.id.idEdtPromoCode);
edtSMS = findViewById(R.id.idEdtSMS);
edtValidity = findViewById(R.id.idEdtValidity);
btnAddPromo = findViewById(R.id.btn_Add);
btnClose = findViewById(R.id.btn_Close);
tvTelecomName = findViewById(R.id.textView_telecomName);

dbHandler = new DBHandler(AddPromoActivity.this);

Intent intent = getIntent();
telecom = intent.getStringExtra("telecom");
tvTelecomName.setText("Add Promo For: "+telecom);

btnAddPromo.setOnClickListener(view -> {
String promoCode = edtPromoCode.getText().toString().trim();
String SMS = edtSMS.getText().toString().trim();
String Call = edtCall.getText().toString().trim();
String Data = edtData.getText().toString().trim();
String Validity = edtValidity.getText().toString().trim();
String Price = edtPrice.getText().toString().trim();

if (promoCode.isEmpty() && SMS.isEmpty() && Call.isEmpty() &&
Data.isEmpty() && Validity.isEmpty() && Price.isEmpty()) {
Toast.makeText(AddPromoActivity.this, "Please enter all the data..", Toast.LENGTH_SHORT).show();
return;
}

dbHandler.addNewPromo(telecom, promoCode, SMS, Call, Data, Validity, Price);

Toast.makeText(AddPromoActivity.this, "Promo has been added!", Toast.LENGTH_SHORT).show();

edtCall.setText("");
edtData.setText("");
edtPrice.setText("");
edtPromoCode.setText("");
edtSMS.setText("");
edtValidity.setText("");
});

btnClose.setOnClickListener(view -> {
Intent intent1 = new Intent(AddPromoActivity.this, MainActivity.class);
startActivity(intent1);
finish();
});
}
}
Loading

0 comments on commit ad478cd

Please sign in to comment.