Commit 14a9a44ef6f7523fac8ed7086916be775d18e46a
1 parent
b34432e9
Crea carpeta para segmentos
Showing
4 changed files
with
100 additions
and
97 deletions
AndroidManifest.xml
... | ... | @@ -9,8 +9,6 @@ |
9 | 9 | |
10 | 10 | <uses-permission android:name="android.permission.INTERNET" /> |
11 | 11 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
12 | - <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
13 | - <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | |
14 | 12 | |
15 | 13 | <uses-feature android:name="android.hardware.wifi" /> |
16 | 14 | ... | ... |
gen/com/upc/pbe/upcnews/R.java
1 | -/* AUTO-GENERATED FILE. DO NOT MODIFY. | |
2 | - * | |
3 | - * This class was automatically generated by the | |
4 | - * aapt tool from the resource data it found. It | |
5 | - * should not be modified by hand. | |
6 | - */ | |
7 | - | |
8 | -package com.upc.pbe.upcnews; | |
9 | - | |
10 | -public final class R { | |
11 | - public static final class attr { | |
12 | - } | |
13 | - public static final class color { | |
14 | - public static final int Black=0x7f050002; | |
15 | - public static final int Blue=0x7f050004; | |
16 | - public static final int BlueAndroid=0x7f050005; | |
17 | - public static final int Gay=0x7f050007; | |
18 | - public static final int Gray=0x7f05000a; | |
19 | - public static final int Green=0x7f050009; | |
20 | - public static final int Orange=0x7f050003; | |
21 | - public static final int Red=0x7f050008; | |
22 | - public static final int White=0x7f050006; | |
23 | - public static final int Whyte_POwaH=0x7f050001; | |
24 | - public static final int backgroundmain=0x7f050000; | |
25 | - } | |
26 | - public static final class dimen { | |
27 | - public static final int TitleSize=0x7f060000; | |
28 | - public static final int lesize=0x7f060001; | |
29 | - } | |
30 | - public static final class drawable { | |
31 | - public static final int ic_action_search=0x7f020000; | |
32 | - public static final int ic_launcher=0x7f020001; | |
33 | - public static final int ic_ledarklogo=0x7f020002; | |
34 | - public static final int ic_menu_name=0x7f020003; | |
35 | - public static final int ic_startbutton=0x7f020004; | |
36 | - public static final int selectedonlist=0x7f020005; | |
37 | - public static final int selectedonlist2=0x7f020006; | |
38 | - public static final int startbuttontoggle=0x7f020007; | |
39 | - } | |
40 | - public static final class id { | |
41 | - public static final int LinearLayout1=0x7f0a0001; | |
42 | - public static final int RelativeLayout1=0x7f0a0006; | |
43 | - public static final int button=0x7f0a0007; | |
44 | - public static final int itemhelp=0x7f0a000c; | |
45 | - public static final int itemprefs=0x7f0a000b; | |
46 | - public static final int listView1=0x7f0a0003; | |
47 | - public static final int menu_settings=0x7f0a000a; | |
48 | - public static final int rowTextView=0x7f0a0009; | |
49 | - public static final int textView1=0x7f0a0004; | |
50 | - public static final int textView2=0x7f0a0005; | |
51 | - public static final int textViewTitle=0x7f0a0002; | |
52 | - public static final int textViewXml=0x7f0a0008; | |
53 | - public static final int videoView1=0x7f0a0000; | |
54 | - } | |
55 | - public static final class layout { | |
56 | - public static final int activity_video=0x7f030000; | |
57 | - public static final int dirs=0x7f030001; | |
58 | - public static final int help=0x7f030002; | |
59 | - public static final int main_activity=0x7f030003; | |
60 | - public static final int rowlayout=0x7f030004; | |
61 | - } | |
62 | - public static final class menu { | |
63 | - public static final int activity_main=0x7f090000; | |
64 | - public static final int activity_video=0x7f090001; | |
65 | - public static final int menu=0x7f090002; | |
66 | - } | |
67 | - public static final class string { | |
68 | - public static final int app_name=0x7f070000; | |
69 | - public static final int button=0x7f07000c; | |
70 | - public static final int button1=0x7f07000d; | |
71 | - public static final int desc=0x7f070009; | |
72 | - public static final int descarregar=0x7f070003; | |
73 | - public static final int dir=0x7f07000a; | |
74 | - public static final int directoris=0x7f07000b; | |
75 | - public static final int hello_world=0x7f070010; | |
76 | - public static final int help=0x7f070008; | |
77 | - public static final int hint=0x7f070004; | |
78 | - public static final int menu_settings=0x7f070001; | |
79 | - public static final int prefs=0x7f070007; | |
80 | - public static final int startbuttondescription=0x7f07000f; | |
81 | - public static final int title=0x7f07000e; | |
82 | - public static final int title_activity_main=0x7f070002; | |
83 | - public static final int title_activity_video=0x7f070011; | |
84 | - public static final int url=0x7f070005; | |
85 | - public static final int urlhint=0x7f070006; | |
86 | - } | |
87 | - public static final class style { | |
88 | - public static final int AppTheme=0x7f080000; | |
89 | - } | |
90 | - public static final class xml { | |
91 | - public static final int prefs=0x7f040000; | |
92 | - } | |
93 | -} | |
1 | +/* AUTO-GENERATED FILE. DO NOT MODIFY. | |
2 | + * | |
3 | + * This class was automatically generated by the | |
4 | + * aapt tool from the resource data it found. It | |
5 | + * should not be modified by hand. | |
6 | + */ | |
7 | + | |
8 | +package com.upc.pbe.upcnews; | |
9 | + | |
10 | +public final class R { | |
11 | + public static final class attr { | |
12 | + } | |
13 | + public static final class color { | |
14 | + public static final int Black=0x7f050002; | |
15 | + public static final int Blue=0x7f050004; | |
16 | + public static final int BlueAndroid=0x7f050005; | |
17 | + public static final int Gay=0x7f050007; | |
18 | + public static final int Gray=0x7f05000a; | |
19 | + public static final int Green=0x7f050009; | |
20 | + public static final int Orange=0x7f050003; | |
21 | + public static final int Red=0x7f050008; | |
22 | + public static final int White=0x7f050006; | |
23 | + public static final int Whyte_POwaH=0x7f050001; | |
24 | + public static final int backgroundmain=0x7f050000; | |
25 | + } | |
26 | + public static final class dimen { | |
27 | + public static final int TitleSize=0x7f060000; | |
28 | + public static final int lesize=0x7f060001; | |
29 | + } | |
30 | + public static final class drawable { | |
31 | + public static final int ic_action_search=0x7f020000; | |
32 | + public static final int ic_launcher=0x7f020001; | |
33 | + public static final int ic_ledarklogo=0x7f020002; | |
34 | + public static final int ic_menu_name=0x7f020003; | |
35 | + public static final int ic_startbutton=0x7f020004; | |
36 | + public static final int selectedonlist=0x7f020005; | |
37 | + public static final int selectedonlist2=0x7f020006; | |
38 | + public static final int startbuttontoggle=0x7f020007; | |
39 | + } | |
40 | + public static final class id { | |
41 | + public static final int LinearLayout1=0x7f0a0001; | |
42 | + public static final int RelativeLayout1=0x7f0a0006; | |
43 | + public static final int button=0x7f0a0007; | |
44 | + public static final int itemhelp=0x7f0a000c; | |
45 | + public static final int itemprefs=0x7f0a000b; | |
46 | + public static final int listView1=0x7f0a0003; | |
47 | + public static final int menu_settings=0x7f0a000a; | |
48 | + public static final int rowTextView=0x7f0a0009; | |
49 | + public static final int textView1=0x7f0a0004; | |
50 | + public static final int textView2=0x7f0a0005; | |
51 | + public static final int textViewTitle=0x7f0a0002; | |
52 | + public static final int textViewXml=0x7f0a0008; | |
53 | + public static final int videoView1=0x7f0a0000; | |
54 | + } | |
55 | + public static final class layout { | |
56 | + public static final int activity_video=0x7f030000; | |
57 | + public static final int dirs=0x7f030001; | |
58 | + public static final int help=0x7f030002; | |
59 | + public static final int main_activity=0x7f030003; | |
60 | + public static final int rowlayout=0x7f030004; | |
61 | + } | |
62 | + public static final class menu { | |
63 | + public static final int activity_main=0x7f090000; | |
64 | + public static final int activity_video=0x7f090001; | |
65 | + public static final int menu=0x7f090002; | |
66 | + } | |
67 | + public static final class string { | |
68 | + public static final int app_name=0x7f070000; | |
69 | + public static final int button=0x7f07000c; | |
70 | + public static final int button1=0x7f07000d; | |
71 | + public static final int desc=0x7f070009; | |
72 | + public static final int descarregar=0x7f070003; | |
73 | + public static final int dir=0x7f07000a; | |
74 | + public static final int directoris=0x7f07000b; | |
75 | + public static final int hello_world=0x7f070010; | |
76 | + public static final int help=0x7f070008; | |
77 | + public static final int hint=0x7f070004; | |
78 | + public static final int menu_settings=0x7f070001; | |
79 | + public static final int prefs=0x7f070007; | |
80 | + public static final int startbuttondescription=0x7f07000f; | |
81 | + public static final int title=0x7f07000e; | |
82 | + public static final int title_activity_main=0x7f070002; | |
83 | + public static final int title_activity_video=0x7f070011; | |
84 | + public static final int url=0x7f070005; | |
85 | + public static final int urlhint=0x7f070006; | |
86 | + } | |
87 | + public static final class style { | |
88 | + public static final int AppTheme=0x7f080000; | |
89 | + } | |
90 | + public static final class xml { | |
91 | + public static final int prefs=0x7f040000; | |
92 | + } | |
93 | +} | ... | ... |
src/com/upc/pbe/upcnews/MainActivity.java
... | ... | @@ -24,8 +24,13 @@ public class MainActivity extends Activity implements OnClickListener { |
24 | 24 | super.onCreate(savedInstanceState); |
25 | 25 | setContentView(R.layout.main_activity); |
26 | 26 | Log.d(TAG, "onCreated"); |
27 | + Log.d(TAG,((UpcApp)getApplication()).getLocalPath()); | |
27 | 28 | File tempFolder = new File(((UpcApp)getApplication()).getLocalPath()); |
28 | - tempFolder.mkdirs(); | |
29 | + boolean success = tempFolder.mkdirs(); | |
30 | + if(success) | |
31 | + { | |
32 | + Log.d(TAG,"Directory created"); | |
33 | + } | |
29 | 34 | buttonDescarrega = (ImageButton) findViewById(R.id.button); |
30 | 35 | buttonDescarrega.setOnClickListener(this); |
31 | 36 | this.getUrl(); | ... | ... |
src/com/upc/pbe/upcnews/UpcApp.java
... | ... | @@ -15,7 +15,7 @@ public class UpcApp extends Application implements OnSharedPreferenceChangeListe |
15 | 15 | private String defaultUrl = "imanolbarba.myftp.biz/PBE"; |
16 | 16 | private String url = null; |
17 | 17 | private String desc; |
18 | - private final static String localPath = Environment.getExternalStorageDirectory().getPath() + "UPC/"; | |
18 | + private final static String localPath = Environment.getExternalStorageDirectory().getPath() + "/UPC NEWS/"; | |
19 | 19 | |
20 | 20 | public String getLocalPath() |
21 | 21 | { | ... | ... |