Android :: AllowTaskReparenting And FLAG_ACTIVITY_CLEAR_TOP Conflict

Dec 14, 2009

I am using Android 2.0 and have the following situation:

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

This activity belongs to a task that has a service running and is usually not killed, so even when I am in the home screen I see the task running on DDMS (I will call it Task A).

It is possible to start Activity A from another application (running on Task B). When it is launched, I assume Activity A is "reparented" to the Task A. I assume that, because the debugger stops on the breakpoint I have set on onCreate and I am debugging Task A only. Please, advise if this is not correct.

So at this point, as far as I can tell, Task A has only Activity A. When in this situation, the service running on Task A receives some event and puts a notification on the Notification bar. This notification, if clicked, will send an Intent that also starts Activity A (this Intent has flags FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TOP).

Now to the problem, what I expected is that, because of the CLEAR_TOP flag, Activity A would be destroyed and recreated, as it has standard launch mode. But what I observe is that another Activity A launches on top of the previous one. When I click BACK on the new instance of Activity A, the old instance is redisplayed, what for my use case is wrong. Note that this only happens when launching Activity A from another application. If I launch it from my application and click on the event on the notification bar, it is destroyed and relaunched.

Android :: allowTaskReparenting and FLAG_ACTIVITY_CLEAR_TOP conflict


Android :: AllowTaskReparenting - True Will There Be A Single Instance Of The Activity

Oct 4, 2009

Before asking my doubt, let me clarify my understanding of allowTaskReparenting...

Suppose there exists a Task (say Task 1) and this task has an activity (say Activity 1) which wants to call my Activity (say Activity 2). Let my activity (activity 2) set the attribute allowTaskReparenting to true and let my activity have a specific taskAffinity(affinity1). When Activity1 calls my activity (activity2), my activity becomes part of the task1. But suppose another task (task2) is already present/created with the same taskAffinity as mine (affinity1) and an activity in that task (say activity3) tries to start my activity, my activity gets re- parented to task2.

Not sure if i was clear enough. If i were to rephrase my words...

If my activity has allowTaskReparenting set to true and an instance of my activity is already present in task1. If task2 with the same task affinity as my activity tries to start my activity, the EXISTING activity gets re-parented from task1 to task2.

My quesions:

(1) Is my understanding correct ?

(2) If I am correct then a single instance of my activity gets shifted from task1 to task2. So 2 activity objects of my activity are NOT created.

View 5 Replies View Related

Android :: Animation Transition Between Activities Using FLAG_ACTIVITY_CLEAR_TOP

Aug 17, 2010

In my android app, I'm making a method that pop all activities and bring up the first activity.

