Android :: Sharing Data Between Tabs

Jul 21, 2010

I am getting some glitches while making a tab enabled application.

I want to share data, between two tabs of mine application.

How can i achieve the same.

Android :: Sharing data between tabs


Android :: Sharing Data Between Activities

Apr 7, 2010

I was playing a bit with adapters cursors and activities. Let's assume i have a cursor containing a query I've made (it doesn't matter if it's to DB or content provider). Now lets assume i bind some of the data (first two rows) to a list activity. Every click on one of those items should open a new list activity (i pass on the cursor index in the activity bundle). Now the question is, which sharing method will be most efficient and right from code point of view ?

1. I thought of trying to send the cursor object in the intent itself (hoping it implemented runnable) but I'm not so sure it's that efficient since the query may contain many rows which will need to be parceled, and i the other intents uses only a few (say 4-5 columns of each row) it's a real waste.

2. Thought of trying to create the array list for my other list screen adapter and serialize it to the intent (again use serialize and intent to pass on the data) but again i fear for efficiency penalty.

3. my last solution was to use static cursor member in my first activity, with package permission, it will work and be relatively efficient, but I'm not so sure regarding memory efficiency and code structure, i'm not fond of using static variables in any case.

Is there another sharing method that i don't know off, if two activities share the same process and application, then they also share memory space, then it should be easy to pass variables from one to another, the question is what's the easiest way without serializing ?

View 6 Replies View Related

Android :: Sharing Data Between Tab Activities

Aug 10, 2010

I did some digging, but couldn't find a clear answer. I have an application with TabActivity as the main activity. I have some computing and network communication that needs to be done when user clicks on the big red jolly "DO IT" button. One tab hosts the form with "DO IT" button, while the other tabs display the results from computing (each tab displays different part of results). The computing is done as AsyncTask as it's supposed to be (afaik).

