Skip to content

Commit 7d95634

Browse files
committed
initial commit
0 parents  commit 7d95634

File tree

185 files changed

+9515
-0
lines changed

Some content is hidden

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

185 files changed

+9515
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.gradle
2+
/.idea
3+
/local.properties
4+
/YourAppIdea/build
5+
/YourAppIdea/YourAppIdea.iml
6+
/YourAppIdeaProject.iml

YourAppIdea/build.gradle

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
buildscript {
2+
repositories {
3+
mavenLocal()
4+
mavenCentral()
5+
}
6+
dependencies {
7+
classpath 'com.android.tools.build:gradle:0.5.+'
8+
}
9+
}
10+
apply plugin: 'android'
11+
12+
repositories {
13+
mavenCentral()
14+
}
15+
16+
android {
17+
compileSdkVersion 17
18+
buildToolsVersion "17.0.0"
19+
20+
defaultConfig {
21+
minSdkVersion 9
22+
targetSdkVersion 17
23+
}
24+
}
25+
26+
dependencies {
27+
//compile 'com.android.support:support-v4:13.0.+'
28+
compile "com.android.support:appcompat-v7:18.0.+"
29+
compile "com.squareup.dagger:dagger:1.0.+"
30+
compile "org.slf4j:slf4j-android:1.6.1-RC1"
31+
compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
32+
compile "com.google.code.gson:gson:2.2.4"
33+
compile("de.keyboardsurfer.android.widget:crouton:1.8.1") {
34+
exclude group: 'com.google.android', module: 'support-v4'
35+
}
36+
}
345 KB
Binary file not shown.
543 KB
Binary file not shown.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="org.michenux.yourappidea"
4+
android:versionCode="120"
5+
android:versionName="1.2.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="9"
9+
android:targetSdkVersion="18" />
10+
11+
<uses-permission android:name="android.permission.INTERNET" />
12+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
13+
<uses-permission android:name="com.android.vending.BILLING" />
14+
15+
<application
16+
android:name="org.michenux.yourappidea.YourApplication"
17+
android:allowBackup="true"
18+
android:icon="@drawable/ic_launcher"
19+
android:label="@string/app_name">
20+
<activity
21+
android:name="org.michenux.yourappidea.activity.YourAppMainActivity"
22+
android:label="@string/app_name"
23+
android:logo="@drawable/ic_launcher"
24+
android:theme="@style/AppTheme">
25+
<intent-filter>
26+
<action android:name="android.intent.action.MAIN" />
27+
28+
<category android:name="android.intent.category.LAUNCHER" />
29+
</intent-filter>
30+
</activity>
31+
32+
<activity
33+
android:name="org.michenux.yourappidea.activity.MyPreferences"
34+
android:label="@string/preferences_label"
35+
android:theme="@style/AppTheme" >
36+
</activity>
37+
<activity
38+
android:name="com.google.ads.AdActivity"
39+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
40+
41+
<provider
42+
android:name="org.michenux.yourappidea.friends.FriendContentProvider"
43+
android:authorities="org.michenux.yourappidea.friends"
44+
android:exported="false" >
45+
</provider>
46+
</application>
47+
48+
</manifest>

YourAppIdea/src/main/assets/EULA

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write your EULA here.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
create table T_FRIEND (
2+
_id integer primary key autoincrement,
3+
JOB TEXT not null,
4+
FACE TEXT not null,
5+
NAME text not null);
6+
7+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Bertrand', 'Seller', 'face08');
8+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Romain', 'Teacher', 'face03');
9+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Alexis', 'Actor', 'face01');
10+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Vincent', 'Doctor', 'face09');
11+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Julie', 'Project Manager', 'face06');
12+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Florence', 'Baker', 'face03');
13+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Lydie', 'Web Designer', 'face07');
14+
insert into T_FRIEND(_id, NAME, JOB, FACE) values (null, 'Vanessa', 'House wife', 'face04');
15+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
insert into T_FRIEND(_id, NAME, JOB) values (null, 'Nicolas', 'Taxi driver');
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (C) 2011 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.volley;
18+
19+
import android.content.Intent;
20+
21+
import com.android.volley.NetworkResponse;
22+
import com.android.volley.VolleyError;
23+
24+
/**
25+
* Error indicating that there was an authentication failure when performing a Request.
26+
*/
27+
@SuppressWarnings("serial")
28+
public class AuthFailureError extends VolleyError {
29+
/** An intent that can be used to resolve this exception. (Brings up the password dialog.) */
30+
private Intent mResolutionIntent;
31+
32+
public AuthFailureError() { }
33+
34+
public AuthFailureError(Intent intent) {
35+
mResolutionIntent = intent;
36+
}
37+
38+
public AuthFailureError(NetworkResponse response) {
39+
super(response);
40+
}
41+
42+
public AuthFailureError(String message) {
43+
super(message);
44+
}
45+
46+
public AuthFailureError(String message, Exception reason) {
47+
super(message, reason);
48+
}
49+
50+
public Intent getResolutionIntent() {
51+
return mResolutionIntent;
52+
}
53+
54+
@Override
55+
public String getMessage() {
56+
if (mResolutionIntent != null) {
57+
return "User needs to (re)enter credentials.";
58+
}
59+
return super.getMessage();
60+
}
61+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
* Copyright (C) 2011 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.volley;
18+
19+
import java.util.Collections;
20+
import java.util.Map;
21+
22+
/**
23+
* An interface for a cache keyed by a String with a byte array as data.
24+
*/
25+
public interface Cache {
26+
/**
27+
* Retrieves an entry from the cache.
28+
* @param key Cache key
29+
* @return An {@link com.android.volley.Cache.Entry} or null in the event of a cache miss
30+
*/
31+
public Entry get(String key);
32+
33+
/**
34+
* Adds or replaces an entry to the cache.
35+
* @param key Cache key
36+
* @param entry Data to store and metadata for cache coherency, TTL, etc.
37+
*/
38+
public void put(String key, Entry entry);
39+
40+
/**
41+
* Performs any potentially long-running actions needed to initialize the cache;
42+
* will be called from a worker thread.
43+
*/
44+
public void initialize();
45+
46+
/**
47+
* Invalidates an entry in the cache.
48+
* @param key Cache key
49+
* @param fullExpire True to fully expire the entry, false to soft expire
50+
*/
51+
public void invalidate(String key, boolean fullExpire);
52+
53+
/**
54+
* Removes an entry from the cache.
55+
* @param key Cache key
56+
*/
57+
public void remove(String key);
58+
59+
/**
60+
* Empties the cache.
61+
*/
62+
public void clear();
63+
64+
/**
65+
* Data and metadata for an entry returned by the cache.
66+
*/
67+
public static class Entry {
68+
/** The data returned from cache. */
69+
public byte[] data;
70+
71+
/** ETag for cache coherency. */
72+
public String etag;
73+
74+
/** Date of this response as reported by the server. */
75+
public long serverDate;
76+
77+
/** TTL for this record. */
78+
public long ttl;
79+
80+
/** Soft TTL for this record. */
81+
public long softTtl;
82+
83+
/** Immutable response headers as received from server; must be non-null. */
84+
public Map<String, String> responseHeaders = Collections.emptyMap();
85+
86+
/** True if the entry is expired. */
87+
public boolean isExpired() {
88+
return this.ttl < System.currentTimeMillis();
89+
}
90+
91+
/** True if a refresh is needed from the original data source. */
92+
public boolean refreshNeeded() {
93+
return this.softTtl < System.currentTimeMillis();
94+
}
95+
}
96+
97+
}

0 commit comments

Comments
 (0)