Intent intent = new Intent(this, MMConnection.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
this.startActivity(intent);


As I noticed that the transition was still a left to right animation, does someone know if there is a way to change system animation when starting an activity? Actually, I'd ideally like to have a right to left transition (like when the return button is tapped)

View 1 Replies View Related

Android :: Using FLAG_ACTIVITY_CLEAR_TOP - But Don't Restart Target Activity?

Nov 21, 2009

I'd like to use FLAG_ACTIVITY_CLEAR_TOP to launch an activity in my app. It has one feature I don't want though - it restarts the target intent, instead of just resuming it. Example history stack, with activity D making the call to B with that flag:

A B C D

new stack

A B

But 'B' gets relaunched, its onCreate() method is called. Since B is already in the history stack, is there a way I can use this flag, but have it *not* recreate B, just onResume() it again? The reordering flags are kind of what I need too, but they won't pop C and D, just reshuffle the stack so B comes to the top, but I want C and D to go away.

View 5 Replies View Related

Android :: Resource In Conflict

Sep 4, 2010

My application has resource conflict problem. Did some investigation, seems like all the resources within the apk file are cached after they are loaded on demand. The cache is stored in Resources.java mDrawableCache. The key to retrieve the drawable from this cache is combining the data and assertCookie fields of TypedValue class. In my application, there are 2 resources, ex. a color background and image drawable, evaluated to the SAME key value.. So just wondering, how can it happen?BTW, I am using eclair SDK.

View 2 Replies View Related

Android :: SMS BroadcastReceiver Conflict With GPS LOCATION_SERVICE

Mar 1, 2009

SMS BroadcastReceiver conflict with GPS LOCATION_SERVICE.

Code is here:

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

View 2 Replies View Related

Android :: APK Installation Fails / Package Conflict

Mar 24, 2009

I'm testing an app I'm developing and asked a friend to install on their device. I wanted to make it as easy as possible for them to help me out so I put the .apk up on my website for them to download to the phone (rather than making them download the SDK and use adb to install). The install of the downloaded .apk fails, complaining of a package conflict.

I have since gotten my hands on the phone briefly and I verified that:
* they have selected "allow unsigned apps" in settings
* there is no package with the same (or similar) name in data/data * installing via adb works with not a peep
* when I download the .apk to my phone the app installs fine.
It would be really nice to make it as easy as possible to distribute to people who might be willing to do me the favor of testing.

View 3 Replies View Related

Android :: Do Locale / Power Manager Conflict?

Mar 6, 2009

I just downloaded Locale and have the free Power Manager. My question is, do they conflict on settings, and do I have to disable one to get the other to work correctly?

View 4 Replies View Related

Android :: HTC Hero / Vista Sync - Settings Conflict?

Nov 5, 2009

After 3 install/uninstall/install attempts my phone is syncing with my vista laptop, but the my outlook 2007 calendar and contact information only goes one way, from the laptop to the phone. I can't find the settings (conflict?) that will allow the two devices to swap info.?

View 1 Replies View Related

Nexus :: Conflict Free Phones?

Mar 1, 2010

I saw some report on the metals that are used in all cell phones and are fueling the conflict in Congo.

View 4 Replies View Related

HTC EVO 4G :: Pandora / Google Maps Conflict?

Jul 24, 2010

I was listening to Pandora and decided to open up Google maps (In the car). And I noticed that in Gmaps it wouldn't give me an accurate reading and by accurate meaning when it says "accurate to 3 meters". It would say "accurate to 1000 meters" or to 1200 w/e. So i closed Pandora and opened Gmaps and right away it gave me an accurate reading of 3 meters.

So I believe you cant run Gmaps accurately if you're listening to music on Pandora? Or is it just my phone? Try this and let me know what u get.

View 3 Replies View Related

Motorola Droid X :: Conflict Between LauncherPro And WidgetLocker?

Aug 15, 2010

Today I rebooted my phone and LauncherPro got stuck starting, only displaying a window in the top left corner, like it couldn't finish rendering the preview screen, and it never starts on that anyway. I was totally stuck without access to the menu buttons but still had the notification for WidgetLocker, so I was able to get to that, unlock it, restart the Moto launcher, and disable WidgetLocker. Now that it's disabled, I seem to be able to make LauncherPro my home again, but it looks like I'll have to disable WidgetLocker, which I really liked.Not sure what else could be causing the problem - probably something to do with WidgetLocker's home launcher sub-app.

View 11 Replies View Related

HTC EVO 4G :: Latest OTA Resolve Bluetooth Wi-Fi Conflict Issue

Jun 30, 2010

For the people who HAD the blue tooth issue where you get random dropouts of blue tooth when Wi-Fi is on, did the latest update fix this?

If you never had a blue tooth issue, that's awesome and I'm happy for you! But please don't clutter up this thread with "no problems" comments.

View 1 Replies View Related

Motorola Droid X : Overclocking Apps / Should Remove One So They Do Not Conflict?

Nov 21, 2010

Sorry for a new thread but I was afraid my question would not be seen because of the size and age of the other thread. I was using the DX/D2 overclocking app and decided to download the Droid X/2 overclock so now I have 2 overclocking apps. Should I remove one so they do not conflict?

View 1 Replies View Related

HTC Desire :: Contacts Icon / Photo Conflict / Phone Vs FaceBook

Jun 13, 2010

i've just upgraded to the Desire & am liking many things in it, but this issue bugs me:i've synced & linked the contacts in my 'people' app. in some cases, this involved linking the FaceBook profile of a person with a pre-exisitng phone number in my phone/sim card.The problem is that the phone seems to default to the Facebook 'profile picture' as the icon/photo that shows up in my People app (for that contact), even if tell it not to.I've tried downloading new pics, or taking a photo with the camera, and then manually setting this as the 'icon' for a certain person. This works for a while (a few hours?) and then within one day, the phone automatically re-sets this icon & replaces it with the Facebook profile pic. again.

View 17 Replies View Related

General :: Contact Pic Resolution JB / ICS - Conflict 2 Devices And 1 Google Account

Sep 12, 2012

I've got a smartphone running Jelly Bean. As I like the gmail contact photos very much, I was happy that one new feature of Jelly Bean is the fact that the contact photos are synced with Google servers in hi-res (720x720). I spent a good deal of time replacing the awful downsized pictures with new hi-res pictures. They sync in 720px, everything fine, so far.

Where my problem begins: Within the next days I expect the arrival of my new tablet. It's a low budget one (Arnova 10b G3) which runs Ice Cream Sandwich and which maybe won't ever get a Jelly Bean firmware.

I'm in a conflict now: On the one hand, I'd like to use the tablet with my Google account and not create a dummy account or something like that. This would spoil much of the usability of the account. On the other hand, I don't want to destroy my hi-res contact pics because one Google sync under ICS would downsize them forever and I guess they would again sync downsized to my Jelly Bean phone.

Is there maybe a hack that prevents Google from syncing the contact pictures? In this case, I could use the Google account on the ICS tablet just without contact pics. The downsized pics are rubbish anyways if one's display has a proper resolution.

Or, can one prevent Google from syncing the contacts after setting up the account? I know that the contact sync can be unchecked in the settings but as far as I know, that doesn't prevent the initial sync.

View 1 Replies View Related

Android :: Android - Avoiding Conflict Of Setting Text Field Values

Nov 17, 2010

I'm writing an Android application that allows a user to maintain a list of products. In the EnterProductData activity, the user can enter information about the product into form fields, which will then save the info to a SQLite DB. The EnterProductData activity also allows the user to initiate a barcode scan via the Barcode Scanner app in order to capture the UPC code. The problem I'm facing is trying to set the value of the UPC text field in onActivityResult() once the barcode scan activity is complete and returns the value.

What is ending up happening is my onResume() method is calling a function (populateFields()) that sets the values of the text fields to whatever is currently saved in the DB. And this seems to be happening after onActivityResult() is called. This means the scanned UPC is set as the text field value, only for an empty value to be set to it immediately after. The line of code to blame is commented with asterisks next to it. I imagine that if I immediately save the scanned UPC to the DB in the onActivityResult() method, I can avoid this problem, but that doesn't seem to be the best practice, in my opinion. Can someone advise me on what I should do?

EnterProductData.java
public class EnterProductData extends Activity {
private Button mScanButton;
private EditText mUPC;
private Button mSaveButton;
private Long mRowId;
private DbAdapter mDbHelper;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDbHelper = new DbAdapter(this);
mDbHelper.open();
setContentView(R.layout.enter_product_data);
mUPC = (EditText) findViewById(R.id.UPC);
mScanButton = (Button) findViewById(R.id.scanButton);
mSaveButton = (Button) findViewById(R.id.saveButton);

mRowId = (savedInstanceState == null) ? null :
(Long) savedInstanceState.getSerializable(DbAdapter.KEY_PRODUCT_ROWID);
if (mRowId == null) {
Bundle extras = getIntent().getExtras();
mRowId = extras != null ? extras.getLong(DbAdapter.KEY_PRODUCT_ROWID): null;}
populateFields();
mScanButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
IntentIntegrator.initiateScan(EnterProductData.this);}});
mSaveButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
setResult(RESULT_OK);
finish();}});
}private void populateFields() {
if (mRowId != null) {
Cursor product = mDbHelper.fetchProduct(mRowId);
startManagingCursor(product);
mUPC.setText(product.getString(
product.getColumnIndexOrThrow(DbAdapter.KEY_UPC))); //******}
}@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
saveState();
outState.putSerializable(DbAdapter.KEY_PRODUCT_ROWID, mRowId);
}@Override
protected void onPause() {
super.onPause();
saveState();
}@Override
protected void onResume() {
super.onResume();
populateFields();
}private void saveState() {String upc= mUPC.getText().toString();
if (mRowId == null) {
long id = mDbHelper.createProduct(mRowId, UPC);
if (id > 0) mRowId = id;
}} else {mDbHelper.updateProduct(mRowId, UPC);
}}protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(requestCode) {
case IntentIntegrator.REQUEST_CODE: {
if (resultCode != RESULT_CANCELED) {
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
if (scanResult != null) {
String upc = scanResult.getContents();
mUPC.setText(upc);
}}break;
}}}}

