9
9
10
10
import net .sjava .appstore .AmazonStoreApp ;
11
11
import net .sjava .appstore .AppStore ;
12
- import net .sjava .appstore .NaverAppStore ;
13
12
import net .sjava .appstore .OneStoreApp ;
14
13
import net .sjava .appstore .PlayAppStore ;
15
14
import net .sjava .appstore .PublisherAppOpenable ;
@@ -26,23 +25,21 @@ protected void onCreate(Bundle savedInstanceState) {
26
25
27
26
initPlayAppStore ();
28
27
initAmazonAppStore ();
29
- initTAppStore ();
30
- initNaverAppStore ();
31
-
28
+ initOneStore ();
32
29
}
33
30
34
31
private AppStore appStore ;
35
32
private PublisherAppOpenable publisherAppOpener ;
36
33
37
34
//https://play.google.com/store/apps/details?id=com.google.android.gm
38
35
private void initPlayAppStore () {
39
- Button btn01 = ( Button ) findViewById (R .id .play_button_01 );
40
- Button btn02 = ( Button ) findViewById (R .id .play_button_02 );
41
- Button btn03 = ( Button ) findViewById (R .id .play_button_03 );
42
- Button btn04 = ( Button ) findViewById (R .id .play_button_04 );
36
+ Button btn01 = findViewById (R .id .play_button_01 );
37
+ Button btn02 = findViewById (R .id .play_button_02 );
38
+ Button btn03 = findViewById (R .id .play_button_03 );
39
+ Button btn04 = findViewById (R .id .play_button_04 );
43
40
44
- Button btn05 = ( Button ) findViewById (R .id .play_button_05 );
45
- Button btn06 = ( Button ) findViewById (R .id .play_button_06 );
41
+ Button btn05 = findViewById (R .id .play_button_05 );
42
+ Button btn06 = findViewById (R .id .play_button_06 );
46
43
47
44
btn01 .setOnClickListener (new View .OnClickListener () {
48
45
@ Override
@@ -109,10 +106,10 @@ Staff Picks (Featured) featured
109
106
}
110
107
111
108
private void initAmazonAppStore () {
112
- Button btn01 = ( Button ) findViewById (R .id .amazon_button_01 );
113
- Button btn02 = ( Button ) findViewById (R .id .amazon_button_02 );
114
- Button btn03 = ( Button ) findViewById (R .id .amazon_button_03 );
115
- Button btn04 = ( Button ) findViewById (R .id .amazon_button_04 );
109
+ Button btn01 = findViewById (R .id .amazon_button_01 );
110
+ Button btn02 = findViewById (R .id .amazon_button_02 );
111
+ Button btn03 = findViewById (R .id .amazon_button_03 );
112
+ Button btn04 = findViewById (R .id .amazon_button_04 );
116
113
117
114
btn01 .setOnClickListener (new View .OnClickListener () {
118
115
@ Override
@@ -147,11 +144,11 @@ public void onClick(View v) {
147
144
});
148
145
}
149
146
150
- private void initTAppStore () {
151
- Button btn01 = ( Button ) findViewById (R .id .tstore_button_01 );
152
- Button btn02 = ( Button ) findViewById (R .id .tstore_button_02 );
153
- Button btn03 = ( Button ) findViewById (R .id .tstore_button_03 );
154
- Button btn04 = ( Button ) findViewById (R .id .tstore_button_04 );
147
+ private void initOneStore () {
148
+ Button btn01 = findViewById (R .id .tstore_button_01 );
149
+ Button btn02 = findViewById (R .id .tstore_button_02 );
150
+ Button btn03 = findViewById (R .id .tstore_button_03 );
151
+ Button btn04 = findViewById (R .id .tstore_button_04 );
155
152
156
153
btn01 .setOnClickListener (new View .OnClickListener () {
157
154
@ Override
@@ -191,51 +188,4 @@ public void onClick(View v) {
191
188
}); */
192
189
}
193
190
194
-
195
- private void initNaverAppStore () {
196
- Button btn01 = (Button )findViewById (R .id .naver_button_01 );
197
- Button btn02 = (Button )findViewById (R .id .naver_button_02 );
198
- Button btn03 = (Button )findViewById (R .id .naver_button_03 );
199
- Button btn04 = (Button )findViewById (R .id .naver_button_04 );
200
-
201
- btn01 .setOnClickListener (new View .OnClickListener () {
202
- @ Override
203
- public void onClick (View v ) {
204
- appStore = NaverAppStore .newInstance ();
205
- Toast .makeText (ctx , "설치 여부 : " + appStore .isInstalled (ctx ), Toast .LENGTH_SHORT ).show ();
206
- }
207
- });
208
-
209
-
210
- btn02 .setOnClickListener (new View .OnClickListener () {
211
- @ Override
212
- public void onClick (View v ) {
213
- appStore = NaverAppStore .newInstance ();
214
- appStore .openApp (ctx , "409160" );
215
- }
216
- });
217
-
218
- btn03 .setVisibility (View .INVISIBLE );
219
- /*
220
- btn03.setOnClickListener(new View.OnClickListener() {
221
- @Override
222
- public void onClick(View v) {
223
- publisherAppOpener = PlayAppStore.newInstance();
224
- publisherAppOpener.openPublisherApps(ctx, "Google Inc.");
225
- }
226
- }); */
227
-
228
- btn04 .setOnClickListener (new View .OnClickListener () {
229
- @ Override
230
- public void onClick (View v ) {
231
- appStore = NaverAppStore .newInstance ();
232
- appStore .searchApp (ctx , "naver" );
233
- }
234
- });
235
- }
236
-
237
-
238
-
239
-
240
-
241
191
}
0 commit comments