Skip to content

Commit be7c49d

Browse files
authored
Merge pull request #2 from GameDistribution/rebuildandroid
Rebuildandroid
2 parents 5803fc9 + 9434405 commit be7c49d

File tree

101 files changed

+797
-15032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+797
-15032
lines changed

Source/GDApi/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
buildscript {
33
repositories {
44
jcenter()
5+
maven {
6+
url 'https://maven.google.com/'
7+
name 'Google'
8+
}
59
}
610
dependencies {
711
classpath 'com.android.tools.build:gradle:2.3.3'
@@ -11,5 +15,9 @@ buildscript {
1115
allprojects {
1216
repositories {
1317
jcenter()
18+
maven {
19+
url 'https://maven.google.com/'
20+
name 'Google'
21+
}
1422
}
1523
}

Source/GDApi/gdapi/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ dependencies {
3636
})
3737
testCompile 'junit:junit:4.12'
3838

39-
compile 'com.android.support:appcompat-v7:25.3.1'
40-
compile 'com.android.support:support-v4:25.3.1'
41-
compile 'com.google.android.gms:play-services-ads:11.0.4'
39+
compile 'com.android.support:appcompat-v7:25.4.0'
40+
compile 'com.android.support:support-v4:25.4.0'
41+
compile 'com.google.android.gms:play-services-ads:11.8.0'
42+
compile 'com.android.volley:volley:1.0.0'
43+
compile 'com.google.code.gson:gson:2.8.2'
44+
4245
}
4346

4447
task removeJar(type: Delete){
Binary file not shown.

Source/GDApi/gdapi/libs/gdapi.jar

-244 KB
Binary file not shown.

Source/GDApi/gdapi/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:minSdkVersion="16"
99
android:targetSdkVersion="25" />
1010
<uses-permission android:name="android.permission.INTERNET"/>
11-
<uses-permission android:name="android.permission.GET_TASKS"/>
11+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
1212

1313
<application
1414
android:allowBackup="true"

Source/GDApi/gdapi/src/main/java/com/gd/analytics/GDAdSize.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
* Created by yemre.demir on 08/14/2017.
55
*/
66
public class GDAdSize {
7-
public static String BANNER = "AdSize.BANNER";
8-
public static String LARGE_BANNER = "AdSize.LARGE_BANNER";
9-
public static String MEDIUM_RECTANGLE = "AdSize.MEDIUM_RECTANGLE";
10-
public static String FULL_BANNER = "AdSize.FULL_BANNER";
11-
public static String LEADERBOARD = "AdSize.LEADERBOARD";
12-
13-
public GDAdSize() {
14-
}
7+
public static String BANNER = "320x50";
8+
public static String LARGE_BANNER = "320x100";
9+
public static String MEDIUM_RECTANGLE = "300x250";
10+
public static String FULL_BANNER = "468x60";
11+
public static String LEADERBOARD = "728x90";
1512
}

Source/GDApi/gdapi/src/main/java/com/gd/analytics/GDCallback.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

Source/GDApi/gdapi/src/main/java/com/gd/analytics/GDEvent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* Created by Emre Demir on 23.09.2016.
55
*/
66

7-
public class GDEvent
8-
{
7+
public class GDEvent {
98
public Object dimensions;
109
public boolean isInterstitial;
1110

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.gd.analytics;
2+
3+
/**
4+
* Created by demiremrece on 30.11.2017.
5+
*/
6+
7+
public class GDGameData {
8+
9+
public static String gameMd5, title, bundleId;
10+
public static boolean enableAds, preRoll;
11+
public static int timeAds;
12+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.gd.analytics;
2+
3+
import android.content.Context;
4+
5+
import com.android.volley.Request;
6+
import com.android.volley.RequestQueue;
7+
import com.android.volley.toolbox.Volley;
8+
9+
10+
/**
11+
* Created by demiremrece on 30.11.2017.
12+
*/
13+
14+
public class GDHttp {
15+
16+
private static GDHttp instance;
17+
private RequestQueue requestQueue;
18+
private Context context;
19+
20+
private GDHttp(Context context){
21+
this.context = context;
22+
this.requestQueue = getRequestQueue();
23+
}
24+
25+
private RequestQueue getRequestQueue() {
26+
if(this.requestQueue == null){
27+
this.requestQueue = Volley.newRequestQueue(this.context);
28+
}
29+
return this.requestQueue;
30+
}
31+
32+
public static synchronized GDHttp getInstance (Context context){
33+
if(instance == null){
34+
instance = new GDHttp(context);
35+
}return instance;
36+
}
37+
38+
public<T> void addToRequestQueue(Request<T> request) {
39+
requestQueue.add(request);
40+
}
41+
42+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.gd.analytics;
2+
3+
import com.android.volley.VolleyError;
4+
5+
import org.json.JSONObject;
6+
7+
/**
8+
* Created by demiremrece on 30.11.2017.
9+
*/
10+
11+
public interface GDHttpCallback {
12+
void onSuccess(JSONObject data);
13+
void onError(VolleyError error);
14+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package com.gd.analytics;
2+
3+
import android.content.Context;
4+
5+
import com.android.volley.Request;
6+
import com.android.volley.Response;
7+
import com.android.volley.VolleyError;
8+
import com.android.volley.toolbox.JsonObjectRequest;
9+
import com.android.volley.toolbox.StringRequest;
10+
import com.google.gson.JsonObject;
11+
12+
import org.json.JSONObject;
13+
14+
import java.util.HashMap;
15+
import java.util.Map;
16+
17+
/**
18+
* Created by demiremrece on 30.11.2017.
19+
*/
20+
21+
public class GDHttpRequest {
22+
23+
public static void sendHttpRequest (Context context, String url, int method, JsonObject data, final GDHttpCallback callback){
24+
25+
JsonObjectRequest jsObjRequest = new JsonObjectRequest
26+
(method, url, null, new Response.Listener<JSONObject>() {
27+
28+
@Override
29+
public void onResponse(JSONObject response) {
30+
callback.onSuccess(response);
31+
}
32+
}, new Response.ErrorListener() {
33+
34+
@Override
35+
public void onErrorResponse(VolleyError error) {
36+
callback.onError(error);
37+
}
38+
});
39+
40+
GDHttp.getInstance(context).addToRequestQueue(jsObjRequest);
41+
42+
}
43+
44+
public static void sendStringRequest(Context context,String url, int method, JsonObject data, final GDHttpCallback callback){
45+
46+
StringRequest strRequest = new StringRequest(method, url,
47+
new Response.Listener<String>()
48+
{
49+
@Override
50+
public void onResponse(String response)
51+
{
52+
callback.onSuccess(null);
53+
}
54+
},
55+
new Response.ErrorListener()
56+
{
57+
@Override
58+
public void onErrorResponse(VolleyError error)
59+
{
60+
callback.onError(error);
61+
}
62+
});
63+
64+
GDHttp.getInstance(context).addToRequestQueue(strRequest);
65+
66+
67+
68+
}
69+
70+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.gd.analytics;
2+
3+
/**
4+
* Created by demiremrece on 2.01.2018.
5+
*/
6+
7+
public interface GDRequestAdHandler {
8+
void Succes();
9+
void Error(String err);
10+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.gd.analytics;
2+
3+
import android.os.Bundle;
4+
5+
/**
6+
* Created by demiremrece on 2.01.2018.
7+
*/
8+
9+
public class GDTunnlData {
10+
private String Adu,Imp,Err;
11+
private Bundle CustomParams;
12+
13+
public String getAdu() {
14+
return Adu;
15+
}
16+
17+
public void setAdu(String adu) {
18+
Adu = adu;
19+
}
20+
21+
public String getImp() {
22+
return Imp;
23+
}
24+
25+
public void setImp(String imp) {
26+
Imp = imp;
27+
}
28+
29+
public Bundle getCustomParams() {
30+
return CustomParams;
31+
}
32+
33+
public void setCustomParams(Bundle customParams) {
34+
CustomParams = customParams;
35+
}
36+
37+
public String getErr() {
38+
return Err;
39+
}
40+
41+
public void setErr(String err) {
42+
Err = err;
43+
}
44+
}
45+

0 commit comments

Comments
 (0)