This repository has been archived by the owner on Nov 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
769c7fb
commit b795b51
Showing
11 changed files
with
229 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.wversionmanager.sample" | ||
package="com.winsontan520.wversionmanager.sample" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="8" | ||
android:targetSdkVersion="17" /> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
<activity | ||
android:name="com.example.wversionmanager.sample.MainActivity" | ||
android:name="com.winsontan520.wversionmanager.sample.ExampleListActivity" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name="com.winsontan520.wversionmanager.sample.CheckVersionActivity" | ||
android:label="@string/app_name" | ||
android:windowSoftInputMode="stateHidden" > | ||
</activity> | ||
<activity | ||
android:name="com.winsontan520.wversionmanager.sample.AskForRateActivity" | ||
android:label="@string/app_name" > | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
6 changes: 0 additions & 6 deletions
6
sample/gen/com/example/wversionmanager/sample/BuildConfig.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
|
||
# Project target. | ||
target=android-17 | ||
android.library.reference.1=../library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".AskForRateActivity" > | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:orientation="vertical" > | ||
|
||
<Button | ||
android:id="@+id/ask_for_rate" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Ask For Rate" /> | ||
|
||
<TextView | ||
android:id="@+id/textView1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentBottom="true" | ||
android:layout_toLeftOf="@+id/checkBox1" | ||
android:text="Prompt dialog to ask user to rate." | ||
android:textAppearance="?android:attr/textAppearanceMedium" /> | ||
|
||
</LinearLayout> | ||
|
||
</ScrollView> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
sample/src/com/winsontan520/wversionmanager/sample/AskForRateActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.winsontan520.wversionmanager.sample; | ||
|
||
import com.winsontan520.wversionmanager.sample.R; | ||
import com.winsontan520.wversionmanager.library.WVersionManager; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.view.View.OnClickListener; | ||
import android.widget.Button; | ||
|
||
public class AskForRateActivity extends Activity { | ||
private Button askForRateButton; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.ask_for_rate); | ||
|
||
askForRateButton = (Button) findViewById(R.id.ask_for_rate); | ||
|
||
askForRateButton.setOnClickListener(new OnClickListener(){ | ||
|
||
@Override | ||
public void onClick(View v) { | ||
askForRate(); | ||
} | ||
}); | ||
} | ||
|
||
protected void askForRate() { | ||
WVersionManager versionManager = new WVersionManager(this); | ||
versionManager.setUpdateUrl("market://details?id=us.lovebyte"); | ||
versionManager.askForRate(); | ||
|
||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.