android

Given an Android music playlist name, how can one find the songs in the playlist?

The playlist names can be found by a query on MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI and then look at the MediaStore.Audio.PlaylistsColumns.NAME column. There is a data column too, MediaStore.Audio.PlaylistsColumns._DATA, but it is returning null. The list of songs (MediaStore.Audio.Media.EXTERNAL_CONTENT_URI/id) do not seem to...

Effect of frequent sdcard writes

In my chat app, I am adding the ability to log chats. The logs are saved on the sdcard and one BufferedWriter is kept open for every person/channel chat is done with. I'm wondering what effects this might have have on the sdcard and its life. My BufferedWriter's buffer size is to 1024, I'm also wondering if that is too small or too big....

Passing data from New activity to old activity ?

Hi guys. I am trying to receive data from new Activity to old Activity. In other words, newer Activity must send intend data to old activity when it finishes. I've use setResult(resultcode, NewActivity.this.getIntend); on newer activity and @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { ...

Make my radio buttons become selected in Android

When I run this could and click on the dialog box my radiobuttons do not become selected like intended package edu.elon.cs.mobile; public class PTCalculator extends Activity{ private RadioButton maleRadioButton; private RadioButton femaleRadioButton; private EditText ageEdit; private EditText pushUpsEdit; pr...

Android Restart a Service

I have the following question: I start my activity and i call bindService in order to start a service which in background downloads data from an API. When it finish, it calls stopSelf(). But if i want to call again bindService in my Activity in order to download other data, nothing happens. Any idea? ...

Android USB Functions?

Are there any USB functions for Android devices (all user devices, not rooted)? I'm curious because I might want to make an app that puts things through USB ...

Adding a second table in a database

Hi everyone. This is my first post! I hope you can help me out! :-) I used the code provided by the NotePadExample from the developers doc to create a database. Now I want to add a second table to store different data. I can add notes without a problem, and the notes table is created in a similar way as my routes table is. I simply "co...

What does it mean to "preconcat" a matrix in Android?

In reviewing: http://developer.android.com/reference/android/graphics/Canvas.html I'm wondering translate(): "preconcat the current matrix with the specified translation" -- what does this mean? I can't find a good definition of "preconcat" anywhere on the internet! The only place I can find it is in the Android Source - I'm starting ...

Is it possible to prevent an app from being uninstalled?

I want to write an app that a parent can use to disable phone functionality to prevent their child from using it. One way the child could circumvent this is by uninstalling the app. Is there a way to prevent application uninstall on the Android? ...

Does Android's Intent use Googles cloud at all?

Sorry I'm new to Android handsets. When you do a startActivity(intent) does it involve hitting Googles cloud services at all to resolve the [handler] or is this purely a local call? ...

Declaring a custom android UI element using XML

How do I declare an Android UI element using XML? ...

How to get a list of installed android applications and pick one to run

I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run. I've tried: Intent intent = new Intent(ACTION_MAIN); intent.addCategory(CATEGORY_LAUNCHER); and this only shows application that are preinstalled or can run the ACTION_MAIN I...

passing table id

Hi In Android, I make a list view that describe the name fields from a table in SQLite. Clicking long-term on any List Item, context menu appears and then I wanna get the ID of that item (I mean in the table, there are ID and name fields) and pass this ID to next layout. Why I wanna pass this ID is to update this record in SQLite table....

How do you fix issues with the debugger for the Android plug-in for Eclipse not attaching?

I have been trying to program something for the Android mobile phone, using Eclipse and the Android plug-in for that IDE, and my debugger used to attach just fine. But then it has suddenly started having consistent issues attaching. I just get that message about how the process is waiting for the debugger attach, and then it just won't...

Accelerometer Values from Android/iPhone device

I'm trying to map my movements with a android device into an OpenGL scene. I've recorded accelerometer values for a simples movement: Moving the phone (lies flat on a table) 10cm forward (+x), and then 10cm backward (-x). The problem is that this values when used to calculate velocity and position, makes only the opengl cube go forward...

I wanna run an android emulator with disk images

hi i'd like to run an android emulator with disk image. so I tried this ./emulator -kernel kernel-qemu -system system.img -ramdisk ramdisk.img -initdata userdata.img -partition-size 512 then error massage is : if you really want to NOT run an AVD, consider using '-data ' to specify a data partition image file (I hope you know what yo...

RelativeLayout - positioning a View under a ViewGroup

I have the following structure defined in an xml layout file. <RelativeLayout android:id="@+id/mainLayout" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <FrameLayout android:id="@+id/frame" android:layout_centerInParent="true" android:layout_width="wr...

Pagination For SMS in Android specifically

Hi. I had a pagination related question posted earlier. Here I went through the posted answers and suggested choices and I realized that to implement pagination in an application I could still write db level queries and ensure that I could implement pagination, even if in a crude form. However I have few follow up questions now: I am ...

Android InflateException on refactor of class

I have a simple application with a view and a class that should return a ListView. The application works unless I refactor, and I am refactoring not just renaming, the name of the class. Everything seems to get changed properly but the application throws an exception of : android.view.InflateException: Binary XML file line #2: Error infl...

How to connect android to server

How to connect android to server(PC) and pass values to it ...