Câu hỏi phỏng vấn Android

19:57 |

Câu hỏi phỏng vấn Android

Chắc các bạn trước khi đi phỏng vấn đều chuẩn bị hành trang tốt nhất cho mình. Dưới đây mình có tổng hợp một số câu hỏi phỏng vấn Android dành cho các bạn chuẩn bị theo hành trang khi phỏng vấn Android nhé.

Bài viết tổng hợp một số câu hỏi phỏng vấn vị trí Junior Android Developer được các leader thường xuyên hỏi các ứng viên. Chi tiết như dưới đây:

1.     Khi nào method onResume() được gọi?

onResume() là một trong những activity lifecycle method. Nó được gọi khi activity hiển thị dưới dạng foreground.
2.     Làm thế nào để khởi chạy một Activity bên trong ứng dụng?

Để khởi động một activity, bạn cần sử dung một explicit intent với đích đến là một activity cụ thể. Ví dụ như sau:


  Intent intent = new Intent(this, OtherActivity.class);
startActivity(intent);
2.     Làm thế nào để cài đặt activity là launcher activity cho ứng dụng?

Tất cả activity trong ứng dụng đều được định nghĩa trong file Manifest. Đối với launcher activity, cần phải định nghĩa intent-filter như sau:


 android:name=".MyActivity"
                android:label="@string/app_name">
          
               android:name="android.intent.action.MAIN" />
               android:name="android.intent.category.LAUNCHER" />
       
3.   ANR là gì?

ANR viết tắt của Application Not Responding. Nếu ứng dụng thực hiện quá nhiều task trên main thread và không phản hồi trong một thời gian dài, Android system sẽ hiển thị là dialog này.
4.   Các giải pháp để tránh ANR là gì?

ANR trong ứng dụng sẽ gây khó chịu cho người dùng. Nó có thể được gây ra do các nguyên nhân khác nhau. Dưới đây là một số lời giải pháp để tránh ANR:
- Thực hiện các task vụ về network, data trên những thread riêng biệt.
- Nếu ứng dụng có quá nhiều task ngầm, nên sử dụng IntentService.
- Định mức HTTP time out khi có những task liên quan đến remote server.
- Hãy cảnh giác của vòng lặp vô hạn trong tính toán phức tạp trong ứng dụng.
5.    Làm thế nào để chia sẻ văn bản bằng cách sử dụng intent trong Android?

Share intent là một cách dễ dàng và thuận tiện trong việc chia sẻ nội dung của ứng dụng của bạn với các ứng dụng khác.


Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(sendIntent);
6.   WebView trong Android là gì?

Một WebView là một thành phần giao diện người dùng Android dùng để hiển thị trang web. Nó có thể vừa hiển thị một trang web từ xa hoặc cũng có thể tải dữ liệu HTML tĩnh. Điều này bao gồm các chức năng của một trình duyệt có thể được tích hợp vào ứng dụng. WebView sử dụng WebKit rendering engine để hiển thị các trang web và bao gồm các phương pháp để di chuyển về phía trước và trở lại thông qua một lịch sử, phóng to thu nhỏ, vv.
7.   Các dạng context trong Android?

Context xác định tình trạng hiện tại của ứng dụng hoặc đối tượng. Nó cung cấp nhiều tính năng hữu ích như new activity instance, access databases, start a service,... Bạn có thế sử dụng các cách sau để lấy ra context:getApplicationContext(), getContext(), getBaseContext() or this trong activity hiện tại.

//Creating ui instance
ImageButton button = new ImageButton(getContext());

//creating adapter
ListAdapter adapter = new SimpleCursorAdapter(getApplicationContext(), ...);

//querying content provider
getApplicationContext().getContentResolver().query(uri, ...);

//start activity. Here this means activity context
Intent intent = new Intent(this, SecondActivity.class);
Xem thêm…

Publishing your first app in the Play Store: what you need to know

