Skip to content

Commit

Permalink
fix : init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FenilInfy0m authored and FenilInfy0m committed Nov 25, 2022
1 parent 6106041 commit 3ace074
Show file tree
Hide file tree
Showing 81 changed files with 3,605 additions and 0 deletions.
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.

9 changes: 9 additions & 0 deletions .idea/ads-sdk.iml

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

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

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

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

android {
namespace 'com.infyom.adssdk'
compileSdk 32

defaultConfig {
minSdk 21
targetSdk 32

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

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.5.1'
implementation 'com.google.android.material:material:1.7.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

implementation 'com.google.android.gms:play-services-ads:21.1.0'

implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
//noinspection LifecycleAnnotationProcessorWithJava8
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.5.1"

implementation 'com.facebook.android:audience-network-sdk:6.11.0'

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
}
Empty file added adsSdk/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions adsSdk/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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.infyom.adssdk;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.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.infyom.adssdk.test", appContext.getPackageName());
}
}
7 changes: 7 additions & 0 deletions adsSdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

</manifest>
32 changes: 32 additions & 0 deletions adsSdk/src/main/java/com/infyom/adssdk/AdProgressDialog.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.infyom.adssdk;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.widget.ProgressBar;
import android.widget.TextView;


public class AdProgressDialog {

public static Dialog show(Context context) {
Dialog dialog = new Dialog(context);
dialog.requestWindowFeature(1);
dialog.getWindow().addFlags(2);
dialog.setCancelable(false);
dialog.getWindow().setDimAmount(0.7f);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
dialog.setContentView(R.layout.ads_progress_dialog);

try {
if (!((Activity) context).isFinishing()) {
dialog.show();
}
} catch (Exception unused) {
unused.printStackTrace();
}
return dialog;
}
}
Loading

0 comments on commit 3ace074

Please sign in to comment.