I have an android service that connects to remote server by TCP/IP and waits for notifications from it. Should I care about PowerManagement? Can sleep mode affect me some how?
If no, than what are the "use cases" to care about wake locks?
In my Android application, I want to rename the file name at runtime. How can I do it?
This is my code:
String[] command = {" mv", "sun moon.jpg"," sun_moon,jpg"};
try
{
Process process = Runtime.getRuntime().exec(command);
}
catch (IOException e)
{
Toast.makeText(this, ""+e, Toast.LENGTH_LONG).show();
}
I also used renameTo(File f) method but its also not working..
I'm trying to mimic the functionality in Google Maps on Android. When you press the directions option on the options menu, and it shows "My Location, End Point" on top of the map and dims the map. Is that running in a separate activity, or is that somehow a modal dialog on top of the map?
We are using Hudson to automate our Android build. I need to incorporate the build number into the version string used in our app. Was wondering if anyone had an example of doing that before I (re?)invent that wheel. Obviously I need to replace a string value in one of our config files.
I am trying to test my application with location information.
You know the Emulator Control has an ability to load from KML file. (Eclipse - DDMS - Emulator Control - Location Controls - KML - Load KML...)
I've prepared KML file using Google earth application with its "Add path". Then saved it by .kml extension and load it on the Eclipse. Eclipse didn't load this KML file.
How to prepare KML file for Android Emulator Control?
Hi
In an android app I am using a tabview for an app and one of the tabs shows a webview. But the page is blank until the web page loads. how would one show a progress bar until the page loads. It cannot be in the title bar because that is hidden by the tabhost
In Android, if I want to do some background work, what is the difference between
Creating a Service to do the work, and having the Activity start the Service
VS.
Creating a standard java class to do the work, and having the Activity create an object of the class and invoke methods, to do the work in separate threads
Thanks
Chris
Ok so I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things.
If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens.
Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation?
If it helps my manifest is:
<!-- receivers for AlarmManager -->
<receiver
android:exported="true"
android:label="Shift roster updating calendar."
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar"
>
</receiver>
<receiver
android:exported="true"
android:label="Shift roster checking alarm."
android:name="com.skooter.shiftroster.backend.service.SetWakeup"
>
</receiver>
and nothing esoteric is going on in the AlarmManager/BroadcastReceivers
Hello, we have a problem related to the manifest file and the property "android:minSdkVersion".
The issue is: If our platform is 2.0 and we use the property "android:minSdkVersion=3" (3 = sdk 1.5) the graphics get corrupted (In details, the application's resolution get reduced to a 2/3 part of the original size, this is, when the resolution should be 480x720, it becomes in a 320x480). This is happening on the Android emulator, and on the devices Droid/Milestone (Which are platforms 2.0). When we switch the property to "android:minSdkVersion=4" (4 = sdk 1.6) the problem gets solved, but when we want to put that version on platform 1.5, Android doesn't allow us to install it.
It would help us to know any conflict regarding graphics within the 2.0 sdk, or any known problem around the "android:minSdkVersion" in the manifest.
Thanks!
Here is how I setup my checked text view. How come no check box appeared?
I also added this but it had not effect:
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
> <CheckedTextView
> android:id="@+id/ctv_checktext"
> android:layout_width="fill_parent"
> android:paddingLeft="2px"
> android:paddingRight="2px"
> android:paddingTop="2px"
> android:layout_height="wrap_content"
> />
Hello, I am trying to retrieve the value from a Arraylist/ArrayAdapter that I have populated. I believe my issue is at the Onitemclick event. What I would like to accomplished is that when I click on Yasmin, I can return the value of 8. Please let me know if I am on the right track
import java.util.ArrayList;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
public class lister extends Activity {
/** Called when the activity is first created. */
TextView txHomeTeam;
protected ListView mFavlist;
protected ArrayList fakeFavs = new ArrayList();
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
this.setContentView(R.layout.main);
this.txHomeTeam = (TextView)this.findViewById(R.id.title);
fakeFavs.add(new Favorite("John", "1"));
fakeFavs.add(new Favorite("Yasmin", "8"));
fakeFavs.add(new Favorite("Jack", "10"));
//this.mFavlist = (ListView) this.findViewById(R.id.list_favorites);
this.mFavlist = (ListView) this.findViewById(R.id.list_favorites);
initListView();
mFavlist.setTextFilterEnabled(true);
mFavlist.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView arg0, View view,
int position, long id) {
// user clicked a list item,
//and read the value from <Favorite>.value
//txHomeTeam.setText=????
}
});
}
public void refreshFavListItems() {
mFavlist.setAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1, fakeFavs));
}
public void initListView() {
/* Loads the items to the ListView. */
refreshFavListItems();
}
protected class Favorite {
protected String Detail;
protected String value;
protected Favorite(String Detail, String value) {
this.Detail = Detail;
this.value = value;
}
public String toString() {
return Detail;
}
}
}
I am confused as to the difference between the two. In my application I have just used Extends Activity and the application is working perfectly, so what is the purpose of Extends Application?.
Would you use it on the first class you create in the Android application?
Thanks.
Is it possible to add a button to the right corner of the app title?
e.g., adding a "refresh" button to the title of "Feed: my feeds"?
http://www.android.com/market/apps/feedr-lg-01.jpg
Hey there,
I've heard about web scraping software that can take data from a webpage. i'm building an android app and I want to take information from this site www.menupages.ie
All I need is the names of the restaurants, and typing them in myself would be very tedious.
Can someone tell me how i'd go about doing this in eclipse, what methods i need etc.
I dont know anything about it.
Thanks alot.
I have integrated the Pushwoosh SDK in my Android Application and it is working fine.
I have done the Cross Platform Setting to run the Android Application on my Blackberry Z10 device, the application is running finely but I am not able to receive the Notification on my Blackberry Z10 device as Android.
I am getting this error:
06-06 14:34:21.314: I/QNXNavigatorClient(8708260): Already active: com.packagename.pushdemo
06-06 14:34:21.662: I/QNXNavigatorClient(8708260): PackagesOpenedRunnable: [com.packagename.pushdemo]
06-06 14:34:21.662: I/QNXNavigatorClient(8708260): Shell com.packagename.pushdemo cannot join group, group was already joined
06-06 14:34:21.668: I/ActivityManager(8708260): Displayed com.packagename.pushdemo/.MainActivity: +347ms
06-06 14:34:24.118: E/QNXShrimpClient(8708260): com.google.android.c2dm.intent.REGISTER error(10108) = ""
06-06 14:34:24.124: W/ContextImpl(8708260): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendOrderedBroadcast:1061 com.android.server.QNXShrimpClient.onRegisterComplete:162 com.qnx.service.pps.shrimp.ShrimpController.onMessageReceived:128 com.qnx.service.pps.PPSObject.processMessage:292
com.qnx.service.pps.PPSObject.access$500:11
I am not able to get the Push Notification on my Blackberry Z10 device.
Hi,
I want to send the following JSON text {"Email":"[email protected]","Password":"123456"} to a web service and read the response. I know to how to read JSON. The problem is that the above jason object must be sent in a variable name jason. How can i do this from android? Like creating a request object setting content headers etc.
I'm up and running in Eclipse, have worked through several tutorials and would like to start developing my first marketable app. Is there anyplace I can find a comprehensive list or catalog of what's available on the Android marketplace? I'd hate to waste a lot of development time building an app that has twelve free versions already available.
I want to store locations in my Android phone and be able for the application to tell me if I am inside these points&radius.
What is the best way to store many point&radius locations and efficiently query for them?
As per my question here...
http://www.jetbrains.net/devnet/message/5261667#5261667
Is it possible to use TeamCity with an Idea 9 project project that has 3 .iml modules where 2 are Java based and 1 in an Android module?
Title says it all. My app code is starting to get unmanageable and I want to start source control, primarily because I need to branch my code.
What are some good systems that you have used in the past and what would you recommend to me.
Requirements:
Must be free
Must integrate with eclipse
Must work well with android development plugin
Does anyone know, if vendors provide or if there is a site where one could download AVD profiles for existing android devices on the market so you can run your apps in the emulator and basically see how they will run on said devices?
I know it's pretty easy to create a new device but it'd be great if one could just download the config file for each device and run it.
Hey Everyone,
I was checking out the Google Maps Data API and I was wondering if I can follow their Java Development guide to use it on the Android platform? I want to display routes that I have created on Google Maps on the phone.
Thanks,
Rob
In my android app I have a Tabhost with a ListView as one of the tabs. By clicking on an item in the ListView (an address) I start an Intent to Google Maps for directions and the choice dialog pops up for google maps, web browser etc. Problem is if I press the hard back button then the launch dialog goes away but also the ListView is cleared. Any idea why?