Android :: Anything Similar To IPhone SDK Delegate Callbacks?
Sep 23, 2010
I just switched over from iPhone to Android and am looking for something similar to where in the iPhone SDK, when a class finishes a certain task, it calls delegate methods in objects set as it's delegates.I don't need too many details. I went through the docs and didn't find anything (the closest I got was "broadcast intents" which seem more like iOS notifications).Even if someone can point me to the correct documentation, it would be great.
View 1 Replies
Aug 1, 2010
I just switched over from iPhone to Android and am looking for something similar to where in the iPhone SDK, when a class finishes a certain task, it calls delegate methods in objects set as it's delegates. I don't need too many details. I went through the docs and didn't find anything (the closest I got was "broadcast intents" which seem more like iOS notifications). Even if someone can point me to the correct documentation, it would be great.
View 37 Replies
View Related
Oct 12, 2010
i'd like to have iPhone similar tabbar in my Android-Applications or to write my own tabbar.I found already, how to place tabs at screen's bottom. It's really easy.I found this tutorial as well, which looks very nice, but it works (is it true?!) only on SDK 1.6 and later, because of setIndicator(View v)But maybe anybody know easy possibility to do iPhone-like tabbar or can send some links?
View 2 Replies
View Related
Nov 11, 2010
I like to save very simple a few Data. best like in iPhone I can do with NSUserDefaults. What is the similar command here in Android? (just saving a few Variables, to be reused as long the application is installed) I dont like to use a complicated Database just to do that.
View 4 Replies
View Related
Nov 11, 2009
I was just curious as to whether theres an application for a compass for the HTC Hero, similar to the one on the iPhone?
View 1 Replies
View Related
Sep 19, 2010
I'm sure that there has to be a thread about this somewhere, but I've looked quite a bit and can't seem to find one.Before my Dell Streak (now running 2.1, using the the Swype keyboard), I had an iPhone. I definitely don't miss much about it, but one thing that was nice was, when scrolling through large amounts of text, a circle would appear that looked something like a magnifying glass and I would have the ability to pinpoint exactly where I wanted to place my cursor when editing text.With my current setup, I have trouble landing the cursor accurately when I touch in a large body of text. I'd even settle for arrow, like on a regular keyboard. Ideally, I am looking to accomplish this while keeping Swype functionality.
View 2 Replies
View Related
Dec 11, 2009
There is a game called blowfish for iPhone that is pretty cool for passing the time by. Any idea if something similar exists for Android?
View 1 Replies
View Related
Nov 17, 2010
We have a great software foundation based on Microsoft MVC 2, Entity Framework 4, Repositories, POCOs, Service and Control layers, C# Views, JQuery and html. Firefox pulls 100 records in 250 ms, drops it in to a template, links the data to the markup, and we sit back and drink margaritas.
Boss walks in and says he wants an iPhone app. I bet we need an Android app too.
What frameworks could we use to easily jump from our Microsoft comfort zone in to the wide, wide world of the Apple iPhone / iPad, along with a follow-up Android baby.
I imagine we could use our JSON controller methods to communicate. Is there some type of a client side JavaScript consuming app framework we could get a reasonable Website like interface re-working? They didn't like the idea of simply running the whole thing in Safari, which works pretty well.
Needs:
Send and receive JSON objects
Some type of template engine so we can pair up objects to markup, or at least some way to separate design from programming
Something similar to JQuery would be nice
A good editor with auto-complete and highlighting, something that compares to VS2010
It took us two years to incorporate design patterns, Agile methods, and Domain Driven concepts using MVC and Javascript. We may have two or three months to re-produce the same functions.
View 5 Replies
View Related
Jul 17, 2010
I want a ListView to have rubber-band (or bounce) effect while scrolling. Just similar to iPhone lists.
View 3 Replies
View Related
Jul 27, 2010
First of all, I am not saying that I prefer the iPhone over the Droid X at all. HOWEVER, I am terribly jealous over their cases!! I haven't seen the iPhone 4 cases, but for iPhone 3G and 3GS, their cases are just sweet.
an example of the case I'm talking about is:
Incase Slider Case for iPhone 3G (White) - Apple Store (U.S.)
Everyone that I know has an iPhone has a case similar to the one i put above.
I really love the design, simplicity, smoothness and the color of the cases.
Does anyone know where I can find a case for Droid X similar to the iPhone's?
View 5 Replies
View Related
Jan 13, 2010
Is there one similar to the trash can aiming game for the iphone? Not sure of the name, but you have to correct for wind etc.
View 1 Replies
View Related
Jun 2, 2010
Is there an app similar to this for android
iStudiez Pro for iPad, iPhone & iPod Touch
m looking for something that will help me organize my schedule for the fall semester.
View 2 Replies
View Related
Dec 6, 2009
Is there a real estate app out there for the Droid similar to Zitter for the iPhone?
View 5 Replies
View Related
May 7, 2010
Does the HTC Incredible have an external silent/vibrate mode similar to the iPhone?
View 28 Replies
View Related
Jun 8, 2010
can anybody please give me example of using similar functionality like uitableview in iphone to in android?
View 3 Replies
View Related
Jan 21, 2010
give me example of using similar functionality like uitableview in iphone to in android?
View 4 Replies
View Related
Aug 27, 2010
Hi, I like to save very simple a few Data.best like in iPhone I can do with NSUserDefaults.What is the similar command here in Android?(just saving a few Variables, to be reused as long the application is installed)I dont like to use a complicated Database just to do that.
View 2 Replies
View Related
Feb 18, 2010
Does anyone know if Android has an app similar to that of iPhone's "Texts From Last Night"?
My buddy with an iPhone has it and it's hilarious. Just random texts that people sent out.
View 3 Replies
View Related
Dec 25, 2009
Here's the situation I have.
The GMail account I have and registered to my cell phone when I got it is an account I've had since the first few weeks GMail was in beta by invitation only over 5 years ago. Needless to say, I have hundreds of contacts in that account.
When I activated my Droid, they ALL came over. What a mess. The Verizon guy emptied my contacts on the phone and uploaded my phone book from my BlackBerry.
I want to sync my Droid's address book to a second gmail account I made just for this purpose, but I can't get them to sync over. How do I delegate my phone's contacts sync with that second Gmail account?
I added it under Gmail and logged in. Under Contacts > Accounts, that account sync is ON for contacts and auto-sync & Background data is checked.
View 1 Replies
View Related
Feb 25, 2010
Here I update my world to include the canvas size. world.getViewPort().updateViewPortSize(width,height); Is there a better way to do this? Is there a way that I can automatically update my world object without having to manually call it in the setSurfaceSize method but instead call it from My world class? My guess is that I can use some sort of callback, but I don't understand them!
/* Callback invoked when the surface dimensions change. */
public void setSurfaceSize(int width, int height) {
// synchronized to make sure these all change atomically
synchronized (mSurfaceHolder) {
mCanvasWidth = width;
mCanvasHeight = height;
world.getViewPort().updateViewPortSize(width,height); }
View 1 Replies
View Related
Oct 13, 2010
If it must implement with AIDL? And please kindly provide an example. There are several solutions, Does anyone know which is better?
View 1 Replies
View Related
Sep 18, 2010
I have an android application. Based on the current geo location of user, I want to fetch some remote data in background and store it. My implementation is: At specific interval a alarm fires up my service. Service uses an anonymous class to query current location and registers a locationListener callback. On call of onLocationChanged() I initiate the remote data fetch from server.
However once my service is done registering the location listener using anonymos class, it returns as expected; as it doesn't wait for callback to happen before finishing. Since callback takes some time and makes a call when service has already returned, it throws an error saying: java.lang.RuntimeException: Handler{43e82510} sending message to a Handler on a dead thread
Which is quite understandable. One quick workaround for me now is that I can use getLastKnownLocation from locationManager as that doesn't respond back by callback; but what if I do want the latest location right now, in a service and not activity? How can I wait for callback to happen and stop my service from returning.
Also, at what point does lastKnownlocation gets updated? Everytime GPS registers a new location; does it update it? What I want to know is that if it's not latest can it still be closed to latest? As I didn't see an option in android emulator to configure the time period between subsequent updates.
View 1 Replies
View Related
Sep 17, 2010
I am doing authentication with a third-party site that's supposed to redirect back to my app with auth token (OAUTH).
I have the callback working properly if I open the 3rd party site in a separate browser process via this.startActivity(new Intent(Intent.ACTION_VIEW, uri));
But, if I embed a WebView component in my layout, and open the url in that, the callback does not work. Webview says "You do not have permission to open myapp://callback?token=...." and quickly refreshes to "Web page not available...temporarily down..."
View 1 Replies
View Related
Jul 7, 2010
I'm working on a service for my application whose purpose is to allow easy access to various web services we are running. The service is used to maintain a login state across any applications that want to use it so the user only has to log in once when the service is first started.
What is the best way to go about making the service run asynchronously and call back to the application when it is finished. Currently I am using static classes that extend Thread such as
CODE:.....
And to make it easy to call
CODE:....................
But these functions can only be called by my own application. I want anyone to be able to make a one or two line function call and be able to handle the response easily, preferably in a simple callback method.
I figure it has to be done using Intents to start the Threads, but if I do that I can't pass a callback.
View 2 Replies
View Related
Aug 17, 2010
We are supposed to make UI actions only from the main UI thread. But it is not clear to me if callbacks like LocationUpdateListener (and other callbacks from sensors) are already in the UI thread or they require special care to access the UI components.
View 2 Replies
View Related
Oct 12, 2010
There are a lot of Android SDK APIs where callback handlers are registered. For a concrete example, with MediaPlayer you can set an onCompletionListener callback. Will these callbacks be called from the main (UI) thread? If the answer is "it depends", then I'm looking for some general rules for what callbacks will be called from the main thread versus another thread. The SDK documentation doesn't seem to spell it out. (Maybe I missed it) It seems important to know, because if I'm guaranteed main thread callbacks, then I can skip some thread synchronization on data shared between different places in code. If I'm forced to be pessimistic out of ignorance, then I have to write extra synch block code and worry about deadlocks, data integrity, and reduced performance.
View 4 Replies
View Related
Jul 15, 2010
Is there a way to obtain the time zone from the callbacks received
void onLocationChanged(Location location)
using the time information that can be obtained from the location parameter
long Time = location.getTime();
Or if there is another way please provide info!
View 2 Replies
View Related
Aug 3, 2010
I want to get the size of a view that is in my activity but I am not able to get that information in any of the activity lifecycle callbacks (onCreate, onStart, onResume). I'm assuming this is because the views have not been drawn yet. At what point are views drawn and is there a callback I can put my code so I can get the size of the view?
View 2 Replies
View Related
Jun 1, 2010
I was wondering if it's possible to call specific methods defined within the AsynTask class from another class and/or service ?
In my specific case I have a Service playing some sounds, but the sound is selected from a List with available sounds...
When a sounds is selected it is downloaded from my home server, this takes some time (not much, let's say around the 3-4 seconds, the sounds/effects aren't big in size)...
So my problem at the moment is that I have a service to play those sounds, and when I select one I wanted to show a progressdialog... The way (if I understood correctly) is to use an AsyncTask, but the only thing the AsyncTask will do is telling my Service to play a specific sound from my server... So there is no "callback" from the service to the Asynctask...
How can I call a running AsyncTask, which sits in another class, and tell him all work is done and thus he can stop showing the ProgressDialog ? Or am I over-engineering it and there are other ways ?
View 2 Replies
View Related
Nov 16, 2010
I'm new to Java, I'm porting over our Windows Phone 7 library to run on Android. Due to syntax similarities this has been very simple so far. Our library is basically an abstracted http message queue that provides data persistence and integrity on mobile platforms. It only provides asynchronous methods which is a design choice. On WP7 I make use of delegates to call the user supplied callback when an async message has been processed and the servers response received.
To achieve the same thing on Android I've found two ways so far - A simple Java listener interface that contains OnSuccess and OnFailure methods that the user must implement, or using the Android handler class which provides a message queue between threads(http://developer.android.com/reference/android/os/Handler.html).
I've gone with the Handler at this stage as if I'm honest it is the most similar to a C# delegate. It also seems like less work for a user of our library to implement.
Example of some user code to make use of our library:
CODE:.............
Using this the user can create as many different handlers as they'd like, called whatever they'd like, and pass them in as method parameters. Very similar to a delegate...
The reason I'm wondering if I should move to a listener interface is because the more exposure I gain to Java the more it seems that's just how it's done and it's how third parties using our library would expect it to be done.
It's essentially the same process, except each time you wanted to do something different with the server response i.e. You might be fetching different types of data from different endpoints, you're going to have to create a custom class that implements our interface each time, as well as implementing any methods our interface has. Or of course you could have a single monolithic class that all server responses were funneled in to but have fun trying to figure out what to do with each individual response...
View 2 Replies
View Related