android-sdk-2.3

How to display a moving track on Android device

我们两清 提交于 2019-12-03 00:35:13
I want to plot my track using GPS on an Android device. I have no problem displaying a completed route but am finding it difficult to show the track as I'm moving. So far, I've found 2 different ways to do that but neither are particularly satisfactory. METHOD 1 PolylineOptions track = new PolylineOptions(); Polyline poly; while (moving) { Latlng coord = new LatLng(lat,lng); // from LocationListener track.add(coord); if (poly != null) { poly.remove(); } poly = map.addPolyline(track); } ie build up the polyline removing it before adding the new coordinates and then adding it back. This is

Android Bluetooth accept() / connect() with already paired devices

南笙酒味 提交于 2019-12-03 00:33:31
I am having trouble connecting two Android devices via Bluetooth, which happens only when they have been paired before. I am running one as the server and the other as the client. Here is the sequence of things on the server side: Check various Bluetooth statuses (adapter available, is enabled, etc). call listenUsingRfcommWithServiceRecord() with a pre-defined UUID that I chose. request to make device discoverable since being discoverable happens asynchronously, I call accept() and wait for an incoming connection. On the client side: Check various Bluetooth statuses (adapter available, is

How to build my own Android SDK

寵の児 提交于 2019-12-02 21:10:37
I work on my own android device which has many new APIs (but @hide decorated). My goal is to provide an android sdk to develop on it and use these new APIs. So my questions is : How to build my own android sdk with these new APIs ? If the @hide decorated is a problem, i can remove them (I don't have to respect the CDD ) You can use this command make -j8 PRODUCT-sdk-sdk showcommands dist here, you can a discussion about it : https://groups.google.com/forum/?fromgroups=#!topic/android-building/Y0xduZPWtUs I think the concept of SDK is being misunderstood here. If you want to release a set of

An error occurred while collecting items to be installed

筅森魡賤 提交于 2019-12-02 20:46:30
When I tried to update my Android SDK, I got the following errors. What should I do? An error occurred while collecting items to be installed session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). No repository found containing: osgi.bundle,com.android.ide.eclipse.adt,22.0.5.v201307292155--757759 No repository found containing: osgi.bundle,com.android.ide.eclipse.adt.package,22.0.5.v201307292155--757759 No repository found containing: osgi.bundle,com.android.ide.eclipse.base,22.0.5.v201307292155--757759 No repository found

Android SDK - Install system image packages offline

蹲街弑〆低调 提交于 2019-12-02 18:25:36
due to IT restrictions I cannot use to package-install-automation of the Android SDK. To be able to create an emulator in Androids' AVD manager, I first of all need a system image for my target device. But regarding the below screenshot I haven't installed any. So can anyone tell me: 1. where to get an system image for Android 6.0 API Level 23 2. how to install this system image manually/offline Thank you in advance! Firstly select the system image to be downloaded in android studio sdk, then it will start downloading the image and will say Downloading from <url> . Copy that URL and download

“Unable to get system library for project” after I upgraded to Android SDK 2.3 and ADT 8.0

萝らか妹 提交于 2019-12-02 17:23:11
Today I upgraded to Android SDK 2.3 and I also upgraded the Eclipse Plugin Androi Developer Tools 8.0 (from 0.9.9). I also upgraded my Java Development Kit to 1.6_22. Now in Eclipse I get many errors in all my Android projects. The error messages are like: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files. How can I fix this so I can use my Android projects again? In the Build Path for these projects, I don't have any references to an android.jar but a message: Unable to get system library for project That is rather difficult to answer, given

Android Development Tool 23.0.0 and Android L Update error in eclipse [duplicate]

百般思念 提交于 2019-12-02 16:39:35
This question already has an answer here: Update Eclipse with Android development tools v. 23 43 answers I updated my SDK with latest release of Android L and restarted my eclipse i.e running on ADT V.22 . But when I Check for update from Hep -> Check for updates , it says No updates were found . I manually tried to download ADT bundle from official website and tried to install ADT-23.0.0.zip from Help -> Install New Software and described installation guide over site, but it gave me error Cannot complete the install because of a conflicting dependency. Software being installed: Android

Update UI Asynchronously in Android

女生的网名这么多〃 提交于 2019-12-02 07:48:06
I have a webservice call which is called every 10 seconds and should update a TextView with the webservice reply(or atleast show a toast message every 10 seconds) But the UI is not getting updated at all. Please find the code below. public class MessagesRequestActivity extends Activity { /** Called when the activity is first created. */ String currentMsg="Default"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //Calling the webservice getMessage(); } public void getMessage(){ try { SoapObject request = new

Update UI Asynchronously in Android

大兔子大兔子 提交于 2019-12-02 07:22:08
问题 I have a webservice call which is called every 10 seconds and should update a TextView with the webservice reply(or atleast show a toast message every 10 seconds) But the UI is not getting updated at all. Please find the code below. public class MessagesRequestActivity extends Activity { /** Called when the activity is first created. */ String currentMsg="Default"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /

Android SDK Tools Rev.17 - onClick - Corresponding method handler not found

孤人 提交于 2019-12-02 06:34:25
I updated Android SDK Tools to revision 17 and after I opened Eclipse I found a list of new errors in the 'Problems' view which weren't there before the update. These errors were in XML Layout files where I had defined the onClick attribute for buttons. On mouse-over the error message example: "Corresponding method handler 'public void @string/timespanDefinition_btnSave_Click(android.view.View)' not found" returned. I have already defined the corresponding method handler and the string representation for this event name. What is the cause and solution of this problem? Some code: XML Layout