android

Ways to offer app as free, and still charge users to pay for the service/usage?

I want to make my app free on the Android Market, also the country I live it, is not allowed to upload paid apps yet, neither to download it. But also I want to charge the users somehow for using it, without Android Market as that opts out the usage. Probably it would be an annual fee. So I am wondering, if I have a website where use...

How to map Soft Keyboard button to button on screen in Android?

Is there any way out for mapping the Done button to the button on the screen in Android. What I want is that I have one login screen user enters username and presses the next button on the soft keyboard which brings the focus on password field. AFter entering password when the user presses done button then the action which is performed o...

How to write centered multi-colored text to a canvas

I am writing to a canvas from a thread. public void draw(Canvas canvas) { Paint p = new Paint(); p.setAntiAlias(true); p.setTextSize(30); p.setColor(Color.WHITE); p.setTextAlign(Paint.Align.CENTER); canvas.drawText("Centered", xCentre, yCentre, p); } My problem start when I have a multi colored SpannableStringBuilder whic...

Android Activity check service to start another activity

Hi. I need to made an activity (without layout) that on start check if a service is running. if it is true it starts Activity2, if it false it starts Activity1. I tried with this code: public class FirstActivity extends Activity{ private final Intent serviceIntent = new Intent(ServiceConnected.class .getName())...

ANDROID - DYNAMMICALLY ADDVIEW PROBLEM

Hi, I have some problem and I cannot solve that. In my code I add dynammically ImageButtons( I dynamically create TableRow and add in row), they shows up but I cannot click on them ( I try all, set clickable to true, enabled to true and nothing). If I use Button instead ImageButton all works fine except when I set background for buttons ...

Help with Android XML layout

I am trying to get my xml to lay this out properly. How it is now, the video is mooshed. If I take away the android:layout_below="@id/day_scroller" in the VideoView tag and add android:layout_centerHorizontal="true" the video size is now proportioned, but I lose my content that is display in my android:id="@+id/day_container" ...

Android: How to switch between hide and view password

Is there a clever way to let the user switch between hide and view password in an android EditText? A number of PC based apps let the user do this. ...

Sending files from android to the MS SQL Server 2008

Hello I want to send files (.csv) from android to the MS SQL Server 2008 . Shoud I use HTTPClient ? How can I do that? ...

How to create a license key as a downloadable, and check for it on Android

I'm sure this is fairly basic, but I don't know quite what to search on to get a concise tutorial. I want to create an app and make it downloadable on the Android Market for free. Then, I want to create one or more apps which are just license keys which open up certain functionality on the free app. What's the best way for the free ap...

Keep android service alive using bindService

Hi, I start service using bindService method. But when I click on back button on android emulator my service is destroyed. How can I keep service live in whole application (I must use bindService for communitacion with activities)? Thanks Update Here is error log 09-10 18:28:18.352: ERROR/ActivityThread(905): Activity com.flax.tra...

Querying Android db for specific piece of data

I'm creating a method that will see if a column in a database row is populated; and if so, it returns the varchar in that row, else it calls a web service to return that data. My question is: What is the standard way of simply selecting a column with Android? (select mycolumn from mytable where _id = x;) I've created a ContentProvider...

Android how to create tiling wallpaper image?

I have an image of a pattern and I want to create a larger image from this by tilling it so that the user can apply it as a wallpaper. How would I go about doing this? The pattern tile can be of varying dimensions. I also want to be doing this with a color palette so I have 5 different colours and I want to make a wallpaper that consis...

Creating an Android Service that cannot be killed

I am trying to write an app that cannot be killed by a user or another application. I understand this goes against what Android has designed for its platform, this is more of a proof of concept. The plan is two have two apps, app1 and app2. When app1 starts it will start app2 and then bind onto app2, when app2 starts it will make sure...

Android Animations do not affect layout

Animations affect only the drawing of widgets, which means after the animation is done, my FrameLayout screenMain is still at its previous location, y need set the FrameLayout in the next location. screenMain.setOnClickListener(new View.OnClickListener() { int i = 0; @Override public void onClick(View view) { ...

Is this thread safe?

I am writing an application for Android and am using worker threads to process certain information. Having read through my code I am now unsure if it is thread safe. I have written a simplified version of my code, I have omitted the Handler object used to communicate with the main thread and obviously the process itself. public class m...

AsyncTask to run on Activity start fails after previously getting cancelled

I am using an AsyncTask to fetch the ring tone for a contact when my application starts, it works fine until after my Activity closes a couple of times during the AsyncTask, after this happens the AsyncTask will only ever get to onPreExecute() and never doInBackground, so I can never fetch the ringtone then until either a force stop or d...

Android: Use default highlight colors in a custom button

Hi, I want to use a Button in my android app but I want to customize how it looks. However, I want the highlight and selected colors of the button to be the same as the default colors (i.e. the dark and light orange gradients, or whatever the theme color supplies). Is there anyway to get the default highlight/selected drawables and to ...

Is there any common language to develop a same application for iphone, blackberry, windows mobile and android?

Possible Duplicate: Technology to write iPhone, BlackBerry and Android phone at the same time? Is there any common language to develop a same application for iphone, blackberry, windows mobile and android? ...

How to port Android application to iOS platform?

I'm developing an Android application and I would really like to deploy it for the iPhone as well. However, I do not know Objective-C and I think it would take an annoyingly long time to figure that and the Apple framework out. Is there a recommended way to port an Android application to iOS? Would the best bet be to hire a freelancer?...

How do you check for someone touching the screen and dragging in a specific direction?

I want to check for someone placing their finger on the center of the screen and dragging to the right, how could this be accomplished? SOLUTION: http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/ ...