Skip to content

Commit ffc5b33

Browse files
committed
added source
1 parent 2918198 commit ffc5b33

File tree

402 files changed

+10920
-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.

402 files changed

+10920
-0
lines changed

android/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bin
2+
gen
3+
.settings
4+
.git
5+
.idea

android/Android_GPS_Using/.classpath

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

android/Android_GPS_Using/.project

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>AndroidGPSUsing</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.hrupin"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
<uses-sdk android:minSdkVersion="8" />
7+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
8+
9+
<application android:icon="@drawable/icon" android:label="@string/app_name">
10+
<activity android:name="HelloAndroidGpsActivity"
11+
android:label="@string/app_name">
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
<category android:name="android.intent.category.LAUNCHER" />
15+
</intent-filter>
16+
</activity>
17+
18+
</application>
19+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system use,
7+
# "build.properties", and override values to adapt the script to your
8+
# project structure.
9+
10+
# Project target.
11+
target=android-8
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
-optimizationpasses 5
2+
-dontusemixedcaseclassnames
3+
-dontskipnonpubliclibraryclasses
4+
-dontpreverify
5+
-verbose
6+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7+
8+
-keep public class * extends android.app.Activity
9+
-keep public class * extends android.app.Application
10+
-keep public class * extends android.app.Service
11+
-keep public class * extends android.content.BroadcastReceiver
12+
-keep public class * extends android.content.ContentProvider
13+
-keep public class * extends android.app.backup.BackupAgentHelper
14+
-keep public class * extends android.preference.Preference
15+
-keep public class com.android.vending.licensing.ILicensingService
16+
17+
-keepclasseswithmembernames class * {
18+
native <methods>;
19+
}
20+
21+
-keepclasseswithmembernames class * {
22+
public <init>(android.content.Context, android.util.AttributeSet);
23+
}
24+
25+
-keepclasseswithmembernames class * {
26+
public <init>(android.content.Context, android.util.AttributeSet, int);
27+
}
28+
29+
-keepclassmembers enum * {
30+
public static **[] values();
31+
public static ** valueOf(java.lang.String);
32+
}
33+
34+
-keep class * implements android.os.Parcelable {
35+
public static final android.os.Parcelable$Creator *;
36+
}
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical" android:layout_width="fill_parent"
4+
android:layout_height="fill_parent">
5+
<TextView android:layout_height="wrap_content" android:text="My Location is:"
6+
android:layout_width="match_parent" android:textSize="16px"
7+
android:textStyle="bold" android:gravity="center_horizontal"
8+
android:layout_marginTop="10dip" android:layout_marginBottom="10dip" />
9+
<EditText android:layout_height="wrap_content" android:text=""
10+
android:layout_width="match_parent" android:id="@+id/editTextShowLocation"
11+
android:lines="6" android:gravity="top"/>
12+
<Button android:layout_height="wrap_content"
13+
android:layout_width="match_parent" android:id="@+id/buttonGetLocation"
14+
android:text="Get My Location" android:textSize="15px"
15+
android:textStyle="bold" android:layout_marginTop="10dip" />
16+
</LinearLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="hello">Hello World, HelloAnroidGpsActivity!</string>
4+
<string name="app_name">Android GPS Using</string>
5+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
package com.hrupin;
2+
3+
import android.app.Activity;
4+
import android.content.Context;
5+
import android.location.Location;
6+
import android.location.LocationListener;
7+
import android.location.LocationManager;
8+
import android.os.Bundle;
9+
import android.view.View;
10+
import android.view.View.OnClickListener;
11+
import android.widget.Button;
12+
import android.widget.EditText;
13+
14+
public class HelloAndroidGpsActivity extends Activity {
15+
16+
private EditText editTextShowLocation;
17+
private Button buttonGetLocation;
18+
19+
private LocationManager locManager;
20+
private LocationListener locListener;
21+
private Location mobileLocation;
22+
23+
/** Called when the activity is first created. */
24+
@Override
25+
public void onCreate(Bundle savedInstanceState) {
26+
super.onCreate(savedInstanceState);
27+
setContentView(R.layout.main);
28+
editTextShowLocation = (EditText) findViewById(R.id.editTextShowLocation);
29+
30+
buttonGetLocation = (Button) findViewById(R.id.buttonGetLocation);
31+
buttonGetLocation.setOnClickListener(new OnClickListener() {
32+
public void onClick(View v) {
33+
buttonGetLocationClick();
34+
}
35+
});
36+
}
37+
38+
/** Gets the current location and update the mobileLocation variable*/
39+
private void getCurrentLocation() {
40+
locManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
41+
locListener = new LocationListener() {
42+
@Override
43+
public void onStatusChanged(String provider, int status,
44+
Bundle extras) {
45+
// TODO Auto-generated method stub
46+
}
47+
48+
@Override
49+
public void onProviderEnabled(String provider) {
50+
// TODO Auto-generated method stub
51+
}
52+
53+
@Override
54+
public void onProviderDisabled(String provider) {
55+
// TODO Auto-generated method stub
56+
}
57+
58+
@Override
59+
public void onLocationChanged(Location location) {
60+
// TODO Auto-generated method stub
61+
mobileLocation = location;
62+
}
63+
};
64+
locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locListener);
65+
}
66+
67+
private void buttonGetLocationClick() {
68+
getCurrentLocation(); // gets the current location and update mobileLocation variable
69+
70+
if (mobileLocation != null) {
71+
locManager.removeUpdates(locListener); // This needs to stop getting the location data and save the battery power.
72+
73+
String londitude = "Londitude: " + mobileLocation.getLongitude();
74+
String latitude = "Latitude: " + mobileLocation.getLatitude();
75+
String altitiude = "Altitiude: " + mobileLocation.getAltitude();
76+
String accuracy = "Accuracy: " + mobileLocation.getAccuracy();
77+
String time = "Time: " + mobileLocation.getTime();
78+
79+
editTextShowLocation.setText(londitude + "\n" + latitude + "\n"
80+
+ altitiude + "\n" + accuracy + "\n" + time);
81+
} else {
82+
editTextShowLocation.setText("Sorry, location is not determined");
83+
}
84+
}
85+
86+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Clear User Data Sample</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.hrupin.cleaner"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
<uses-sdk android:minSdkVersion="8" />
7+
8+
<application android:icon="@drawable/icon" android:name=".MyApplication" android:label="@string/app_name">
9+
<activity android:name=".ClearUserDataSampleActivity"
10+
android:label="@string/app_name">
11+
<intent-filter>
12+
<action android:name="android.intent.action.MAIN" />
13+
<category android:name="android.intent.category.LAUNCHER" />
14+
</intent-filter>
15+
</activity>
16+
17+
</application>
18+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system use,
7+
# "build.properties", and override values to adapt the script to your
8+
# project structure.
9+
10+
# Project target.
11+
target=android-8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-optimizationpasses 5
2+
-dontusemixedcaseclassnames
3+
-dontskipnonpubliclibraryclasses
4+
-dontpreverify
5+
-verbose
6+
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7+
8+
-keep public class * extends android.app.Activity
9+
-keep public class * extends android.app.Application
10+
-keep public class * extends android.app.Service
11+
-keep public class * extends android.content.BroadcastReceiver
12+
-keep public class * extends android.content.ContentProvider
13+
-keep public class * extends android.app.backup.BackupAgentHelper
14+
-keep public class * extends android.preference.Preference
15+
-keep public class com.android.vending.licensing.ILicensingService
16+
17+
-keepclasseswithmembernames class * {
18+
native <methods>;
19+
}
20+
21+
-keepclasseswithmembers class * {
22+
public <init>(android.content.Context, android.util.AttributeSet);
23+
}
24+
25+
-keepclasseswithmembers class * {
26+
public <init>(android.content.Context, android.util.AttributeSet, int);
27+
}
28+
29+
-keepclassmembers class * extends android.app.Activity {
30+
public void *(android.view.View);
31+
}
32+
33+
-keepclassmembers enum * {
34+
public static **[] values();
35+
public static ** valueOf(java.lang.String);
36+
}
37+
38+
-keep class * implements android.os.Parcelable {
39+
public static final android.os.Parcelable$Creator *;
40+
}
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical" android:layout_width="fill_parent"
4+
android:layout_height="fill_parent">
5+
<TextView
6+
android:layout_margin="30dp" android:layout_width="wrap_content" android:text="Clear data of your application by clicking this button. Please check existion user data for this application in Settings--&gt;Applications--&gt;Manage Aplication--&gt; YOUR_APPLICATION" android:layout_height="wrap_content" android:textSize="15sp"></TextView>
7+
<Button android:layout_width="match_parent"
8+
android:id="@+id/buttonClearData" android:layout_height="wrap_content"
9+
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
10+
android:layout_marginTop="50dp" android:layout_marginBottom="50dp" android:text="Clear User Data"></Button>
11+
</LinearLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="hello">Hello World, ClearUserDataSampleActivity!</string>
4+
<string name="app_name">Clear User Data Sample</string>
5+
</resources>

0 commit comments

Comments
 (0)