I've created an Android application which has a certain package name that I've been using personally for months now. I'm about to release it on the market, and I have to change the package name. This cannot be avoided.
My issue is that the application has an SQLite database attached to it that I want to keep, but I know if I change the ...
How does one access a particular widget from within a custom layout while using Alert Builder? As you can see below, I'm setting the alert to a widget that is created in the code, but I'd MUCH rather use predefined layout.
Current code:
private AlertDialog numberDialog(String title, final int dialogID){
AlertDialog.Buil...
Hello guys,
I am interested in Android kernel level programming. Actually I am a Linux kernel programmer. I would like to know how to start with the kernel and how compile, boot and about the Kernel level subsystems (EX: How file systems are implemented etc..) in Android. Any books or articles or a good guide to start are very much ap...
I am trying to add a divider between entries in a vertical LinearLayout, to emulate the appearance of a ListView. (I can't just use a ListView in this particular situation.)
This is what I have in list_divider.xml:
<?xml version="1.0" encoding="utf-8"?>
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:backgr...
I keep getting emails from people and companies wanting to release my android app on various alternative markets, and often they want me to send them (or upload on their website) my apk.
My questions are: What are the risks involved with this, how much can someone reverse engineer my app from the apk? How many other developers release...
I'm fairy new to unit testing and I've been learning how to use the jUnit framework for android(using ActivityInstrumentationTestCase2) but I'm having trouble working out how to I inject a mock data source into and activity, example:
in the activiy I have this
public void onCreate(Bundle savedInstanceState) {
super.onCreate(sav...
whats the best way to create a screen with comments surrounded by globe image, i have to create this
http://bit.ly/a4Fuuq
...
I have an app that has a portrait layout. When I rotate my phone into landscape, it loads another layout that is strictly landscape (it is displaying an ImageView). How can I make the transition from portrait to landscape animate smoothly?
...
I have a button whose dimensions I do not touch (and which displays correctly on screen). However, when I request its dimensions they come in at 0x0. So, I'm assuming that at the time I'm asking, they button hasn't been considered.
My code is as follows:
public void onCreate(Bundle savedInstanceState) {
DisplayMetrics metrics = n...
I have a string in an Android app that I am trying to convert into a JSON object. The string looks like this (except longer and with actual values instead of the dummy values I entered here):
[[{"1":"a"}],[{"1a":"1a","1b":"1b"},{"2a":"2a","2b":"2b"}]]
I have entered this exact string into two online JSON validators, and both of them c...
Hi,
I've only just started to write in Java on Android, so please bear with me.
I have some settings I want to hold in my app, normally I would have used an xml file. Trouble is i'm not sure how to load it into the xml parser to read it.
I thought I might be able to drop it into /res/values/Info.xml and open it from there but it does...
I just had the odd case that my Android project for some reason would not properly rebuild in Eclipse (v3.5/Galileo). Occasionally that happends and so I did the usual Project => Clean... as I always do in such cases. But this time I now have the odd effect that almost all files show bugs, and looking closer it's that the compiler can't ...
I'm was trying with GridView tutorial with 14 of my own JPEGs.
The first time I ran it worked but had an issue when I clicked on an image.
I figured it might be because I left and extra comma at the end of my mThumbIds list.
But when I tried to run again I get:
[2010-09-07 15:59:36 - HelloGridView] Installing HelloGridView.apk...
[2010-...
I just want to set some flags when my orientation is in landscape so that when the activity is recreated in onCreate() i can toggle between what to load in portrait vs. landscape. I already have a layout-land xml that is handling my layout.
public void onConfigurationChanged(Configuration _newConfig) {
if (_newConfig.orientatio...
I've been working on an app that uses both GET and POST requests to Web Services. The GET requests are no problems but the POST requests are killing me. I've tried 2 different scenarios in the code. The first looks like this...
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(ws);
JSONObject js...
Hi everybody,
I started learning android development. I'm following a todolist example from a book.
Here is a piece of code:
// Create the array list of to do items
final ArrayList<String> todoItems = new ArrayList<String>();
// Create the array adapter to bind the array to the listView
final ArrayAdapter<String> aa;
aa = new ArrayAda...
Is there a reliable way to prevent truncating of sounds in soundpool? I have had some success with the sleep() function between sounds, but they still sometimes miss the last bit of sound before starting another sound. My app plays short sounds in sequence.
Jerry
...
Hi
I want to draw bitmap on draw method in MyPositionOverlay extends Overlay class but I get this error: The method getResource() is undefined for the type MyPositionOverlay
Where I'm wrong?
Here is code form draw method:
Bitmap bmp = BitmapFactory.decodeResource(getResource(), R.drawable.icon);
canvas.drawBitmap(bmp, screen...
I have an Android (2.2) project in Eclipse (Helios). I want to add an MP3 file to the project so that the MP3 file is deployed to the device along with the application.
I then would like to open the file as a File object, which means I'd need to know the full path (?) to the file on the device, but I don't know how paths are specified ...
Is there a way I can save the current snapshot of my app before it gets destroyed (when it gets rotated):
I know I can save all my data in
public Object onRetainNonConfigurationInstance() {}
But is there something simpler because I have a lot of data that would need to get saved.
...