Skip to main content

Posts

Showing posts from February 16, 2012

CADisplayLink with NSRunLoopCommonModes not executed for every frame when tracking UIScrollView?

I am trying to execute a small piece of code on every single frame in a regular (non-OpenGL) iPhone app. The goal is to have a frame counter so that I can measure (rather than guess) where the slow points in the app are and fix them to create a better user experience. What I've done so far is register a CADisplayLink for all modes (including tracking): CADisplayLink *displayLink = [[CADisplayLink displayLinkWithTarget:self selector:@selector(frame)] retain]; [displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; The code that is executed looks like this (lastDraw is a NSDate* and count an int): - (void) frame { NSDate *newDate = [NSDate date]; if([newDate timeIntervalSinceDate:lastDraw] >= 1) { label.text = [NSString stringWithFormat:@"%d FPS", count]; count = 0; [lastDraw release]; lastDraw = [newDate retain]; } count++; } The idea here is to get an update every one second as to how many frames were drawn in the past s

Can"t show text in the UITableView

I have a view-based app that just does one thing : show a array in a TableView, but it doesn't work and I don't know why. Here's the code. .h @interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>{ NSArray *array; IBOutlet UITableView *table; } .m -(void)viewDidLoad{ [super viewDidLoad]; array = [array initWithObjects:@"iPad", @"iTV", nil]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [array count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseId

How to implement UINavigationControllerDelegate to call web service for data driven app

In my app, I have 5 navigation controllers. One of the navigation controllers displays 3 view controllers sharing the same data (from a Sqlite database). The only difference is that they present the data in a different way : ViewController 1 = recipes sorted by countries ViewController 2 = recipes sorted by vegetables ViewController 1 = recipes sorted by wines to drink with The Sqlite database is fed with a web-service. As new recipes may be added anytime, I need to refresh the database anytime the application becomes active. And as the application can become active on any of the view controller (depending on the one selected when the app went to background) I have to write the refresh code in the 3 view controller implementation files. I think this method sucks because the web-service is called when the user switch between the navigation controllers. This create frequent and useless traffic and database updates. I would prefer to do the job only one time per applicat

How to get own peerID in a gamekit bluetooth connection?

I know how to get the other players peerID (from the didConnectPeer event or when i receive data) but how can i get the peerid of the iphone itself after a connection has been made? EDIT Seems to be wrong though. The peerID from didpeerPickerController:didConnectPeer:toSession: seems to be the peer you connected TO. I did this check: -(void)peerPickerController:(GKPeerPickerController *)picker didConnectPeer:(NSString *)peerID toSession:(GKSession *)session { CCLOG(@"I am %@", peerID); [picker dismiss]; picker.delegate = nil; picker autorelease]; } -(void)receiveData:(NSData *)data fromPeer:(NSString *)peer inSession:(GKSession*)session context:(void *)context { CCLOG(@"Received from %@", peer); } 2012-02-05 21:06:18.093 x[2546:707] I am 77606856 2012-02-05 21:06:19.154 x[2546:707] Received from 77606856 And i would get the same id on both printouts when sending something from the other iphonedevice. Did i maybe missunders

Unclear on how to properly remove a UIViewController from another UIViewController