View 1 Replies View Related

Motorola Droid : Does Spare Parts 'Task Management Conflict At All With AutoKiller

Jun 4, 2010

I notice that Spare Parts came with a Task Management option. I was wondering if anyone has seen a conflict between using Spare Parts and AutoKiller which seems to have the same job except with more features?

View 11 Replies View Related

General :: Samsung Galaxy S2 - Synching With Two Exchange Servers With Security Policy Conflict

Jun 8, 2012

I have an SGS2 with the latest ICS release (rooted). I work with two companies supporting sync with the exchange server (2010) on a smartphone.

I can set up both exchange servers at the same time. The first day the both work, but on the second day one of the two (so far always the same) start giving me connection errors, and will no longer sync emails.

I am almost sure that the problem is that for security reasons, both want to have their security policy (admin privileges etc) enforced over my phone, and when they re-check daily they find that the policy is not as they want it. to overcome this?

View 2 Replies View Related

Android :: Android How To Send Data From Server To Android With No Request From Android?

Oct 19, 2010

today i meet the problem.i need technic can control the android machine from server.then i want send data from server to android with no request from android.

View 2 Replies View Related

Android :: Android 1.6 - Android - View - WindowManager$BadTokenException - Unable To Add Window - Token Null Is Not For An Application

Apr 14, 2010