Now the question is, what is the best way to share the results between the tabbed activities? It can be done with ContentProvider + database from what I have read, although that seems like a bit too much for my needs. I have also considered an option to save the results to some cache file activities could read in onCreate, onResume etc and display the data. Are there any other convenient ways to share the data? (To make it more clear, the data aren't simple, so doing it through preferences etc is impossible.)

View 5 Replies View Related

Android :: Sharing Data Across Activities

Mar 13, 2009

I was looking out for ways to share data between various activities that one may need to create for his applications . Using "Parcel" and Bundle one can do data exchange , but looks like this is a bit cumbersome process specifically if you have to share large array objects with too many fields.

As android.app.Application maintains global state for the application , we can use this class to store global data and access it across activities. Is this a good way ? Are there any implications on allocating large objects in the your class which extends from android.app.Application ?

View 6 Replies View Related

Android :: Sharing Data Between Users

Aug 25, 2010

I'm writing a game that includes an editor for users to create their own levels. I'd like players to be able to share the levels they've created with other players. I'm trying to figure out the best way of implementing that, and hoping for any advice on the subject.

One obvious option is to set up a server for sharing levels. The game would connect directly to the server to let players share their creations or download levels created by other players. This provides seamless integration and a good user experience, but I'd really prefer not to use this approach. For one thing, I don't want the cost and responsibility of setting up and maintaining the server. And I would be taking on a basically unlimited obligation; otherwise, if I decided to shut down the server a few years from now, the game would suddenly lose a large part of its value.

Another idea I had is to use the Android Market as the way to distribute sets of levels. That way, Google is taking care of running the server for me. Clearly there are programs that work this way, since I've seen lots of themes and expansion packs for particular applications in the Market. While this could work, I'm not very happy with it. Asking an ordinary user to sign up for a developer account on the Market and learn how to post files through it is unreasonable, not to mention they would have to pay $25.

The approach I'm currently leaning toward is allowing levels to be exported as ordinary files. People could then just email them to each other, post them on any website they wanted, etc. Ideally I would want to set up a file type association so they could simply open an email attachment or click a link in the web browser, and my game would automatically be launched to import it. I haven't yet looked into whether that's possible.

View 3 Replies View Related

Android :: Sharing Data On Two Apps

Oct 20, 2010

I am new in android development. i was wondering if i could share some data between two applications in android. One way is to place the text file on SD Card but i dont want to do this.Second way is to place in data folder, and i dont know how to.3rd way is to place the data in shared memory so both applications can see it.also i dont want the user to see or delete this file,only my two applications can change this file or data.Please help me.I've been wondering on this for 2 days.

View 5 Replies View Related

Save Text (data) In Tabs On App?

Apr 1, 2014

I have an app that consites of a screen with 6 tabs. Each has 3 edit texts boxes for your subject, date due and details of the homework (for my school homewrok timetable app). I want to know how i can save the texts in the edit texts boxes after i have entered it and then left that screen or went off the app. I know you need shared preferences as i did it for another screen but as its a tab screen i dont know where to put it. p.s i used the mothod of homework.java (main), homeowork.xml and finally tabs.xml.

View 3 Replies View Related

Android :: Sharing Data Amongst Activities And Services

Aug 23, 2010

I am working on a small android project where it is necessary to share some data amongst several activities and a service that runs in a separate process. I would just like to know what are my options in terms of sharing data? Application class? IPC? File-based? Broadcasts?

View 3 Replies View Related

Android :: Sharing Data Between An Service And An Application

Jun 28, 2009

In order to share data between one of my own Android service and an application i am looking for the best way to do this. I have seen the shared memory drivers inside the GNU Linux kernel, but no Java api. Maybe the specific Google IPC Blinder cad be used for my need ?

View 10 Replies View Related

Android :: Scrollable Tabs - Dolphin Browser When Using Multiple Tabs

Jun 19, 2010

I'm currently working on my first android application. I am using a tabbed layout for my application. I followed the tutorial for this on the dev guide and ran into a problem. The tutorial only used three tabs, but I have a need for more. As such, the tabs resize and bunch up. I was hoping someone could tell me how I can make them scroll, like in dolphin browser when using multiple tabs.

View 1 Replies View Related

Android :: Google Apps Found To Be Sharing Data

Sep 30, 2010

BBC News - Google Android apps found to be sharing data

Quote:

View 26 Replies View Related

Android :: Options For Sharing App Data On Multiple Phones

Aug 22, 2010

I'm looking for suggestions for ways to share Android app data between phones running the same app. For example, lets say I have an app that stores a database of book reviews. If person A has a book review that person B doesn't have, what are the options for getting that information from person A's phone to person B's phone?

Currently, I'm aware of the following options:

- Upload data from person A's phone to a server, then download data from server to Person B's phone.
- Write code to have the phones sync up using bluetooth
- Write code to send SMS messages


I'm wondering if there are any more options besides these, and if there's actually a best-practice for accomplishing this?

Ideally, I want the users to simply click a button in the app to make the sharing take place, so I don't want to go down the bluetooth route because that requires the user to do a bit of setup (or assumes they already have set things up in the form of bluetooth settings).

Since the data can be of variable length and potentially large, I believe that would rule out text messaging.

As far as the server route goes, from what I understand this seems to be an ok way of doing things, but my problem is that I have no experience with having users potentially sign in to a server and then uploading data. I don't know of the cost concerns (if any), or of potential security concerns (allowing just anyone to upload data, I'm not sure if I would have to take steps to ensure someone couldn't bypass the app and upload malicious data).

View 3 Replies View Related

Android :: Sharing Data Between Activities / Activity2 A Pointer To Object1

Jul 22, 2009

I have been using SharedPreferences to share data between activities. But I would very much like to find a better way. I would simply like both Activity1 and Activity2 to share Object1. Activity1 will create Object1 and then start Activity2. What is the smartest way to give Activity2 a pointer to Object1?

To summarize: Activities don't have constructors! How do I send data to them from their parent activity?

View 17 Replies View Related

HTC EVO 4G :: Sharing Wifi Data

Jun 5, 2010

Has anyone tried sharing a wifi connection through the evo? I have a really old laptop without a wireless card and would like to be able to pick up wifi signal from my router with evo and use usb to share with my pc. Haven't tried yet and will when i get home bit just wondering if anyone had tried this or knows if it'll work.

View 3 Replies View Related

Android :: TABS In 2.0 Vs 1.5 - Rounded Corners TABS

Feb 27, 2010

I simply use the tabwidget :

CODE:..........

Why are my tabs so uggly in 2.0 (no more rounded corners as in 1.5/1.6) ?

ugly tabs here

=>

This was better

What should I do now to show "rounded corners" TABS to Nexus One (for exemple) users ;-) ?

Is it because of the following manifest lines :

CODE:................

I have to keep android:anyDensity="true" otherwise I've got a problem with re-sizing of the menus described here

