일단 먼저 읽어봐야할것들 Is your Android emulator just too slow? https://www.infinum.co/the-capsized-eight/articles/is-your-android-emulator-just-too-slow Why is the Android emulator so slow? http://stackoverflow.com/questions/1554099/why-is-the-android-emulator-so-slow 8 Tips to Speed Up Your Android ARM Emulator (AVD) http://delphi.org/2013/11/8-tips-to-speed-up-your-android-arm-emulator-avd/ 안드로이드 에뮬레이터가 느릴 때, Intel x64 Emulator Accelerator (HAXM)를 설치하기 Open Android SDK Manager and install Install “Extras” -> “intel x86 Emulator Accelerator (HAXM)” Execute <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg. in the MAC….
Category: Mobile Development
Using KML file for iOS Simulator
(Before beginning, there may be other ways to use KML. I am just beginner in iOS programming and this is how I work around.) XCode allows to simulate the locations using GPX file type. One of location tracker, Google Latitude, allows to download recorded locations to KML file type. To use KML file for iOS…
XCode crash every second time.
I have XCode 4.6.2 (4H1003) and MBP retina. When I run my project in simulator, it crashes every second running without any error message in debug console. return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); The error is “Thread 1: signal SIGABRT“. Annoyingly, XCode does not give any error. According to the this guy, it is because of…
To use ‘messageComposeViewController’
To use ‘messageComposeViewController’ Add “MessageUI.framework” Library And should define on “AppDelegate.m” #import <MessageUI/MessageUI.h>
Where is “UIViewController subclass”?
In latest XCode (v4.6.2), I couldn’t find “UIViewController”, which tutorial book wants me to choose. According to this article, choose “Object-C Class” instead of.
deprecated! ‘UILineBreakModeCharacterWrap’ & ‘UITextAlignmentCenter’
When I use UILineBreakModeCharacterWrap, I get this message ‘UILineBreakModeCharacterWrap’ is deprecated use NSLineBreakByCharWrapping instead of it. //[label setLineBreakMode:UILineBreakModeCharacterWrap]; [label setLineBreakMode:NSLineBreakByCharWrapping]; If I use UITextAlignmentCenter, then I get ‘UITextAlignmentCenter’ is deprecated: first deprecated in iOS 6.0 use NSTextAlignmentCenter instead of: //[textLabel setTextAlignment:UITextAlignmentCenter]; [textLabel setTextAlignment:NSTextAlignmentCenter];
MainWindow.xib absence in Xcode 4.2 beta 4 with iOS 5 SDK
“FYI, I am very newbie in iPhone development.” I had upgraded Xcode to 4.2 beta 4 and realised that there is no more templates for iOS 4. Obviously, it did not include iOS 4 SDK because it said “with iOS 5 SDK”, duh! I could not go back to Xcode beta 3 since I upgraded…
Dynamic tab in android with dynamic tab content
Android How to check network status(Both Wifi and Mobile 3G)
Original Article: http://www.androidpeople.com/android-how-to-check-network-statusboth-wifi-and-mobile-3g/ import android.net.ConnectivityManager; import android.os.Bundle; import android.widget.Toast; public class pingtest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); chkStatus(); } void chkStatus() { final ConnectivityManager connMgr = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); final android.net.NetworkInfo wifi = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI); final android.net.NetworkInfo mobile = connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if( wifi.isAvailable() ){…
Different list items’ layouts
Original Article: http://android.amberfog.com/?p=296 public class MultipleItemsList extends ListActivity { private MyCustomAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAdapter = new MyCustomAdapter(); for (int i = 1; i < 50; i++) { mAdapter.addItem(“item ” + i); if (i % 4 == 0) { mAdapter.addSeparatorItem(“separator ” + i); } } setListAdapter(mAdapter); } private class…
Separating Lists with Headers in Android 0.9
Original Article: http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ <!– list_header.xml –> <TextView xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/list_header_title” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:paddingTop=”2dip” android:paddingBottom=”2dip” android:paddingLeft=”5dip” style=”?android:attr/listSeparatorTextViewStyle” /> <!– list_item.xml –> <TextView xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/list_item_title” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:paddingTop=”10dip” android:paddingBottom=”10dip” android:paddingLeft=”15dip” android:textAppearance=”?android:attr/textAppearanceLarge” /> <!– list_complex.xml –> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:orientation=”vertical” android:paddingTop=”10dip” android:paddingBottom=”10dip” android:paddingLeft=”15dip” > <TextView android:id=”@+id/list_complex_title” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:textAppearance=”?android:attr/textAppearanceLarge” /> <TextView android:id=”@+id/list_complex_caption” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:textAppearance=”?android:attr/textAppearanceSmall” /> </LinearLayout>…
Android Series: GET, POST and Multipart POST requests
Original Article: Android Series: GET, POST and Multipart POST requests try { HttpClient client = new DefaultHttpClient(); String getURL = “http://www.google.com”; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i(“GET RESPONSE”,EntityUtils.toString(resEntityGet)); } } catch (Exception e) { e.printStackTrace(); }…
Android: How to make current layout with scrollable text view?
Original Article: http://stackoverflow.com/questions/2621776/android-how-to-make-current-layout-with-scrollable-text-view ——————– |btn1| txt1 |btn2| ——————– | | | | | | | txtview1 | | | |…
‘Localhost’ in the android emulator
Original Article: http://www.droidnova.com/ever-tried-localhost-with-the-android-emulator,102.html Local Apache/Tomcat/whatever: 10.0.2.2
Android Application and AsyncTask basics
Original Article: http://www.screaming-penguin.com/node/7746 public class Main extends Activity { private static final String NAME = “NAME”; private EditText input; private Button saveButton; private Button deleteButton; private TextView output; private MyApplication application; @Override public void onCreate(final Bundle savedInstanceState) { Log.d(MyApplication.APP_NAME, “onCreate”); super.onCreate(savedInstanceSt<wbr>ate); this.setContentView(R.layout.m<wbr>ain); // get “Application” object for shared state or creating of expensive resources -…
Talking To Web Servers Via HTTP In Android 1.0
Original Article: http://brainflush.wordpress.com/2008/10/17/talking-to-web-servers-via-http-in-android-10/ HttpClient httpClient = new DefaultHttpClient(); StringBuilder uriBuilder = new StringBuilder(SERVICE_ENDPOINT); uriBuilder.append(“?param0=” + param0); uriBuilder.append(“¶m1=” + param1); uriBuilder.append(“¶mN=” + paramN); HttpGet request = new HttpGet(uriBuilder.toString()); HttpResponse response = httpClient.execute(request); int status = response.getStatusLine().getStatusCode(); // we assume that the response body contains the error message if (status != HttpStatus.SC_OK) { ByteArrayOutputStream ostream = new…
Https returns 404 with DefaultHttpClient on Android?
Reference: http://stackoverflow.com/questions/3730760/https-returns-404-with-defaulthttpclient-on-android I have an http request that worked as http://blah.com and now I have been asked to usehttps://blah.com The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client? Answer Https almost always implies a different port being used (standard http=>80; standard https=>443)….
DroidDraw Beta
User Interface (UI) designer/editor for programming the Android Cell Phone Platform http://www.droiddraw.org/
How to fix java.net.UnknownHostException on Android
Original Article: http://jesper.storm-frandsen.dk/pages/How_to_fix_java.net.UnknownHostException_on_Android.php Start the emunator manually with the following command. The trick worked for me, when everything else did not work. C:\android\tools>emulator -avd Legend78 -dns-server 8.8.8.8 The IP address 8.8.8.8 is google-public-dns-a.google.com Or configure Eclipse in the Run or Debug configuration.
Support various screen-size in the Android UI – AndroidPub
Reference : [안드앱콘1] 다양한 스크린 사이즈에서의 UI 처리 http://www.androidpub.com/?mid=android_dev_info&category=127161& amp;page=4&document_srl=320322 Points – Handle resource by folder names res/layout/my_layout.xml: Normal screen-size layout res/layout-small/my_layout.xml: Small screen-size layout res/layout-large/my_layout.xml: Large screen-size layout res/drawable-ldpi/my_icon.png: Icons for low density res/drawable-mdpi/dpi/my_icon.png: Icons for medium density res/drawable-hdpi/my_icon.png: Icons for high density res/drawable-nodpi/composite.xml: Resources that unrelated with density – Do we need to generate…
Designing for Performance
Reference: http://developer.android.com/guide/practices/design/performance.html 성능을 위한 디자인 * 기본적으로 할수있다면 임시 객체를 생성하는것을 최대한 피하라. 생성된 객체가 적을 수록 UX(User Experience)에 직접적인 영향을 미치는 가비지 콜렉션(Garbage Collection)이 적게 실행된다. 1. 객체 생성을 피하라 – 입력 데이터에서 문자열을 추출할때, 복사본을 만드는 대신에, 원본 데이터 문자열의 부분만 리턴하여라. String 객체를 만들어야 하겠지만, 그 객체는 원본데이터와 char[]를 공유할 것이다. – 만약 문자열을 리턴하는…
Android Activity Life Cycle
Making the Android UI Fast and Efficient by Romain Guy
Th_0230_TurboChargeYourUI-HowtomakeyourAndroidUIfastandefficient.pdf Point! Adapters Better Code for efficient view redraw ——————————————————————– 1. Create simple class ——————————————————————– static class ViewHolder { TextView text; ImageView icon; } ——————————————————————– 2. getView() ——————————————————————– public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if(convertView == null) { convertView = mInflater.inflate(R.layout.list_item_icon_text, null); holder = new ViewHolder(); holder.text = (TextView) convertView.findViewById(R.id.text);…
Share Google Android API Key in Eclipse with other team members
Share Google Android API Key in Eclipse with other team members Basically, default debug keystore is stored in /Users/{NAME}/.android/debug_keystore 1. Set SVN Repository and Checkout to the computer, which contains the file “debug.keystore” 2. In Eclipse, File->Preference->Android->Build. 3. Set “Custom debug keystore” to “debug.keystore” file in SVN Checkout Directory Then, do not need to change…
Using the Android SDK on a Mac, Eclipse is really slow. How can I speed it up?
Original Article: http://stackoverflow.com/questions/2787055/using-the-android-sdk-on-a-mac-eclipse-is-really-slow-how-can-i-speed-it-up I’m using Eclipse + the Android SDK on a Mac running Snow Leopard to develop Android apps. Thing is, Eclipse is really slow – like, it “beach balls” for a few seconds when changing tabs. Is there anything I can do to improve it’s performance? The solution: change the Java version used…