05:18 |
google-play-store
The easiest way to distribute an Android app is via the Google Play store. It isn’t the only distribution method, but it is the simplest way to reach millions of potential users. Publishing your first app in the Play Store isn’t hard, with a few tips and pointers you can have your app ready for download in next to no time.
Google has a one time $25 registration fee which you need to pay before you can upload an app.
The starting point is the Google Play Developer Console. It is Google’s dedicated dashboard for developers that lets you manage your apps in the Play Store. Google has a one time $25 registration fee which you need to pay before you can upload an app. Google says it encourages higher quality products, i.e. less SPAM. If you don’t like the idea then it helps to look at Apple’s and Microsoft’s policies for their app stores. Apple charges $99 per year. Microsoft charges between $12 and $99 per year, depending on the account type. google-play-dev-console
You also need to be in a supported country to distribute apps. Countries like the United States, the United Kingdom, Canada and Australia are on Google’s approved list, but countries like New Zealand and Singapore aren’t. Also, some of the recent additions to the European Union like Romania, Slovakia, and Slovenia don’t make it onto Google’s list.
After you have signed up and payed the registration fee, you need to complete your account details, including your Developer Name – the name that is displayed on the Google Play store. Once that is all done you might need to wait a little as officially it can take up to 48 hours for your Google Play Developer registration to be fully processed.
At this point it is probably worth taking a look at the Google Play Apps Policy Center and the Android Developer Help Center to avoid uploading content which is in violation of the Google Play terms and conditions. Any apps which violate the terms and conditions will be suspended from the store and repeated violations can result in the termination of your developer account. That probably sounds worse than it actually is. If you are creating original and well behaved apps then you don’t really have to worry.
google-play-maturity-rating
Before uploading your app to the Play Store you need to prepare a few things. One of the questions you need to answer during the publishing process is about the maturity rating of your app. Google has four rating levels: Everyone, Low maturity, Medium maturity and High maturity. Google has a guide to help you rate your app content for Google Play. Basically if your app includes references to alcohol, tobacco, drugs, gambling, or violence it will need to carry one of the higher maturity ratings. Apps with mild cartoon violence need to carry the Low Maturity rating as a minimum.
The Play Store listing is probably one of the most important elements for promoting your app.
You also need to watch the final size of your app. Google only allows apps of 50MB or less to be published as a single APK file. Any apps which exceed that size need to use Android’s APK Expansion Files API. With it you can build your app so that it downloads up to an additional 4GB from Google’s servers. On most devices, Google Play downloads the extra data at the same time as the app. In some cases, however, the app must download the files from Google Play when it starts.
The Play Store listing is probably one of the most important elements for promoting your app. A poor Play Store listing will result in few downloads and probably negative comments. Your Play Store listing needs to be engaging, informative and friendly. To help attract users, Google lets you supply a variety of promotional graphics, videos and screenshots that will appear on the apps listing on the Play Store. Since these graphic are a key part of a successful Play Store listing, Google says that “you should consider having a professional produce them for you.”
The feature graphic needs to be bold, vivid, fun and enticing.
The first graphics you need are the screenshots. You need to provide at least two phone screenshots. However for best results you should upload 8 screenshots (the most allowed by Google). You should also upload screen shots of your app running on a 7-inch tablet and on a 10-inch tablet. Google’s instructions say that “for your app to be showcased in the ‘Designed for tablets’ list in the Play Store, you need to upload at least one 7-inch and one 10-inch screenshot.” Along with the screenshots you will need to prepare a Hi-res icon (512 x 512), a Feature graphic (1024 x 500) and a Promo graphic (180 x 120). The last two are marked as optional, but you really should consider them as mandatory. Without a Feature image your app can’t be featured anywhere within Google Play.
Example of a good featured image.
Example of a good featured image.
The feature graphic needs to be bold, vivid, fun and enticing. It should use colors which stand out on plain backgrounds and it should promote your brand. It shouldn’t be text heavy and neither should it be overloaded with graphic details. Anything more than the app name and maybe a few descriptive words will be lost on smaller screens.
Setting the price to free is permanent, you can't change it back to paid once it has been published.
The final part of the Play Store listing is to set the price of your app and in which countries it should be distributed. If the app is free then you simply mark it as free. However it is worth noting that setting the price to free is permanent, you can’t change it back to paid once it has been published.
For paid apps you need to set the price. You can just set the price in USD and then let Google calculate the prices for each of the local markets, or you can set prices individually for the different currencies. The latter option gives you the flexibility to adjust the local prices according to market conditions and exchange rates.
Once you are happy with your Play Store listing you can upload the APK file and click the Publish button. It takes a few hours for the app to appear. The publication process is automatic and it isn’t too long before your app becomes available for download.
If you are uploading your first Android app then the Android Authority team wants to wish you every success!
Xem thêm…

Hướng dẫn tự tạo tài khoản VIP trên Zing MP3 cho Android

