android

Creating shortcut on android

Hi I need to create desktop shortcut for content managed by my app. I've found the way to do it using ACTION_CREATE_SHORTCUT But I need the way to implement it without using "Create shortcut" menu. It would be great if user could select "create shourtcut" from item's context menu inside my activity and it will be automatically placed on ...

ActivityNotFoundException for an activity declared in my AndroidManifest.xml

I have a launched android application that works fine most of the time. However 1 in about 1000+ runs I get an android.content.ActivityNotFoundException: Unable to find explicit activity class exception. The activity is declared in my manifest and I've never seen it crash myself. It is declared like this... <activity android:name="com...

Android path to array - read the points on a path?

Hi, Is there a way to read the points created when drawing a path? It seems silly to me that a path cannot be readable. Or is it just better to manually write the current finger position to an array? thanks ...

Question about parcelable object

Hi, I want to save a list of Parcelable Restaurant objects on onSaveInstanceState. I created a Restaurant class extending Parcelable and a RestaurantList object, both shown below. In my main activity I fill my RestauranList directly from json internet data using GSON: restaurantList = gson.fromJson(r, RestaurantList.class); Now, when...

Set PreferenceScreen type as "Select Contact"

I have a PreferenceActivity with a few EditText and CheckBox Preferences. I would like to add a preference of Contact so that when the button was pressed it would allow the selction of a Contact's number Is that possible using the PreferenceActivity functionality? TIA Pat Long ...

Is there a way to override the lock pattern screen?

I want to provide my own version of password mechanism. Is this possible? ...

About layout change in SQLite

When I click the ListView in layout1, it will go to layout2 and show some imformation. But when I click the button I designed to back to layout1, I can't see the ListView. Just black background. Here is the Button code: Button backButton = (Button) findViewById(R.id.widget39); backButton.setOnClickListener(new Button.OnClickListener() ...

Unable to ping host from app but can otherwise

Here's my code: InetAddress address = InetAddress.getByName("www.whyoceans.com"); if (!address.isReachable(3000)) { Toast.makeText(this, "Unable to ping host", Toast.LENGTH_SHORT).show(); } The isReachable always fails, yet I can open a shell and ping it just fine (from both my PC and my phone): ping www.whyoceans.com PIN...

Internet on android, causing twitter4j exception?

Hi guys, I'm experimenting with twitter4j on android (new to both) coded up a simple process in java just to test it out. It downloads a users timeline and prints to screen. I modify the code for android, but I get a TwitterException when i try to download the user timeline. I checked out the debugger and the exception is null; no info...

How to open PDF/xml which stored in a SQLite file ?

How can I open them which have already stored in SQLite ?? ...

How to get subtext in ListView in Android

Which property sets the subtext as highlighted here in a ListView. ...

Facebook Share can I add Alt text for flash videos?

You know with Facebook, how you can share video on your sites and Facebook embeds the videos via flash. Well on computers and laptop the embeded video will play on Facebook since they have Flash installed. But for iPhone and Android users will just be redirected to the site, I want to stop this and add an alt text stated something like ...

OverlayItem not displaying markers!

Hello, I have the following code and the markers are not appearing on the map at all! private class SitesOverlay extends ItemizedOverlay<pfOverlayItem> { private List<pfOverlayItem> items=new ArrayList<pfOverlayItem>(); //private PopupPanel panel=new PopupPanel(R.layout.popup); public SitesOverlay() { super(null)...

On the fly bitmap editing in Android

I'm creating a scene for a game. There's a background which is a bitmap and player objects. I want to have the player objects to be able to "eat" away at the background with a transparent color as they move around the board. Basically if an object is at a certain point a circle around that object is alpha'ed out of the bitmap. The edits...

android 2.2 open swf in browser

I have a swf file on the sdcard and I wrote a html file flash.html with the swf file embeded. The only way to open it now is 1) open the browser 2) type in file:///sdcard/flash.html The swf runs fine. But if use the code list below: Uri uri = Uri.parse("file:///sdcard/flash.html"); Intent intent = new Intent(Intent.ACTION_...

Android: lazy loading in Gallery

Hi, I've reviewed some posts about lazy loading but I believe my problem is a bit different. I have a gallery (my class extends Gallery) which displays 20 rather large in size images (400-500K each). I cannot load them all to gallery since I get an OutOfMemory exception. So, I created an array of 20 Drawables and initially populated ...

Custom Listview Adapter, adding a static footer, and understanding R.id.list

There is something I'm just not getting, and I'm looking for assistance in understanding what is happening here. I have a custom list adapter (that just extends BaseAdapter) that I have successfully been using to generate and display a list. Now I want to add a static footer to the bottom of my list. After looking at a number of resourc...

How can i check from android webview if a page is a "404 page not found"

SO i wan to check a "404 page not found" from a webview and if it's a 404 then i revert to the previus page. Ty for your help EDIT also the webpages i want to see are pure .jpg 1.jpg 2.jpg 3.jpg but i have no info of how many images exist.So if anyone can propose another method,he is welcome to do so ...

If switching to adobe air will be a good move ?

I am web developer from a year.I have Used PHP,python with client side Js libraries like Jquery,motools, etc. So if switching to Adobe air will be a good thing ? If It is strong enough to make decent desktop apps (Eg: music/videos player)? If apps can be made for Android or iphone OS ? Can i use Jquery like libraries (i am very used ...

How to achieve smooth (hw accelerated) transitions in the Android browser?

Hi, the title is self-explaining. On iPhone, Mobile Safari is WebKit based and supports hardware-accelerated -webkit-transform CSS properties. To be specific, I use the translate3d() transform. What alternative is there for the Android browser? I need it to work on Android 1.5. Thanks in advance. ...