If you have multiple Broadcast receivers how do you identify for which application is it coming?
Own a mobile phone with best offers:
How do you check memory leaks?
go to ddms, get the heap profiling dump.
generally .hprof files will be in /data/misc folder.
save the heap dump profile to desktop.
Now use eclipse memory analyzer to analyze the memory of your app.
source: http://developer.android.com/tools/debugging/ddms.html
source: http://kohlerm.blogspot.in/2009/04/analyzing-memory-usage-off-your-android.html
How do you upload app into playstore?
If you want to upload an app into google play store, then follow below steps.
1. Create a private key to sign your application.
Note: to create private key, use keytool command.
2. sign your application with private key.
Go to file->export-> and select your private keystore to sign.
3. Go to https://play.google.com/apps/publish/signup/
4. If you are uploading your first app, then you have to pay one time reg
fee of $25.
5. Go to developer console
6. Click on add new application +
7. Add apk and title , and follow with rest of the process.
What is debugging mode?
You can build your application in 2 modes.
1. Debug Mode : Generally we use debug mode when we develop and test our application.
2. Release Mode : We use release mode, when we are about to release our application into play store.
Can we create .apk file without eclipse?If yes how?
1. use javac to compile your java files
2. use dx tool to convert all .class files to single dex file
3. use aapt tool or apkbuilder tool to generate .apk file, which contains manifest, .dex, and res.
.apk is equivalent to .jar in java.
aapt tool and dx tools are in android-sdk/platform-tools.
4. sign the apk file by using jarsigner tool of jdk/bin
5. zipalign your signed apk by using zipalign tool of android-sdk/tools
Can we show multiple activity at a time? If no why? Also asked what is activity?
In android activities are piled up on each other in a stack based architecture. System will display the activity which is on top of the activity stack, hence it is no possible to show 2 activities at a time.
But there is an option called ActivityGroup, which can contain and run multiple embedded activities in a screen. One such kind of ActivityGroup is TabActivity.
Note: TabActivity and ActivityGroup are deprecated, better to use Fragments to club multiple screens in a screen.
Fragment is the new technique added in 3.0 onwards, which are basically used to club different screens(panes) in a single wider screen sizes like Tablets.
Note: Don't use TabHost and TabActivity, as they are deprecated.
In place of them use ActionBar and fragments. ActionBar is something like TabHost in old versions. ActionBar also contains tabs, on clicking which it will display different fragments.
What is android? Where we can use android OS other than mobiles, tabs etc?
Android is O.S and framework to develope applicatins for mobiles and tablets.
Android is based on Linux O.S.
Android can be used in tvs, automobiles, and wears like watches, glasses etc.
Android is also used in kitchen utensils which is also called Google's smart kitchen.
Android can also be used in robots, washing machines, etc.
How to support text views for multiple screens?Suppose one mobile 3 inch another 7 inch?
When we are using a textview there is a possibility that our app may be downloaded into various screen size devices.
Based on the screen sizes we have to make sure our textview should grow and shrink, similarly the text size also should look compatible with the screen size. Below is the solution for this problem.
various screen sizes have various folders for dimensions.
eg:
res/values/dimens.xml will contain screen properties for normal screens.
res/values-sw600dp/dimens.xml will contain screen properties for screen width category 600 dp.
So try to declare different text sizes for different screen widths.
This will work perfectly with all screen sizes.
Note: Using sp or dp will not fix your issue.
Note: If you are not specifiying sp or dp, then giving wrap content or match_parent would be the best suggestion to solve the problem
Own a mobile phone with best offers:
It would be more helpful if you add one example for each Adapterview
ReplyDelete