06:24 |
Hướng dẫn tự tạo tài khoản VIP trên Zing MP3 cho Android
Mấy ngày qua thấy rộ vụ Restore app Zing Mp3 được login sẵn nick admin có vip và hạn đến năm 2047 . mình xin xác thực là ko có thật cái nick admin được login vào đấy . đó chỉ là thủ thuật nhỏ đánh lừa app , đánh lừa cả người dùng .
nay viết tút hướng dẫn các bạn tự làm ngay trên chính nick mình đang login vào app 
Bắt đầu: (Yêu cầu đt đã ROOT)
Login bằng acc của bạn vào zing ( ai chưa có tải về , app hiện đang dùng trong máy, kể cả app zing mod lòe loẹt ok hết )
các bạn dùng Root Xplore duyệt theo theo đường dẫn data/data/com.zing.mp3/shared_prefs/ tới đây bạn thấy file Zingmp3.xml các bạn chỉnh sửa nó bằng cách ấn giữ và chọn Open in Text Editor ( khuyến khích dùng app jota+ để sửa vì đây là file *.xml ) .
Có 2 trường hợp :
1 : nick bạn đã có vip ( mới đây zing có tặng vip 30 ngày )
Như vậy các bạn sẻ thấy dòng
<long name=”vip_exp_date” value=”xxxxxxxxxxxx” />
xxxxxxxxxx là dãy số hạn sử dụng vip
Mấu chốt ở dãy số xxxxxxxxxxx đấy, nó chính là hạn sử dụng của vip hiện trên app tùy nick có hạn khác nhau do đó dãy số này cũng khác nhau , các bạn copy dãy số này 2436499917000 thay vào dãy số cũ của các bạn rồi save lại thoát ra > reboot và tận hưởng
2 : nick bạn chưa có vip
các bạn chú ý dòng
<boolean name=”is_vip” value=”false” />
dòng này cho biết nick bạn là tài khoản thường .
các bạn thay giá trị false thành true vậy là được dòng
<boolean name=”is_vip” value=”true” /> vậy là đã có vip.
Các bạn dán 2 dòng này
<long name=”vip_exp_date” value=”2436499917000″ />
ngay trên dòng
<boolean name=”is_vip” value=”true” />
Rồi save lại > reboot và tận hưởng..
WARNING : ngày vip kia chỉ là ảo , ko có thật nó chỉ đánh lừa app để app nhận dạng nick của các bạn có vip hay ko để đc sử dụng tính năng mà nick vip mới đc dùng thôi nhé 
Thân
Nguồn: Dương Kim Thạch
Xem thêm…

Android dictionary

08:43 |

Android Dictionary - Từ điển Android Hôm nay, devteam xin giới thiệu với các bạn một nền văn hóa mới. Các cụ nhà ta thường nói: "Sở hữu mà không hiểu biết thì không khác gì vua bù nhìn". Thế nên, devteam mong muốn các bạn hiểu rõ chiếc điện thoại các bạn đang sử dụng. Đây sẽ là nét văn hóa riêng của Devteam chúng ta. Chúng ta cùng tập trung phân định xem chiếc điện thoại bạn sử dụng có phải là một chiếc Android hay không? Tuy mới ra đời cách đây không lâu, Android sớm trở nên phổ biến bởi tính mở của nó. Các bạn có thể dễ dàng phân biệt chiếc Android với các dòng khác bởi giao diện và thư viện chợ ứng dụng. Ở đây, chúng tôi sẽ giải thích cho các bạn một số khái niệm để các bạn tiện theo dõi về sau:

[​IMG]
.APK Khái niệm này nhắm đến các ứng dụng được phát triển cho hệ điều hành Android. Thông thường một APK đều bao gồm phần mã nguồn và phần định nghĩa (.dex) trong nó được lưu dưới tên classes, resources, assets, and manifest file. Tên ứng dụng apk được định nghĩa trong manifest file, tên *.apk coi như tên mở rộng, các bạn có thể đặt tùy ý. Ví dụ: SystemUI_cuatoi.apk có phần tên tiếng việt đã được tùy biến là "cuatoi", tuy nhiên các bạn có thể thấy nó vẫn hoạt động như một “.apk” thực là SystemUI.apk - Thanh statusbar

.DEX Dalvik Executable. Đóng gói hoàn thiện Apk file. Ứng dụng Android chứa .dex files, Chứng tỏ nó đã được đăng ký dành cho hệ thống Android, .dex files có thể được tạo tự động do trình biên dịch Java của người viết. Trên điện thoại Android, các bạn có thể tìm thấy .dex file tại đường dẫn "/data/david-cache" nhé!
.ODEX Object Dalvik Executable. Đối tượng tách biệt, đi kèm với apk file. Odex thường được sử dụng như một cách để giảm bớt thời gian tải ứng dụng từ david-cache. Hệ thống có chứa các file .odex thường khởi động nhanh hơn, tuy nhiên nếu ứng dụng có cập nhật thì khó cập nhật hơn. Trong hệ thống, các bạn có thể tìm thấy file .odex kèm với các file apk và giống tên: "system/app", "data/app", "system/prv-app"...
Action An action is a description of something that an Intent sender wants done. An action is a string value assigned to an Intent. Action strings can be defined by Android or by a third-party developer. For example, android.intent.action.VIEW for a Web URL, or com.example.rumbler.SHAKE_PHONE for a custom application to vibrate the phone.

adb Android Debug Bridge, a command-line debugging application included with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging. If you are developing in Eclipse using the ADT Plugin, adb is integrated into your development environment.


Activity An activity is a single screen in an application, with supporting Java code, derived from the Activity class. Most commonly, an activity is visibly represented by a full screen window that can receive and handle UI events and perform complex tasks, because of the Window it uses to render its window. Though an Activity is typically full screen, it can also be floating or transparent.

Application From a component perspective, an Android application consists of one or more activities, services, listeners, and intent receivers. From a source file perspective, an Android application consists of code, resources, assets, and a single manifest. During compilation, these files are packaged in a single file called an application package file (.apk).



Xem thêm…

Copyright ©2015 By IUHBLOGGER - TEMPLATE BY :duy3s.com/
Android App

Hãy là người đầu tiên like page, và nhận bài đăng mới từ chúng tôi!
×