As a separate question, my users can change the Locale within my app itself, I then "redraw" the menus using onPrepareOptionsMenu (Menu menu) to refresh the strings within the menu with the new language choosen by the user. Is there an equivalent for TABS (I have local strings within the Title of the TABS) or do I have to delete all the tabs and re-create them from scratch ?

View 2 Replies View Related

Android :: Tabs - MapView - Activities Within Tabs

Oct 19, 2009

We're in the process of writing an app that has 4 tabs: Map, People, Places, Events. The People, Places, and Events in the App show up as Icons on the map. By default the People, Places, and Events tabs each show a listview, custom rendered, displaying all the People, Places, and Events respectively.

Now, right now each of the tabs has as its content an Intent set to launch the corresponding activity. For instance, there is a MapTabActivity that extends MapActivity, a ShowPeopleListActivity that shows the people, and so on and so forth.

I see a lot of StackOverflow questions/answers saying that due to various limitations in the way the TabHost is setup, it's best NOT to use activities as the content of tabs. For instance, it's impossible to launch a new activity and have it take the place of the existing activity within a tab, whereas it's possible to switch out a View with a different view.

Now, I'm at a crossroads. We've (for better or worse) devoted a fair amount of time trying to get this app to work the way it's currently structured, with the Activities as the content of the tabs. When an icon corresponding to a Person, Place, or Event is clicked, it fires off a VIEW Intent on a URI corresponding to that object; this is picked up by an Activity that then shows the object. The same mechanism is at work both in the Map and in the individual lists. We really like the loose coupling this provides us; we just give a VIEW command and the URI to the person/place/event and it automatically brings us to the right activity. Granted, the activity that's launched covers up the tab view rather than appearing inside of that, but we were willing to live with this.

Here's an issue though: from the Show activity, we want to be able to go back to the map, centered at that person, place, or event. We can launch a new activity to show the map again, but now we have the map activity as the content of the tab, plus the show activity, plus the new map activity in the activity stack; given how resource intensive the map activity is, I'm guessing this is not the ideal way to go.

I guess my question is, is there a GOOD tutorial somewhere showing exactly how to do complex tasks with a TabHost? I've seen HelloTabWidget; I'm looking for something much more sophisticated than this. I'm worried that if we switch to the View based way of doing things, we'll have to do a LOT of housekeeping to intercept all the back events, try to switch out the views, etc., etc., as well as strongly coupling our program in a way we don't want.

View 5 Replies View Related

Android :: Tabs Layout - Tab Activity With 4 Tabs

Nov 11, 2010

I have an Tab Activity with 4 tabs. Each of tab is showing me the list view. Suppose i m on 4th tab and dragged the list view to the last position and after that i click on 3rd tab and again when i go to 4th tab it is not refreshing and showing me the last visible screen. Actually i want to show the list view again from 1st element. is tabs refresh automatically or we need to do it programmatic?

View 1 Replies View Related

Android :: Select Android Applications Sharing Data Without User Notification

Sep 30, 2010

Come one, come all -- let's gather and act shocked, shall we? It's no secret that Google's Android Market is far easier to penetrate than Apple's App Store, which is most definitely a double-edged sword. On one hand, you aren't stuck waiting a lifetime for Apple to approve a perfectly sound app; on the other, you may end up accidentally downloading some Nazi themes that scar you for life. A curious team of scientists from Intel Labs, Penn State and Duke University recently utilized a so-called TaintDroid extension in order to log and monitor the actions of 30 Android apps -- 30 that were picked from the 358 most popular. Their findings? That half of their sample (15, if you're rusty in the math department) shared location information and / or other unique identifiers (IMEI numbers, phone numbers, SIM numbers, etc.) with advertisers. Making matters worse, those 15 didn't actually inform end-users that data was being shared, and some of 'em beamed out information while applications were dormant. Unfortunately for us all, the researchers didn't bother to rat out the 15 evil apps mentioned here, so good luck resting easy knowing that your library of popular apps could be spying on you right now.

Update: A Google spokesperson pinged up with an official response to the study, and you can peek it after the break.Update 2: Looks as if the full study (PDF) has been outed, with the 30 total apps named. Here they are: The Weather Channel, Cestos, Solitaire, Movies, Babble, Manga Browser, Bump, Wertago, Antivirus, ABC - Animals, Traffic Jam, Hearts, Blackjack, Horoscope, 3001 Wisdom Quotes Lite, Yellow Pages, Dastelefonbuch, Astrid, BBC News Live Stream, Ringtones, Layer, Knocking, Barcode Scanner, Coupons, Trapster, Spongebob Slide, ProBasketBall, MySpace, ixMAT, and Evernote.

