Android :: Communication Between TabActivity And The Embedded Activity
Jun 28, 2010
I am trying to figure out the best practice of communication between a TabActivity and the child activity embedded in this TabActivity.
In my TabActivity, there is a button. When the button is clicked, I want the child activity embedded in this TabActivity to be updated. I wrote the code like below, and just wonder whether it is a good practice.
CODE:..................
View 3 Replies
Jan 30, 2010
In my current project I have a full screen TabActivity. Each tab content is handled by two instances of same ListActivity. Now, I put an extra int in intent to know which data should be displayed.So in onCreate method of my ListActivity, I check the int in extra and I build my query to obtain a SQLLiteCursor.I would like to dynamycally give to this two instances of ListActivity the list of item that should be displayed.I do not know what is the best way to do this. Any idea ?
View 1 Replies
View Related
Mar 13, 2010
I have a TabActivity, each tab holds an activity. At some point I'd like to 'refresh' the tabs. I'd basically like to restart each activity in the tabs. I'm not sure how to do this. Calling:
CODE:.........
Removes the tabs, but the activities still seem to be in alive, in limbo. How can I get them to really quit?
View 2 Replies
View Related
May 27, 2009
I have an ActivityGroup with an embedded TabActivity and another simple Activity.
The TabActivity has three tabs, each one with a ListActivity.
When I try to start a search from a list (calling onSearchRequested()), I get a WindowManager$BadTokenException.
I've tried requesting focus in the list, but the same error occurred.
View 4 Replies
View Related
Dec 29, 2009
I am developing an application and as part of it I would like to show a tabactivity and use the contact activity to let the user see,modify,or call a specified contact.
My code is this:
CODE:..........
View 3 Replies
View Related
Jul 30, 2010
My TabActivity contains two tabs which calls two two different activities . I want to setResult() for the TabActivity when either one of the child finishes.
Is there any method to find out when my activity inside tab finishes?
View 4 Replies
View Related
Mar 12, 2010
I have a TabActivity. Each tab points to a sub activity. Works great.
Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than building in refresh support to the activity itself, or clearing ALL the tabs and recreating all of them.
View 1 Replies
View Related
Jul 21, 2010
I want to add tabs to the layout of my activity, but I don't want the activity to extend TabActivity. The example in http://developer.android.com/resources/tutorials/views/hello-tabwidget.html only gave example of subclass of TabActivity.
Is there any way I can make it without extending TabActivity?
View 1 Replies
View Related
Oct 1, 2010
I would like to access the public method of an Activity run by a TabActivity using: Code...
Basically, what I what is to let the parent Activity call a method in child Activity in order to do something. Is this possible?
I did try this:((TeamHuddleScreenMsgsView)getTabHost().getCurrentTabView().getContext()).refreshModel(); but I'm encountering a ClassCastException. It seems that the getContext() still gives the TabActivity. Any help on how to get the child Activity?
View 2 Replies
View Related
Apr 23, 2010
I have attached a menu to my TabActivity, and when a menu item is selected, I would like to do something different based on which view is being currently displayed in the TabHost.
int getCurrentTab() returns me the id of the current tab... but from that int how can I get the instance of the activity running?
I also tried getCurrentView(), getCurrentTabView(), but these return things I can't seem to cast to the class of the current activity.
View 3 Replies
View Related
Apr 15, 2009
I have custom view and once some action occur in it (say touch/key event) I'd like to call some code in my activity. My question is if broadcasts (intent filters/broadcast receivers) are good communication mechanism for such thing? If not, what is normal/android preferred way to do it?
View 5 Replies
View Related
Jul 22, 2009
Here's the deal: I have an Android application that needs to call a web service every X seconds (currently 60 seconds). This application has multiple tabs and these tabs all need to interact with the data themselves. One is a MapView, one is a ListView and then the third is irrelevant but will need to also get some global data eventually. The issue is that I want my main activity to have a thread that runs in the background, gets the results and then instructs both child activities in the TabHost to update themselves with the latest data. Also, when the user clicks on the tabs and the onCreate/onResume activities fire, I would also like to force a redraw by getting the latest data from the main activity. I'm really at a loss here. I've tried this with a service and some ghetto static methods to pass an instance of the Activities to the Service to call specific functions to update their views whenever the timer fired, but the slowdowns were pretty bad and the code was just ugly ugly ugly.
So I implemented it as a timer-driven thread in the tabhost activity and then I have timer-driven threads in each child activity that then grab the data (in a synchronized fashion) and update their map/list. It's much faster but still feels slightly hack-ish, especially the part where I'm calling a custom function in the parent activity like so:
((MainActivity)getParent()).getNearbyMatches();
This adds an element of strong coupling that I'm not entirely thrilled with, but from a performance standpoint it's much better than it was. I appreciate the answers that have already been given and will do a bit of research on the content provider front but I'm not sure I want to go back to the service model.
View 3 Replies
View Related
Mar 19, 2010
I'm working on establishing a two-way communication between an Activity and a Service which runs in a different process.
Querying the process from the Activity is no big deal. But I want the process to notify the Activity on events. The idea behind it is this: the service runs independently from the actual app. It queries a webserver periodically. If a new task is found on the webserver the process should notify the activity.
I found this thread over at AndDev.org but it doesn't seem to work for me. I've been messing around with BroadcastReceiver. I've implemented an interface which should notify the Activity but the problem is that the listener is always null since the Broadcast from the process is done via Intent, hence the class that extends BroadcastReceiver will be newly instantiated.
How can I establish a 2-way communication? This has to be possible.
View 3 Replies
View Related
Dec 4, 2009
I'm trying to create a tabbed view in my widget configure activity. I'm using a tab activity as my activity type and I have the following code..................
View 2 Replies
View Related
Nov 22, 2010
Is there a way to embed the progress bar in the UI with out an dialog. And not programmatically but with layout xml files. I am guessing it has to be some sort of animation or a "drawable"
View 2 Replies
View Related
Sep 1, 2009
I'm playing around with an idea in the back of my head, was wondering if there were any Android devices that had touchscreen and wifi - no other requirements necessary. The GiiNii Movit Mini is as close to what I'm looking for as I can find. Are there hardware vendors that make custom Android products such as this? Inexpensive, ARM or MIPS, run Android, touchscreen, wifi, that's it.
View 9 Replies
View Related
Jun 14, 2010
Recently a client asked me to make their site "work on smart phones", which normally wouldn't be too much of an issue... However it's a video site, and I have absolutely no idea where to even begin. Right off the bat I'm not even going to consider allowing the site to even function in anything other than Android (Maybe even 2.0+) and iPhone, maybe Blackberry and WinMo. But beyond that... What do I do? I'm looking at using the tag, however I'm unsure what, if any, codecs which phone uses. Is HTML5 even adopted in their browsers yet?
Could someone please point me in the right direction? Am I going about this the right way, using the tag? Or is there some magical html element both iPhone and Android (And BB and WMo) that lets them run video in their native video players (Like on youtube).
View 1 Replies
View Related
Mar 1, 2010
I'm trying to make a somewhat advanced settings Activity (one that has a RadioGroup in one of the cells). The layout xml file contains the following:
CODE:.......
View 4 Replies
View Related
Apr 14, 2009
I'm trying to run an activityGroup embedded inside another activityGroup. (Example : an activityGroup inside a tabActivity)
This seems to display properly but throw an exception when i'm trying to display a modal box like an alertDialog.
CODE:............
If childActivity1 or 2 try to display a dialogBox i'm getting this exception :
CODE:......................................
View 2 Replies
View Related
May 4, 2010
I'm playing around with some ideas and was wondering if anyone knew of an Android-based device that was basically a cell-phone with no screen.
Here's the requirements I'm looking for: - Support GSM - Single SIM slot or eSIM (3G preferred but not required) - Support GPS - Support BlueTooth - Optionally have an accelerometer - No display (this is an embedded device) - Would be willing to provide my own packaging (raw boards would be ok) I've debated taking the guts out of old G1s for this project. But if there is a specific device that meets my needs all the better. If there's any Manufacturers out there that have Android phone "guts" available, let me know too.
View 2 Replies
View Related
Oct 21, 2010
I love using the Engadget app on my Desire to keep up with daily news, but no matter what I try I cannot watch the embedded videos within the stories.....
The ones that link to YouTube are fine as you can choose the browser or the YouTube app.
But their native videos don't play for me. I currently get the choice of viewing through double twist or streaming media player, both of which say "Sorry, this video cannot be played".
Anyone any idea what format these endgadget videos are in? And how I can get the engadget app to choose a player capable of playing them?
View 2 Replies
View Related
Aug 18, 2009
I have an application that uses the webview to load webpages so user can download media off them, but i get a crash when any sort of popup tries to show (eg from a select box or save password dialog) - the error is that for some reason the webview doesnt provide the new dialog with the application context (even though it as passed to the webview component when it was created).
Is there some method to use to supply the application context to dialogs launched from the webview?
View 3 Replies
View Related
Sep 4, 2009
I am using embedded-linux for device which has Arch ARMv5 Speed 266MHZ, vfpu and 32bit bus, 32MB 133 Mhz DDR Ram. can you tell me which windowing system should I use,
1).QT for embedded linux
2). Android.
3). Other!
Well, I am using microwindows for last one year and not satisfied with it as it does not have BSP (Binary Space Partitionin) in its windowing system , No shared memory support for bitmaps. I think Microwindows is just optimized for memory-size not for speed.
View 4 Replies
View Related
Dec 17, 2012
I am new to android programming and I am trying to set a connection with the android as a host. I have included the following imports:
import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbDeviceConnection;
import android.content.Context;
My problem is when I use this code :m_usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);The eclipse editor shows a message saying that getSystemService(String) is undefined for the type CPrinterCommands(The class that I am using). Quick fix gives as a solution to create a method called getSystemService, however I can't find why I would need to create a method, all the examples I found, none of them had a method getSystemService.
View 1 Replies
View Related
Jun 15, 2009
I created a TabActivity with contains 3 tabs. Each tab's content sets different Intents.I would like to add a "footer" wich will appear on each tab. So I get TabActivity's FrameLayout and add it my footer view.Is it possbile to define where place the footer (with an attribute like AT_BOTTOM)? So contentTab dimensions are calculated according to this footer.
View 4 Replies
View Related
Oct 12, 2010
I have a TabActivity with 3 tabs. Each tab contains its own Activity. When one of the contained Activities pops up an AlertDialog, there are actually 3 dialogs created. The dialog has a Dismiss button and it must be pressed 3 times to finally dismiss the 3rd dialog.
View 2 Replies
View Related
Oct 1, 2009
How can I return a value from TabActivity? It seems that the return value from tab pages vanishes and the caller always receives RESULT_CANCELED instead of RESULT_OK.
View 3 Replies
View Related
Aug 18, 2009
More of a TabWidget question I guess really...
I would've tried to send a screenshot for this query if I could, but i'll try and explain.
I have 3 Tabs, each showing a separate Activity. Underneath those tabs (and above the activity display), I want to display a header. This header would probably be a Layout of some sort with a TextView inside it and a background 9patch.
Is this possible, if so how?
View 2 Replies
View Related
Feb 2, 2010
I am having a problem.I want to explain in detail. 1)I am Having an TabActivity with 5 tabs. I loaded content as follows.
CODE:............
And the Problem is If i want to start activity which is not specified in tabhost in above Java code,it is going out of tabactivity. ie.,It is not coming in tabactivity.
2)But i want to have all the activities under tabActivity.
View 4 Replies
View Related
Aug 12, 2010
I create a TabActivity from Several ListActivities.
The lists are created from a cursor load in a AsyncQueryHandler. I have got no problem to load the content of the list.
After that I run an insert in the AsyncQueryHandler, and I meet the following error. The insert is done by the listActivity.
If I run my listActivity individually and that I do my insert, everything is find. Do know why ?
CODE:.......................
View 3 Replies
View Related