I'm trying to open a dialog window, but every time I try to open it it throws this exception:

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

I'm creating it by calling showDialog with the display's id. The onCreateDialog handler logs fine and I can step through it without an issue, but I've attached it since it seems like I'm missing something:

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

Is there something missing from this? Some questions have talked about having this problem when creating a dialog from onCreate, which happen because the activity isn't created yet, but this is coming from a call from a menu object, and the appContext variable seems like it is correctly populated in the debugger.

View 3 Replies View Related

Android :: Android WebView Not Loading A JavaScript File But Android Browser Loads It Fine

Jun 3, 2010

I'm writing an application which connects to a back office site. The backoffice site contains a whole slew of JavaScript functions, at least 100 times the average site. Unfortunately it does not load them, and causes much of the functionality to not work properly. So I am running a test. I put a page out on my server which loads the FireBugLite javascript text. Its a lot of javascript and perfect to test and see if the Android WebView will load it. The WebView loads nothing, but the browser loads the Firebug Icon. What on earth would make the difference, why can it run in the browser and not in my WebView? Any suggestions.
More background information, in order to get the stinking backoffice application available on a Droid (or any other platform except windows) I needed to trick the bakcoffice application to believe what's accessing the website is Internet Explorer. I do this by modifying the WebView User Agent.Also for this application I've slimmed my landing page, so I could give you the source to offer me aid. package ksc.myKMB;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebSettings;
import android.webkit.WebViewClient;
import android.widget.Toast;
public class myKMB extends Activity {
I already have JavaScript on the web browser on, the problem is the web view is acting to different from the web browser.

View 1 Replies View Related

Android :: Resolve The Error - Com.android Internal R Cannot Be Resolved - Using Android File MultiAutoCompleteTextView.java

Aug 15, 2010

I want to implement my own Tokenizer base on the file
"MultiAutoCompleteTextView.java",

but I encounter an error "com.android.internal.R cannot be resolved" when I try to

import "MultiAutoCompleteTextView.java" to my project.

code:.................

I haven't research any solutions to resolve this problem.How to correct "com.android.internal.R.attr.autoCompleteTextViewStyle" my own attr?

View 1 Replies View Related

Android :: Does Android Eclair Code Base Support Plugins In Android Browser?

Jan 11, 2010

1- Does Android Browser (Éclair code base) support the "plug-in" or not?

2- Why "Google Gears" support is removed from the clair code base?

I searched the forum and came to know that earlier version of the Android does not support it at all? Here is the link for that, but this query asked in Dec'2008.

View 2 Replies View Related

Android :: Android How To Edit Specific Record From Database In Android Programming

Jan 5, 2010

At first,I have a database created by using Ruby on rails.I just already implement insert function(HTTPPost) in my Android Application and it's work.But I don't know how to retrieve specific record from my databases and insert it back to specific record in Android (Like edit function in RoR)This is my insert code :
private void insertComment() {DefaultHttpClient client = new DefaultHttpClient();HttpPost post = new HttpPost("http://10.10.3.87:3000/comments");
// Configure the form parameters
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("comment[content]", t_comment.getText().toString();
nvps.add(new BasicNameValuePair("comment[id_account]", "1"));
nvps.add(new BasicNameValuePair("comment[id_place]", Integer.toString(position)I really try many ways out but it doesn't work and it takes very long time to fight with this piece of code. Actually, I really don't know how to specify RowID to HTTPPost.

View 2 Replies View Related

Android :: Android.. How To Upload Data From Android Phone To Remote Database?

Sep 17, 2010

I am doing some android development, and now I need to send some android application generated data onto a remote server (a database)?How can I do that? can I use direct JDBC connection and sql?

View 1 Replies View Related

Android :: Sending Info From Android Phone To An Computer IP With Android Emulator

Oct 9, 2010

So i am making a android app, and i want it to be so if i call lets say 911 it sends my GPS coordinents to a certain IP, i know everything but how i make it so if i call 911 it sends the info and how i can make it send the info to the IP via 3g,

View 3 Replies View Related

Android :: Android Market Hiding Apps With Bluetooth Permissions From Android 1.5 And 1.6

Jul 10, 2010

I released updates of my apps yesterday and they are being hidden from android 1.5 and 1.6 phones.

This is due to a Market bug which hides apps with bluetooth permissions from android 1.5 and 1.6.

Come on Google fix the market. We spend countless hours making are apps work on ALL android versions and now you do this...

This issue has been raised since June, but has only affected me since i made an update to the market yesterday.

View 1 Replies View Related

Android :: Mock And Performance Tests Available In Android For Testing Android Application

Dec 23, 2009

What exactly are mock tests... I need to know the mock and performance tests available in android for testing android apps..what is the best tool for testing android apps and how..

View 1 Replies View Related

Android :: Android - Add Menu Item To Android's Built-in Apps

Aug 17, 2009

I'd like to add a menu option to the Android camera app. Is this possible to do using the current SDK? I know I need to add an intent-filter tag in my activity. But I don't know what I should put in the mime type. I want to be able to process the live camera previews if the user selects the menu option. So what do I put into the type tag of the intent-filter? Also I suppose I won't be using ALTERNATIVE or SELECTED-ALTERNATIVE for the category as I want to deal with the whole intent?

View 3 Replies View Related







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