View 6 Replies View Related

General :: Sharing Google Play Account Without Sharing Everything Else?

Sep 19, 2012

I have my Google account also setup on my wife's phone so we can share purchased apps. However, everything else is shared too. For example, even though I have sync for everything on my account turned off, my calendar still showed up on my wife's phone until I disabled it in the calendar app. Also, I can't remove my Google Talk account from her phone so my messages show up on her phone.

This is on a pair of stock Samsung Galaxy S3 phones.

View 2 Replies View Related

KitKat 4.4 :: Change Between Tabs By Swiping Left To Right To Change Tabs

Jan 10, 2014

i have a problem with this new kitkat os. Before kitkat i could change between tabs by swiping left to right ir right to left to change tabs.Now it doesn't change.

View 1 Replies View Related

Android :: Communicate Between Tabs

Feb 27, 2009

I am using a TabHost one tab with a list and another to show the details of a specific item selected in the list. Does anyone know how I can communicate between tabs?

View 2 Replies View Related

Android :: Tabs At BOTTOM

Mar 7, 2010

I've seen some chatter about this, but nothing definite. Is there a way to put the tabs in a TabWidget to the bottom of the screen? If so, how?

I've tried the following, but didn't work:

a) setting the tabwidget below the framelayout
b) setting the tabwidget's gravity to "bottom"

View 5 Replies View Related

Android :: Tabs At The Bottom

Apr 21, 2009

I have tabbed activity with tabs at the bottom. The labels of each tab are getting clipped unless I set the TabWidget too high (~60dip). My tabs don't have any icons. What is the trick to get the labels centered in TabWidget?

View 2 Replies View Related

Android :: Use Tabs In Application

Sep 8, 2010

I need to use Tabs in my application,I want to use tabs shown in the image attached with email.Could anybody please let me know how this can be done ,Is there any inbuilt control in android for doing this.Tab that are shown in the top and bottom of the screen.

View 2 Replies View Related

Android :: Last Two Tabs In App Doing Same Thing

May 10, 2010

I'm working on adding a tab to an application, but the last two tabs (regardless of order) are launching the same activity. If I go down to two tabs they both work correctly, but when I add the third the last two result in the same activity launching.

CODE:....................

View 1 Replies View Related

Android :: Tabs View App

Jun 3, 2010

I'm trying to build a tabs view for an Android app, and for some reason I get a force close every time I try to run it on the emulator. When I run the examples, everything shows fine, so I went as far as to just about copy most of the layout from the examples(a mix of Tabs2.java and Tabs3.java), but for some reason it still wont run, any ideas?

Here is my code(List1.class is a copy from the examples for testing purposes). It all compiles fine, just gets a force close the second it starts:

CODE:....................

View 2 Replies View Related

Android :: Tabs And Intents

Aug 15, 2010

I have a auto-complete textbox in which the user makes a selection. From here I want to load a tabbed layout which is based on the user selection. The problem is I cant figure out a clean way to pass that selection to each of the tabs. At the moment I can pass an intent to the 'tabhost' activity and then pass to each child activity explicitly, however this just seems like messy iterative code to me! So basically how can I pass my intent data bundles to the tabs activities cleanly & efficiently! Psuedo code is also very welcome.

View 2 Replies View Related

Android :: Tabs In The Same Activity

Aug 23, 2010

Where I can find a simple tabs example?

The Android Developers Hello Views Tab Layout example only details how to use separate Activities for each Tab.

I would like to use tabs to extend a screen of settings without scrolling, i.e. there are too many options for a single screen, so I'd like to split them over two tabs, but still handle them in the same Activity.

Each tab can refer to a separate layout file if that is how it needs to be done.

View 2 Replies View Related

Android :: Different Sized Tabs

Aug 24, 2010

I have an application with 4 tabs. By default every tab width is 1/4 of the screen width. How can I override this? I need the tabs to have a different width for each one.

View 2 Replies View Related

Android :: Using The Same View On Both Tabs

Oct 3, 2010

I'm working on an Android application with an activity that uses a tab layout. There are two tabs which switch between the content being shown in a ListView below.

This means that the two tab specifications point to the same ListView for content, R.id.main_list:

CODE:..................

This somewhat works - if I switch to tab #2 and back to #1, I can see the ListView and my database code gets the right data based on the selected tab. However, when the activity launches, the ListView can't be seen before tabs are changed. This is obviously a problem.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved