Skip to content

Commit 02f4d05

Browse files
author
Emre Demir
committed
Added tunnl script. Need more test. Also one "toDO" exists.
1 parent 773f309 commit 02f4d05

File tree

9 files changed

+357
-131
lines changed

9 files changed

+357
-131
lines changed

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/GDHttpRequest.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
import android.content.Context;
44

5+
import com.android.volley.Request;
56
import com.android.volley.Response;
67
import com.android.volley.VolleyError;
78
import com.android.volley.toolbox.JsonObjectRequest;
9+
import com.android.volley.toolbox.StringRequest;
810
import com.google.gson.JsonObject;
911

1012
import org.json.JSONObject;
1113

14+
import java.util.HashMap;
15+
import java.util.Map;
16+
1217
/**
1318
* Created by demiremrece on 30.11.2017.
1419
*/
@@ -36,4 +41,30 @@ public void onErrorResponse(VolleyError error) {
3641

3742
}
3843

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+
3970
}
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)