Android : Layout - Ad Comes On The Top The Rest Of Which Should Be Webview
Jan 8, 2010
I want to add admob add in my application, I want to make application for every screensize, I am having a problem with is, I want to arrange a layout such that, ad comes on the top the rest of which should be webview. I can do it for normal screen sizes by hardcoding the screen size to desired px but it is not working on bigger screensizes, I want to add this in layout.xml.
View 2 Replies
Apr 16, 2009
My LinearLayout has a button and a WebView. The problem is that only the first one in layout can be clicked, the other is not. If I put WebView first into the layout, the button is not clickable. If put button in the layout first, then WebView is not clickable.Is there a setting to enable this?
View 7 Replies
View Related
Nov 5, 2009
I have a webview I'd like to display as a dialog. I'd like the webview to fill the entire screen, except for a button below it that I'd like to stay at the bottom of the dialog regardless of how much content is in the webview. Currently my webview fills up the dialog just enough to push the button off the screen. I'm sure this is something pretty easy but for the life of me, I haven't been able to find the magical combination of layouts, views and attribute values to get it to play nice. Just to be clear, I've gotten it so the button floats over the webview but I'd like the webview to stop just above the button and scroll, if that makes sense.
CODE:..............................
View 2 Replies
View Related
Sep 25, 2010
I've got the following layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Back" />
<Button android:id="@+id/page_number"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="1 / 100" />
<Button android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Next" />
</LinearLayout>
</LinearLayout>
Which results in the following. How do I make the buttons fit the screen and stop the WebView pushing them off?
View 1 Replies
View Related
Sep 30, 2010
can anybody give example of rest webservice in android
View 1 Replies
View Related
Dec 7, 2009
I develop facebook application in android. i want to log in to facebook via HTTPClient , teh user give me username and password and then i connect to facebook.com/login. i want to make like this code http://stackoverflow.com/questions/1409220/facebook-getting-incorrect-signature-104-when-getting-session-key/1795229#1795229. but in android, i tried to do that but when i get the session, a XML contain invalid parameter returned
View 2 Replies
View Related
Sep 8, 2010
I am looking for a screen capture utility that DOES NOT require a rooted phone.HOW IDIOTIC, suppose I want to screen capture as a user, to help a developer do documentation? This is absurd that there's no apps for the rest of us honest users.there's something if I connect it to my PC. C'mon, I don't have to connect my home PC to some other computer to take screen snapshots. I want an app that works on the phone itself, and does not require root access.
View 27 Replies
View Related
Jul 22, 2010
In my app, I have different activities with listviews. The datas come from a server with a REST method, and it's only done once, when I start the application.
The pattern that I'd like to set is to precharge all the listviews with the JSONs that I already have in local, and in parallel, launch a thread that get the new JSONs files with my REST methods, and then update the listviews.
For now, when I start the app, I parse my JSONs files, and build all the lists of objects. I access them later in a static way, from my lists adapters.
So I would like to know the best way to launch this REST thread, and update the listview. Should I use AsyncTask ? A service ? and then, when I update my local JSONs, I have to re-parse them, updates the lists of object, and call in my adapters NotifyDataChanged ?
View 2 Replies
View Related
Aug 31, 2010
I have a WCF REST service built with C# and it returns an image as part of a CPU intensive operation. The client is running on Android (Java) By default, it will return a text JSON object that looks something like this:{"d",[9,0,77,12,11,...]}Those are they bytes of the image. Fine. However, all the solutions for decoding this JSON are intolerably slow. I've tried Gson, Jackson, and the built-in Android JSONObject class. I have no idea why they are so slow.As an alternative solution, I have my REST service return a GUID, and then that GUID can be used by the Android client to go to a regular URL that serves up the image as a regular binary stream, via an MVC controller. This works well, and it fast, and is pretty easy to handle on the Android side. However, it does feel like a bit of kludge and kind of a violation of the REST design principles.
View 4 Replies
View Related
Jun 11, 2010
Retrieving data from the REST Server works well, but if I want to post an object it doesn't work:...
View 3 Replies
View Related
Aug 10, 2010
Is there any Opensource REST / RESTful Client / Library for Android ? Please share me the links.
View 7 Replies
View Related
Sep 24, 2010
I need to pull data from a REST web service in my android app. The web service requires authentication.
I need to first call a login method, which will return me an authToken and JSESSIONID as part of the response header. I need to pass these items back with every request. I'm currently using: org.apache.http.impl.client.DefaultHttpClient.DefaultHttpClient() to call the login method. I can see the authToken and JSESSIONID are being returned in the response header.
Are there any existing tools or classes that might provide some sort of management functionality that I can easily integrate with my android app?
View 1 Replies
View Related
Nov 10, 2010
Wondering what the differences between REST and JSON APIs are, how you interface with them, and how to go about parsing the results. My goal is to build a small application for my android phone to tell me when the next train will get to the subway station by my house, using the developer API provided by the transit agency.
I'm learning C++ in university, but hope to go about this in Java. I'm sorry if this is more of a discussion question rather than a black and white answer question, but I can't find any information elsewhere.
View 2 Replies
View Related
Jul 29, 2010
i want to call REST Web Service from application.
View 7 Replies
View Related
Jun 8, 2010
I've watched many of the Google IO talks and one that I'm trying to reproduce is "Developing Android REST client applications"[1]. In this talk Virgil suggests you should not execute your RESTful queries inside a Thread/AsyncTask spawned from your Activity (which I had been doing), instead you should use a more complex architecture that uses a combination of a ContentProvider and a Service. From what I understood the reason for this design was so your data was more persistent between app restarts, and so your queries don't disappear if your Activity starts/stops (e.g on a screen rotation). I buy into both those reasons hence I'm trying to implement this. On the slides[2] page 45 We have an Activity calling a ContentProvider. Now the ContentProvider checks its local database, if the content is not there it sends an Intent to a service which fetches the content, inserts it into the ContentProvider, then the ContentProvider calls back to the Activity (with a ContentObserver) and the Activity can carry on. The question I have is how is this callback setup. The ContentProvider exposes simple methods, query, insert, update, delete which don't seem easy to adapt to a callback interface. It could be implemented by a Cursor which is designed to block, but that could be problematic as you don't' want to block your UI Thread. I'd appreciate if anyone could make this clearer to me, or show me some code. I'm hoping the Twitter app will be open sourced soon which apparently uses this architecture.
View 16 Replies
View Related
Sep 1, 2010
I've read through the note of the topic "Developing Android REST Client Applications" from Google IO 2010, but I still have no idea on how to start. Can anyone show me a code example? Either the code for "Option A: Use a Service API" or "Option B: Use the ContentProvider API"
View 4 Replies
View Related
Apr 14, 2010
I am a student in the process a building an Android app that can post a GPS track into a Rails application. I would like to do things the "Rails" way and take advantage of the REST. My rails application basically has 3 models at this point: users, tracks, and points. A user has_many tracks and a track has_many points. A track also has a total distance. Points have a latitude and longitude. I have successfully been able to create an empty track with:
curl -i -X POST -H 'Content-Type: application/xml' -d '<track><distance>100</distance></track>' http://localhost:3000/users/1/tracks
That is pretty cool. I am really impressed that rails do this. Just to see what would happen I tried the following:
curl -i -X POST -H 'Content-Type: application/xml -d '<track><distance>100</distance><points><point><lat>3</lat><lng>2</lng></point></points></track>' http://localhost:3000/users/1/tracks
Fail! The server spits back:
Processing TracksController#create (for 127.0.0.1 at 2010-04-14 00:03:25) [POST]
Parameters: {"track"=>{"points"=>{"point"=>{"lng"=>"2", "lat"=>"3"}}, "distance"=>"100"}, "user_id"=>"1"} User Load (0.6ms) SELECT * FROM "users" WHERE ("users"."id" = 1) ActiveRecord::AssociationTypeMismatch (Point(#-620976268) expected, got Array(#-607740138)): app/controllers/tracks_controller.rb:47:in 'create'
It seems my tracks_controller doesn't like or understand what it's getting from the params object in my tracks_controller.rb:
def create @track = @user.tracks.build(params[:track])
My xml might be wrong, but at least Rails seems to be expecting a Point from it. Is there anyway I can fix TracksController.create so that it will be able to parse xml of a track with nested multiple points? Or is there another way I should be doing this entirely?
View 1 Replies
View Related
Mar 2, 2010
In short, I am writing an Android application that I want to have pull data from a remote database. I was looking into .NET web services, but this http://stackoverflow.com/questions/297586/how-to-call-web-service-with-android question pointed me away from that direction.
Is REST as simple as writing some short PHP to handle something like https://www.example.com/data.php?employee=michael and have it return relevant XML or JSON data? That to me seems like what has been described to me by various sites and videos. Also, is this the best way to do this kind of operation over the internet for mobile devices, desktop applications, etc?
View 2 Replies
View Related
Jul 22, 2009
How can I access the rest of the stuff in the drawable folder, such as the Android emoticons? I can use many of what is in the drawable folder by doing "drawable.XXX" but not all of them are available when I do that.
View 2 Replies
View Related
Sep 1, 2010
New to Andriod but seem to have figures most out, ...but.. I have added my hotmail account under the mail app standard on the sonyericsson x10, and the mail is comming through, but when I delete it on the web or laptop it does not delete it on phone neither does it update that I have read the email. It does sync but emails stay on phone. Any body have a fix or answer for me?
Also I have several folders in my hotmail account, the phone only displays Inbox, drafts, outbox, sent, trash. How do I get the rest of the folders on the phone?
View 1 Replies
View Related
Jul 22, 2010
Can somebody please show me resources that would let me make REST calls from my Android Phone to Amazon? I need to get Item details for that Item. I tried to look for documentation but I really couldn't find it. I am sorry if this has been answered before but I couldn't find the answer.
View 1 Replies
View Related
Oct 27, 2010
i am trying to send a json string from my android client to my .net Rest service...
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://myURL");
JSONObject json = new JSONObject();
json.put("name", "i am sample");
StringEntity str = new StringEntity(json.toString());
str.setContentType("application/json; charset=utf-8");
str.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json; charset=utf-8"));
post.setEntity(str);
HttpResponse response = client.execute(post);
Response is bad request. am i sending the json object as string? is this code correct?
View 2 Replies
View Related
Nov 18, 2010
I published the rest service.. but the android app is showing null pointer exception.. but if it access my local machine's service its working well.. the service hosted has anonymous access..
this is my android code...
View 1 Replies
View Related
Nov 10, 2010
I am working with custom microSD cards. I'd like to be able to maintain power to the microSD card while the handset sleeps.
View 3 Replies
View Related
Oct 12, 2010
I am designing a screen , in which I am showing a gallery along with other UI components . The selected item is shown in the center of the gallery . I want to make the size of selected item somewhat bigger than the rest items of gallery .
View 4 Replies
View Related
Oct 4, 2010
I have some back end web services, SOAP web services. I would like to create an android client to use these. I'm under the impression that SOAP style web services are non trivial to setup on android, and I would prefer to use REST if possible Is there any utility that can convert REST calls to SOAP and back again? Or will I need to create my own application that listens for REST calls, makes the appropriate SOAP calls, then sends the response back as REST?
View 1 Replies
View Related
Apr 23, 2010
I have a database where I store two different kinds of data. One table is for favorite routes, the other stores the retrieved routes from a server.
I can retrieve the routes etc just fine. But after retrieving the first Route, pressing back or HOME, and then retrieving another route, the routes table is filled with all the old routes plus the new ones.
So my question: how do I delete ONLY the routes table and not the whole database because I don't want to delete the added favorites?
I found the following function in the android docs:
public int delete (String table, String whereClause, String[] whereArgs) and I tried to implement it, but I must pass a SQLiteDataBase as an argument. But how?
I implemented: public void deleteTableRoutes(SQLiteDataBase db){ db.delete("routes", null, null);}
But I want to call this function from a different class where I have no reference to the database.. so what do I have to pass as an argument? Or how do I get a reference to my database?
I build my database upon the code example of the NotePadExample from the dev docs.How to solve this problem?
This is an extract of my class from where I want to call deleteTableRoutes(...)
private String start_from;
private String destination;
private int hour;
private int min;
private int day;
private int month;
private Source source;
private List<Element> tempList;
private List<Element> routes;
private String startT = "";
private String arrivalT = "";
private String duration = "";
private String line = "";
private boolean first=true;
private List<ResultElement> finalResult;
private List<Element> results;
private DbAdapter mDbHelper;
View 3 Replies
View Related
Jul 7, 2010
Be proud folks you picked a winner. Droid Incredible wins! Can't rest on our laurels though, we need to make sure the Pre Plus gets trounced in convincing fashion. Voting starts later this morning.
View 1 Replies
View Related
May 17, 2010
I have an edit text field. When the user clicks on it by default it shows small letters on the virtual keyboard.
I want by default to display first letter caps and rest of them small on the keyboard.
How can this be done?
View 1 Replies
View Related
Aug 16, 2010
If I do a factory rest will my internal battery calibration be reset? I'm asking because I have a seidio 3500mah battery and it won't fully charge in the phone. I'm wondering if starting fresh(factory reset) and a fully charged battery will re calibrate the charging settings to this battery. Will this work?
View 2 Replies
View Related