Android :: PackageManager.getInstalledPackages() Returns Empty List
Aug 11, 2010
I am running into a very strange situation when using the PackageManager.getInstalledPackages() method. The first time I launch my activity I get a valid list of all the installed packages. But the second time I launch my activity I get an empty list... What could possibly be causing this?
I am using this code to get the list:
CODE:...........
I am building against the 1.6 SDK with compatibility for 1.5+
View 1 Replies
May 19, 2010
I'm using the android.location.Geocoder for the first time. The Idea is: I have a Listener on a button which takes input from an EditText and resolve the location. Up to now it's debugging phase, so I have no handler taking messages from the thread, only geocoding and write to logcat.
Q: Why this method always returns an empty list of Address objects?
CODE:...............
Somebody knows why? (btw I am using 1.6 sdk) Input tried
View 3 Replies
View Related
Mar 8, 2009
I have brought over an unlocked G1 phone from the US that I'd like to activate without a SIM card. I've added the necessary entries in the android rules file /etc/udev/rules.d/ (I'm using Ubuntu Hardy). Now the G1 is recognized by the OS as an external USB drive, but 'adb devices' returns an empty list. Is there an instruction page somewhere for this?
View 2 Replies
View Related
Sep 7, 2010
I have a list that gets refreshed every 2 seconds via the Handler postDelayed() method.Every 2 seconds an AsyncTask is run that makes an HTTP GET request, turns the JSON into a list of objects, then sets the ListAdapter.My problem is that every time the task completes (so, roughly every two seconds) my list jumps back to the top, even if I have scrolled down to the middle or bottom of the list. This would be very annoying to the end user, so I need the list to update in the background, as it's doing, but the current view of the list to not jump back to the top at the completion of the AsyncTask.I can include any more code needed. I'm somewhat new to android development, so I'm not sure what is helpful to others.
View 1 Replies
View Related
Sep 23, 2010
I have a class that is called when my app launches. public class MainActivity extends Activity implements NetworkEvent.
In this situation, list = (ListView) findViewById(R.id.list); works perfectly.
However if I then call a new intent via:
CODE:.........
where SimpleList is defined as: public class SimpleList extends ListActivity implements NetworkEvent then when I call
CODE:.........
From within the SimpleList class, list is null :(
How come? Both classes are within the same package.
View 2 Replies
View Related
Nov 2, 2013
I have an android phone Jelly Bean 4.1.2
I already installed the drivers of my phone to my computer, when i plugged the cable i enable USB DEBUGGING.
After that i checked device manager and my phone is listed under Android Phone
After that i go the console and type adb devices it starts the server and returns an empty list
I tried everything. I also try kill-server and start-server still the same.
View 1 Replies
View Related
Apr 22, 2010
I have a web service that returns a super simple list of objects. MyObject[] data = webServiceCall();
MyObject has 1 field i want to display, "Name" (i.e. data[0].Name )
How can i turn this into an activity that lists just the name of these objects in a scrollable listActivity in android. I am getting really confused with Cursors and am not sure if I need Cursors and I"m not sure what kind of adapter to implement (baseAdapter, SimpleAdapter etc)
So i guess i'm looking for three things, the activity , the adapter and the layout.xml. Just trying to figure this android stuff out.
View 3 Replies
View Related
Jul 8, 2010
I am a new to Android stuff. I am creating an application that contains a list view that will get dynamically populated. My requirement is when the list is empty, I would like to show a message. I don't want to create additional views just for displaying this message. Is there any nice way to do this? Any suggestions?
View 3 Replies
View Related
Feb 2, 2012
I have used the following tutorials:
[URL]....
[URL]...
But still when I type "./adb devices" or "sudo ./adb devices" all I get is "List of aevices attached" followed by a blank. Do you know a way to fix this?
I'm using a Samsung Galaxy Tab.
View 7 Replies
View Related
Aug 3, 2010
Got my phone today. Problem is I went to the verizon store, had them transfer contacts from my blackberry and when I go to contacts, it is empty other than the phone default numbers. If I go to "All contacts" the list is populated with my regular phone numbers +600 facebook friends i do not care about. How can I get it so I only have the numbers I want?
View 9 Replies
View Related
Dec 12, 2009
After the update I have noticed several changes, 90% have been welcomed & appreciated.Next thing I know I go to make a call from my contact list and there are zero contacts the really weird part is, if I am texting and filling out the to-whom line, it will automatically populate contacts as if my contact list never vanished it may have been coincidental that this took place the day of the update, but that's where u guys come in.let me know if u have had the same issue.
View 1 Replies
View Related
Sep 22, 2010
For some reason the empty view (TextView in this case) always appears, even when the List is not empty. I thought the ListView would automatically detect when to show the empty view.How can I hook up the empty view properly?
View 1 Replies
View Related
Oct 10, 2010
I'm writing an app, that has a somewhat modular system. It has a core app, and some apps, that consist of a single Service, that implements the desired interface. I followed the guide to create the IPC communication. But now I need to get all the services, installed on the system, that my core app can work with. How do I do this? I mean, is there any way to mark my Service apps with some kind of a tag, and then filter results, presented by the PackageManager#getInstalledPackages() based on that tag value? What's the common practice of doing so?
View 1 Replies
View Related
Nov 24, 2010
I don't know why I feel like it might be a conflict with apps organizer? I have the pay version, just got it, but my app list is empty. I can't back anything up or freeze anything.
View 9 Replies
View Related
Aug 11, 2010
i'm currently trying to specifically target ARMv7 custom hardware and I'm facing issues when trying to install the APK. When I try doing "adb install app.apk" Logcat informs me that: W/PackageManager( 1062): Native ABI mismatch from package file And does not install the APK. With searching I was able to trace down that the problem might have something to do with the architectures not matching on the APK and the platform. Is this it? How does the PackageManager find out the architecture from the APK file? I'm guessing it's not trying to execute the binary or anything, it just checks the files meta data? If so, is there a place in the APK where this information is located? Or am I completely hitting blank here and I should look somewhere else?
View 3 Replies
View Related
May 22, 2009
I want to use the SDK (PackageManager API) and dump all packages, their activities and the intent filters the activities use. So far navigating from the Context -> PackageManager -> ActivityInfo is easy. I am stuck trying to figure out how to retrieve the mappings from Activity -> Intent-Filter. Looks like from what i could tell from the SDK documentation, i can obtain the ResolveInfo (if i know the Intent). But how do i retrieve Activity to Intent-Filter mapping?
View 2 Replies
View Related
Aug 6, 2009
my application caches static resources in its /assets directory and implements a content provider to provide them to a WebView on request. i kinda have to drive around the houses a bit because it seems i can't get a linear file descriptor on an asset, i get "this resource is zipped" or somesuch, don't know why that's a problem. the content provider just caches the asset in /sdcard and then returns a file descriptor off that. this has been mostly working fine, but i've started seeing errors from the PackageManager. nothing's changed on my end, the assets are still there, etc. the actual error i'm getting is -ndroid.content.pm.PackageManager$NameNotFoundException: ComponentInfo{package/activity} (where "package" is the name of the package, etc) can i get anything wrong with this stuff? caching javascript and css stuff in the apk has been a big performance win.
View 6 Replies
View Related
Sep 7, 2010
What is Package Manager ? What is the purpose of using it ?What does the following methods describe:
(1) getPackageManager()
(2) getApplicationInfo()
(3) getPackageName()
Can any one give detailed description as I could not get complete inf. in Android developer guide.
And also one sample program that comprises all the methods.
View 2 Replies
View Related
Sep 7, 2010
I got a problem in one Android Application which I am working in which I am getting error when I use PackageManager.I am getting error getPackageManager() does not exists in this class file.How do I solve this issue? I will be eagerly waiting for valuable reply.
View 2 Replies
View Related
Jul 31, 2010
I have built in the Sample code from LVL and putted it into my main activity.I haven't understood why it always returns LICENSED also if I setted UNlicensed from my developer console.I have no idea on why it gives me always licensed.
View 14 Replies
View Related
Aug 19, 2009
Does anyone know if it's possible to show a "Currently have no items" type view in a ListActivity when, obviously, you have no items?
View 6 Replies
View Related
Aug 26, 2009
I am having a real hard time with the geocoder API of android sdk 1.5rc2. In my app I am trying to get the addresses corresponding to a location name by using the getFromLocationName method of the Geocoder class. But the problem is whenever I call this method it returns a null value. I have also pushed a geodb file containing some fake addresses at 'data/misc/location' directory in the phone.
The format of the data in the geodb file is as follows :
address 1 latitude "38.898763" longitude "-77.036655" line 0 "1600 Pennsylvania Ave NW" line 1 "Washington, DC 20006" locality "Washington" region "DC" postalCode "20006" countryCode "US" countryName "United States"
and following is the code snippet : Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address> addresses=geocoder.getFromLocationName("1600 Pennsylvania", 10);
View 2 Replies
View Related
Jul 20, 2010
I need to check web site availability and use requestRouteToHost for that purpose. On real device everything works fine, but on emulator requestRouteToHost always return "false".
What's wrong? Code is:............
View 3 Replies
View Related
Jul 12, 2010
I have super.xml and a subset.xml.
...............
I get a null pointer exception at price.setText(data.getStrTotalPrice()); Very strange, name.setText(data.getStrDescription()); does not give a null pointer exception.
View 3 Replies
View Related
Nov 15, 2009
Following other threads - I'm trying to get a unique device ID from the device. I tried this:
String ID = Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
but this returns null when running on my G1. Is it supposed to be returning a valid number, or am I accessing it wrong? I don't want to use the telephony device ID because that requires more permissions.
View 13 Replies
View Related
Jul 14, 2009
I am running this piece of code..............
View 10 Replies
View Related
Feb 26, 2009
I am trying to solve my problem about InputStreamReader returns null..I have a Login screen which checks the configuration file. and here is the configuration class import java.io.*;
import j2me.microtools.BufferedReader; import j2me.microtools.BufferedWriter; import j2me.microtools.FileReader; import j2me.microtools.FileWriter;.....................
View 2 Replies
View Related
Feb 1, 2009
why RingtoneManager.getRingtone(this, Settings.System.DEFAULT_RINGTONE_URI); always returns null when launching from my activity? Shouldn't it return some object which is System.DEFAULT_RINGTONE_URI, which I can then play()? Is there any small example of code which shows how to play Ringtone from Activity? MediaPlayer way also not works. MediaPlayer.create(this, Settings.System.DEFAULT_RINGTONE_URI)
simply crashes with:
02-01 11:19:51.008: ERROR/TAG(351): null 02-01 11:19:51.008: ERROR/TAG(351): java.lang.NullPointerException 02-01 11:19:51.008: ERROR/TAG(351): at android.content.ContextWrapper.getContentResolver(ContextWrapper.java: 89) 02-01 11:19:51.008: ERROR/TAG(351): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:589) 02-01 11:19:51.008: ERROR/TAG(351): at android.media.MediaPlayer.create(MediaPlayer.java:516) 02-01 11:19:51.008: ERROR/TAG(351): at android.media.MediaPlayer.create(MediaPlayer.java:497)
View 2 Replies
View Related
Feb 5, 2010
The GPS on my Android phone is on, supported by the fact that :
location_manager.isProviderEnabled(LocationManager.GPS_PROVIDER)
returns true. Yet, the following line: Location location = location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER); returns null.
View 1 Replies
View Related
Mar 19, 2010
I'm currently working on Mangler's Android implementation. I have a java class that looks like so:
public class VentriloEventData {
public short type;
public class _pcm {
public int length;
public short send_type;
public int rate;
public byte channels;
};
_pcm pcm;
}
The signature for my pcm object:......................
View 1 Replies
View Related