thank you for your time, (As a side note, this question pertains mostly to iOS 4.2.3, I am aware some of these issues could be resolved with moving the code base to iOS 5, however we would like to release this app for phones running iOS 4 as well.) I have a "MasterViewController" that is in charge of calling and dismising other UIVIewControllers. First we trigger a new one: In MasterViewController.m -(IBAction)triggerPrime:(id)sender { [self clearHomeScreen]; NSUInteger randomNumber = arc4random() % 2; if (randomNumber == 0) { self.flashTextViewIsDisplayed = NO; ThinkOfViewController *thinkVC = [[ThinkOfViewController alloc] initWithNibName:@"ThinkOfViewController" bundle:nil]; self.thinkOfViewController = thinkVC; [thinkVC release]; self.picturePrimeViewIsDisplayed = YES; [self.view addSubview:self.thinkOfViewController.view]; } else if (randomNumber == 1) { self.picturePrime

Resigning keyboard on touch

I've found some code that helps me resign the keyboard when a user touches the screen off of the UITextView element. Here's how it looks: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [[event allTouches] anyObject]; if([self.speechBubble.speechText isFirstResponder] && [touch view] != self.speechBubble.speechText){ [self.speechBubble.speechText resignFirstResponder]; } [super touchesBegan:touches withEvent:event]; } This works perfectly so far, and will remove the keyboard if a user touches anywhere outside of the text view. However, it only works for the particular object that I'm running it for, so if I have two speechBubbles, it won't work. How can I change this so that ANY speechBubble will have the same effect? (I could move this code from my ViewController to my SpeechBubble class, but I'd have a little issue with how to use [touch view] to get touches outside of the speechBubble's view. ) Thanks

MKMapKit Hexagon or Square Overlay

I want to make overlay with hexagon or squares over google map with MKMapKit. Not just one hexagon or square, i want to use google map like a tile based map with full overlay with hexagons in every 1km area. I know app will crash if i do the overlay in one process so i want to do it only on the viewable portion of the screen but in that case i have difficulties to make the distance from the start point, its not getting on the right point or hexagons are not same size everywhere etc. My question: lets think i have 1 thousand hexagons in the viewable portion, so what is the best way to place them with a equal distance at once, how should my calculation ? if i scroll the map, how should i calculate the new start points. or should i give up from hexagon and use another think ? i hope i give you a clue for what i have try to do, any helps, any examples or any ideas are welcome.

Symbol not found: _CFXMLNodeGetInfoPtr

Adding Exception breakpoint and when i set breakpoint on my own to see what is wrong. I see this same error 2012-02-05 14:12:09.589 imageview[579:1d03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: _CFXMLNodeGetInfoPtr Anyone have any ideas about this error.

.wav to any compressed form from AVAssetWritter ios

Well the problem I am facing right now is a size issue problem. I am allowing the user to to choose a song from their library and then chop it up into pieces and then be able to use the .wav or .mp3 file on their computer with file sharing enabled. Basically I am using the following AVAssetWritter options and I keep getting a giant huge audio file. E.G. 5 minutes of music is about 50MB. I am looking to try and cut that down to an industry given standard size. I have a feeling it has to do with the fact I am using LinearPCM as one of my options but when I change that or any of the Audio Options the writer can not write. I am also changing the FileType parameter on the AVAssetWritter. Here is my code which works completely fine I just need to find away to compress or shrink the files. AVAssetWriter *assetWriter = [[AVAssetWriter assetWriterWithURL:exportURL fileType:AVFileTypeWAVE

Go to Navigation Controller scene from Navigation Controller that is inside a Tab Bar Controller

I've got following hierarchy in my storyboard: Navigation Controller A -> UIView B (without Nav bar) -> Tab Bar Controller C -> Navigation Controller D -> UITableView E (with Nav bar D and Table bar C) Now I want to go from UITableView E to UIView B. When I use a push segue, my Tab Bar Controller C and Navigation Controller D is preserved. I don't want that. My full scene has to be replaced with UIView B that doesn't got any Nav or Tab bars. How do I achieve this with storyboards?

ViewController gets deallocated which leads to crash

I have a view in my storyboard which I assigned an identifier called "MainView". However if I add its view to the subview, everything that follows produces a crash (e.g. pressing a button) MainViewController *mvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MainView"]; [self.view addSubview:mvc.view]; This is the action triggered by the button : (MainViewController.h) -(IBAction)showUsername:(id)sender{ [testLabel setText:@"username"]; } and the crash log : -[MainViewController performSelector:withObject:withObject:]: message sent to deallocated instance 0x44e0810 I use ARC.

javascript onclick combining 2 events does not work on ios (iPhone, iPad)

I'm combining 2 javascripts in the onclick to do 2 things: 1. Stop an audio player 2. Load and iframe that has a video The following code works on all browsers but not iOS (iPhone, iPad) <a class="aboutclick" href="#" onclick="stop2();document.getElementById('frame').innerHTML='&lt;iframe src=&quot;paul-on-paul.html&quot; width=&quot;100%&quot; height=&quot;600&quot; scrolling=&quot;no&quot; frameborder=&quot;no&quot;&gt;&lt;/iframe&gt;'"><img src="assets/video-cold.jpg" alt="paul-gregory-video" width="161" height="81" border="0" /></a> The stop2() in the beginning of the onclick code is what turns off the music player. (it's Flash audio player so it doesn't apply to iOS). Tapping on the image does nothing on the iPad, iPhone with this code present. If I remove stop2(); from the onclick c

Detecting Zoom Level on iPhone

I'm using the UIImagePickerController to control the camera and overlay millimeter tick marks in preview for measuring closeup macro shots, and I'd like to be able to detect the current zoom level and scale it properly. Is there any way to determine the current zoom level in camera preview?

Why is UIGroupTableViewBackgroundColor causing Xcode 4.2 to choke?

I'm using Xcode 4.2 on Mac OS X Lion 10.7.3 and for some reason, every time I set UIGroupTableViewBackgroundColor as the background color on my UIView, the compiler refuses to build my app. When I open the "newly corrupted" XIB as XML and remove the offending XML represenation of the background color, the app compiles. I am able to apply the background color in code, but doing so in Interface Builder fails miserably. Here's the code that chokes Xcode. Any clue why this is happening? <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">10</int> <object class="NSImage" key="NSImage"> <int key="NSImageFlags">549453824</int> <string key="NSSize">{512, 1}</string> <array class="NSMutableArray" key="NSReps">

How to copy superclass properties to a subclass?

Let's say I have two Classes like so: Car { NSInteger wheels; NSInteger bumpers; } + (Car *)carWithData:(NSDictionary *)carData; Lexus : Car { GPS *navigation; } + (Lexus *)carWithData:(NSDictionary *)carData; carWithData: is a simple helper method that creates an instance of Car populated with variables from carData . Lexus' version would also set the navigation data. How would Lexus' carWithData look like without duplicating code from Car ?

Using Source Control with git and new projects

I'm new to SCM and I've managed to create and use a repository for an existing project. By following a variety of posts, I've done the following: 1) Created an account on Assembla 2) Used bash/git in my existing project directory to add, commit, and push the project 3) Used Source Control in XCode to pull, modify, commit, and push changes Now I want to start a new projection Xcode, and it seems I have to go through the same steps, using a mixture of Xcode 4.2 and bash commands to get the new project into Assembla. For example, I created a new space on Assembla "newjunk", started a new project in Xcode "newjunk" and did NOT check "create local git repository". I did not run any bash/git commands. In Xcode I cannot "push" because I did not "commit", and I can't "commit" because "no valid working copies were found". Is this the only way to get a new project into a remote repository? Or can

Convert image data to binary text for vcard

I need to include an image in a vcard file. The image is supposed to be in binary format. I create the image data as follows: NSData *imageData = UIImageJPEGRepresentation([UIImage imageNamed:@"Pic1"], 1.0); I have unsuccessfully tried encoding using the following 2 methods: vcardString = [vcardString stringByAppendingFormat:@"PHOTO;ENCODING=b;TYPE=JPEG:%@\n", [imageData base64EncodedString]]; AND vcardString = [vcardString stringByAppendingFormat:@"PHOTO;ENCODING=b;TYPE=JPEG:%@\n", [imageData description]]; Any advice on how to get the image data properly encoded to binary would be appreciated. Thanks

Memory Leak & App Crash when going back to Album List

I'm using three20 to create image viewer. First i'm creating list of albums from the sql db and when user selects any album, its url string is passed to the this code that creates thums of available pics on network using XML Parser. everything works fine but when user goes back to the album list and selects another album. app crashes with 'Thread 1: Program received singal: "EXC+BAD_ACCESS" in main.m . plus XCode Product Analyze gives potential memory leak where i'm creating photoSource in the viewDidLoad. Here is the code #import "AlbumController.h" #import "PhotoSource.h" #import "Photo.h" #import "AlbumInfo.h" #import "AlbumDatabase.h" @implementation AlbumController @synthesize albumName; @synthesize urlAddress; @synthesize images; - (void)viewDidLoad { [super viewDidLoad]; // NSLog(@"%@", self.urlAddress); [self createPhotos]; // method to set up the photos array self.photoSour

How do you all debug edge cases happen on customized ROM (Like CM7)

Recently, we had released an app. Before we releasing, we tested it on Samsung Nexus S, Samsung Galaxy S and Samsung Galaxy Tab. However, recently, we realize our app cannot detect the front camera, for users who are running HTC EVO 4G Cyanogen 7 I was wondering, how do you guys start to debug on such edge cases, without purchasing new hardware?

Is it possible to show screen only once when app starts up?

I want to be able to prompt the users to enter the details required for the app only when it starts up for the first time (not other times). These details will be held in a database on the phone. Would it be better to check the database each time or put these details in a shared preference? Furthermore, is this type of activity even possible on Android?

Why the Bitmap is always null, from image byte array?

I have a problem and can not solve in my application. The application performs operations on images like PNG, the image is convert in a byte array , then a piece from this array of bytes is performed on bitwise operations , the problem is the new series of new bitmap format byte is always null. I just do not understand why the new bitmap, from new array byte, is always null and not know how to fix it this bug. // GetByte method from Image private byte[] getByteImageData(String filePath) { /* Bitmap bitmap = BitmapFactory.decodeFile(filePath); Bitmap mutable = bitmap.copy(Bitmap.Config.RGB_565, true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); mutable.compress(Bitmap.CompressFormat.PNG, 100, baos); return baos.toByteArray(); */ byte[] _imagebytedata = new byte[1024]; InputStream _input = null; try { if (filePath != null && (filePath.length() > 0)) { // Cr

iPhone EventKit Adding Event Custom Parameter

I am letting the user add events to the calendar in my app. My question is, can I add a custom field to the view when the user goes to add an event, an example, a 'Birthday' field with a switch or tick box (that I can deal with) so they suer can record custom stats. Is it possible to add this? Thanks.

Android animate drop down/up view proper

Okay I'm trying to do a proper slide down animation. The view that slides down should push all views bellow it down in one smooth movement and again when it slides up all the views should follow in one smooth movement. What I've tryed : In code: LinearLayout lin = (LinearLayout)findViewById(R.id.user_list_container); setLayoutAnimSlidedownfromtop(lin, this); lin.addView(getLayoutInflater().inflate(R.layout.user_panel,null),0); And: public static void setLayoutAnimSlidedownfromtop(ViewGroup panel, Context ctx) { AnimationSet set = new AnimationSet(true); Animation animation = new AlphaAnimation(0.0f, 1.0f); animation.setDuration(100); set.addAnimation(animation); animation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f ); animation.setDuration(500); set.addAnim

Drawables resources management in android

I have one question. I made quick search on the site, but don't found answer. We develop application that running android 2.2 and higher. For views customization we use many drawables, that used in such way: <LinearLayout ... android:background="@drawable/some_drawable"/> We use maps too and manipulate with many data in the memory, and our app got a heavy. On top devices, it work's great,but on other we got OutOfMemory exception after some minutes of using our application. It's look as we have memory leaks. I'm trying reduce the memory usage of our app. question, do we need manualy cleaning resources on destroing our activities: removes drawables for view, or system made it for us?

Running a select from sqllite

I am trying to run a select using sqllite. Its my first time using sqllite and I am getting this error over and over. function ="Adding Event CODE: public List<Example> getExampleByFunctionList(String function) { List<Example> examplelist = new ArrayList<Example>(); String getQuery = "SELECT * FROM " + MySQLiteHelper.TABLE_EXAMPLE+ " where "+ MySQLiteHelper.COLUMN_EXAMPLE_FUNCTION +" = "+""+function+""; Cursor cursor = database.rawQuery(getQuery, null); cursor.moveToFirst(); while (!cursor.isAfterLast()) { Example example = cursorToExample(cursor); examplelist.add(example); cursor.moveToNext(); } cursor.close(); return examplelist; } ERROR: 02-12 12:37:29.218: E/AndroidRuntime(316

getRotation() of layout in Android 2.1

I have an android application I have build for Platform 4.0.3 and I have used getRotation() and setRotation() Methods to rotate my layout but I have to make the same application for Platform 2.1 and when I try to do that I can't find getRotation() or setRotation() Methods so if anyone know the corresponding methods or way to do so I will be Thankful Thanks in Advance

Reuseable activties?

Hi i have a couple of question regaurding android and activites, i have tried looking online but can't seem to find what i am looking for, anyway; Say i have a menu activity with an option to create new "drawactivity", when user selects this an activity is presented with a toolbar on the top the lower enables the user to draw, then the user will save this activity and quit, when the user returns to the menu, the last activity the user was on is avaiable to load and the create new option is also avaible. So here are my questions; How is it possible to load an activty with a predefined layout and fuctions/code ready? and reuse it? Save this activity Load this activity If you have any resources or anything to point me in the right direction it would be greatly appreciated. Many thanks.

Check if URL is valid in Android without catching Exception?

See, I have to check like 50+ URLs for validity, and I'm assuming that catching more than 50 exceptions is kind of over the top. Is there a way to check if a bunch of URLs are valid without wrapping it in a try catch to catch exceptions? Also, just fyi, in Android the class "UrlValidator" doesn't exist (but it does exist in the standard java), and there's UrlUtil.isValidUrl(String url) but that method seems to be pleased with whatever you throw at it as long as it contains http://... any suggestions?

xml parsing in android - recursive tags

I have little confusion regarding the xml parsing in android, Lemme explain the scenario. Lets say I have a tag namely <item> </item> , this tag can hold another tag with the same description into it <item> <item> </item> </item> after inserting the data appropriately how could i possibly able to know if there is a child item in an item or not, and if yes then how could i parse it. MGD

How to Place Button In center

I am new to android , How to place a button in Center horizontally. I use left margin , but it doesnt work for all resolution types. I write following code <ImageButton android:id="@+id/setPasswordImgBTN" android:src="@drawable/password" android:layout_width="110dip" android:layout_height="110dip" android:layout_marginLeft="90dip" android:layout_marginTop="60dip">

Alternative solutions for android.os.NetworkOnMainThreadException

Now I'm solving the android.os.NetworkOnMainThreadException I put the connect method into separated thread, but when the thread starts, the start() method doesn't invoke the Run() , - and also using the AsyncTask , the task doesn't invoke the doInBackground() method! // For The AsyncTask my code was public class ConnectTask extends AsyncTask<URL, Integer, HttpEntity> { HttpEntity entity; String statue; LogInJSONActivity mainActivity; @Override protected HttpEntity doInBackground(URL... arg0) { // TODO Auto-generated method stub mainActivity.setString("Inside Do in background"); entity = connect(arg0[0]); mainActivity.setHttp(entity); return entity; } public HttpEntity connect(String url) { statue= "Inside Connect"; HttpClient httpclient = new DefaultHttpClient(); // Prepare a request object HttpGet httpget = new HttpGet(url);

How to parse a SoapObject in android

I'm using webservices for an application to get the data from external servers. I'm able to connect to the server, send my SOAP request and able get the data back to my android class as SoapObject. Here I'm having trouble parsing this SoapObject to retrieve the values (as strings) coming from the webservice. My code is here: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list); mInflater = (LayoutInflater)getSystemService(Activity.LAYOUT_INFLATER_SERVICE); System.out.println("Entered "+getClass().getSimpleName()); //Calling the web service to get the documents list callService("getDocumentsList","http://wservice.friedmaggy.com/getDocumentsList"); -- I have created callService method to call the webservice.: public void callService(String operation, String soapaction) { try { String SOAP_ACTION = soapaction;

Airpush does not work

I am trying to include airpush in my app. I have added the jar, defined it in the manifest, made a bootreceiver and added the code in the MainActivity. I manage to get the testadd, but it do not send me adds. On my Airpush sight it says that I have no users conected with airpush. Please help me

Pulling data from Google Calendar on Android in JSON

I'm using Android SDK level 8, Java. I have an app with a WebView and I want to import JSON in it. What I want to achieve is: Send HTTP requests to the Google Calendar API v3 and receive data in raw JSON, however, authenticating the request using the Android account manager. I've been looking at the GData Java Client, more specifically at the Calendar Android Sample , which authenticates properly, but I want to specifically avoid the following things: Using the GData API - unacceptable since I want a raw JSON string. Pulling the data directly through JavaScript in the WebView - unacceptable since I would want to implement a SyncProvider in Java to update the JSON string I found some information about the issue, for example: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager com.google.gdata.client.GoogleService.setUserToken(android.accounts.AccountManager.getAuthToken(???)) However, all the examples are connected with GData. On the ot

Add layout for ImageView

I have an ImageView <ImageView android:id="@+id/auto" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="10sp" android:src="@drawable/auto" /> How can I add layout for this image in onCreate for Activity? For instance, I want add background for this image. Thanks.

Table Layout in Tab Layout in Android

I've got a problem in Android. I'm quite new in this thing so please don't treat me so hard. So my problem is i wanna integrate a table layout in a tab layout. I wrote the code and the IDE doesn't show any problems, it install it to the emulator with no problem, but when i wanna run the application it gives me an error(unfortunately, applicaton name has stopped). And that's it. I link some code here. I thanks forward your helps. package hu.EasyBank; import android.app.TabActivity; import android.content.Intent; import android.os.Bundle; import android.widget.TabHost; public class BetetAttekint extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TabHost tabhost=getTabHost(); TabHost.TabSpec spec; Intent intent; intent=new Intent().setClass(this, BetetAttekint.class); spec=tabhost.newTabSpec("betet").s

Contexts, AsyncTask and rotation changes

Is it a good practice to use getApplicationContext() working with AsyncTask in order to do not have to attach and detach the Activity to avoid memory leaks when rotation changes occur and the Activity is destroyed ? I thing it should be correct, as I actually need a Context that depends on the hole application, not the Activity itself. And what is more, in those cases in which is better to use the Activity as context (because you need access to the Activity showing)... Instead of detaching it (assigning to null) when it is destroyed and then assign the new instance in onCreate() , could be just avoid detaching? So, just reasigning the new instance, this way, we could avoid problems of NullPointerException because there would always be a context to use! Thanks in advance!

Extras on demand in a Android Dialog

In one of the activities of my application the user can select the language. Since the app is only in 5 languages I'd like to do something like: When the user press the button language show a dialog displaying the 5 main languages, and a extra option:"Show more languages". If the user select the last one then show the complete list. I really dont know how to implement that keeping the action natural for the user, since reloading the dialog with all the languages can be confusing. How can I make that? Thanks

Android - Running heavy computations in background and returning the result to an Activity

I have implemented some computationaly heavy functions into my application. Depending on the type of input it can take up to several minutes for a thread to return. During this time, I want the user to be able to work with other activities to perform different tasks (i.e. prepare data for the next run). Then, after the Service has finished it's computations, the user should be notified with a Toast that the result is ready and that he should check back to the Activity he started the Service in. Unfortunately I'm stuck at this point. Is it possible to somehow communicate with an Activity which is destroyed at the moment? Like modifying the saved state, so that when it get's recreated the result will be displayed. The only way of communication I did find was via broadcasting from the Service, but this requires the Activity to listen, which is not possible as it doesn't exist at the moment the Service finishes. The only solution that occured to me was writing a file

Android Activity Transition in an ActivityGroup

UPDATE: Please Ignore this question. I uncommented the top if (window != null) { mIdList.add(Id); setContentView(window.getDecorView()); } by accident. Removed that and it's fine. Trying to delete question I am trying to animate between Activities within an Activity Group, inside a tab activity I know the purists will tell me I shouldn't use multiple activities and should be using a View Flipper, but I didn't start the project and don't have the option to completely re-implement the solution. Back to my point. Client wants an Activity to "Slide Up Like the iPhone". So I started on the slide up animation. Animation works, but the problem is, after I run the following method in the ActivityGroup, the new activity is non responsive. If I click on a different tab and come back, anything I pressed will have fired. For instance, if I click on a SeekBar on the newly animated activity, it wont move, but if I click on another tab and come back, the SeekBar

Stop Android SeekBar resetting

I have a ListView in which each item has a SeekBar. When I update the progress of the Seekbar this is written to a database so it can be reloaded when the application is used again. Unfortunately if the ListView is scrolled up or down so that any of the items disappear from the visible screen, when they are redrawn they are drawn with the old value. How do I get the activity to "refresh" when the SeekBar is updated so the values behind the ListView are in sync with the database, this should stop the SeekBar being redrawn with stale data. @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; try { if (view == null) { LayoutInflater vi = (LayoutInflater) mContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = vi.inflate(R.layout.task_list_item, null); } final Task t = mList.get(position); if (t != null) { /* assign layout elements */ final SeekBar seekBar = (SeekBar

Android Certificate/signing application

I tried to update my app on the android market and I got this error : The apk must be signed with the same certificates as the previous version. Since I just had a couple of downloads, I unpublished it and released it with a new package. I made new certificates, keystore, and alias with eclipse and made back ups of the certificate files. I released it and tried to update the new app some days after. I got the same error on the new app. I use advanced mode(multiple apks) in the android market, with 2 apks. This is how I signed the app and update it. Android Tools/Export signed android application. Created a new keystore and a alias and exported it as a apk. The other file, exported I by creating a new keystore and a alias. When I updated this. I did 1, and instead of creating a new keystore i: Use exsisting keystor and alias. I used the same password. Apk nr2: Use the exisiting keystore to the apk 2 and same alias and same password, but still I