Android :: Adding Data To Intent Fails To Load Activity

Apr 11, 2010

I have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured that I should pass widget ID as Intent data however as soon as I add Intent#setData I would see in the log that 2 separate Intents are appropriately fired but the Activity fails to pick it up so basically Activity will not come up and nothing happens (no error or warning ether)

Android :: Adding data to Intent fails to load Activity


Android :: Adding Intent To Activity Dynamically?

Oct 14, 2010

I've got an activity for which I've defined an intent filter statically in AndroidManifest.xml. I'd like to register additional intents dynamically to that same intent filter in the activity's onStart() method. Is this possible? I'm trying to avoid having to implement a separate intent receiver class.

View 1 Replies View Related

Android :: Application Gets Name Of First Activity In Which Load Data

Mar 14, 2010

I think i'm getting senile because I was convinced that to give a name to your application, you had to fill this part of the manifest: <application android:icon="@drawable/icon" android:label="MyApplicationName"> However for a reason I don't understand, my application gets the name of my first activity, in which I load data, henceforce, It is called "Loading"...(defined as follows in the manifest) <activity android:name="AccueilSplash" android:label="Loading">

View 2 Replies View Related

Android :: Use An Intent To Send Data To My Activity

Nov 6, 2010

I have a server running that notifies the user with a statusbar notification that opens my main activity, how can I pass data to my activity trough that intent?

View 1 Replies View Related

Android :: Rapidly Load Data On Relaunch Of Activity

Nov 12, 2010

i am fetching XML from the web, parsing it and display it on the screen. The problem which i am getting is that the activity tries to load the data from web each time the activity is called.(Actually, my mobile app requires frequent trips to the server) So i am in search of the below solution: On Re-launch of an activity, the data from web should not be loaded again. (But it should load data from the cache or local database that we have created while calling the web-xml for the first time). creating a class that i can use to transparently make application faster by selectively caching items in memory. And thus, making users very happy and This class can even apply individual refresh times to each cached item.

So, i think i need to store the data in Cache , or in local database or something like that. Is there any way/technique to implement such thing ? so that it need not to load from web every-time on Re-launch of an activity. [Note: I want to do to make client happy by decreasing the loading time and running the application efficiently and optimizing application's loading time]

View 6 Replies View Related

Android :: Pass Data From Activity To Service Using An Intent

Jul 20, 2010

How do I get data within an Android Service that was passed from an invoking Activity?

View 1 Replies View Related

Android :: Activity / Process Lifecycle - Save / Load Data To / From Disk

Nov 26, 2009

My app is made of two activities, A and B. I'm considering this sequence of steps: Activity A is started. A launches B [A is paused, B is running]. B launches a map intent [A and B are both paused now]. Now the user is using the maps application and the system decides it needs more memory. Can the system kill only one of my activities for memory, or will it always kill all activities in a "process" in this situation?

Both activities share some static data like:

class Data {
public static String mName;
public void save() {
// write to file: mName;...................

View 1 Replies View Related

Android :: AppWidgetProvider Not Inform When Adding Widget Fails Due To Not Enough Space

Dec 30, 2009

My app has a 1*4 icon size widget. When a user tries to add a widget I provide with a configuration screen. and some data is collected - it is verified by the server - it is added to the local DB with appWidgetID as the key - all is good. when user hits save, if there is not enough space, he is given a polite toast - "No more room on this home screen". Now my problem is that the application is not informed of this. Application still assumes the widget was created and sits back and wait for the broadcast to update the widget after certain amount of time.

Can anyone tell me if i can find out via a broadcast or a call back or any method possible to determine if the widget was not successfully created, so that i can mark that record in my DB as deleted. Or better if i can know the space available beforehand via some magic ninja code. my whole application design is disturbed because of this problem.

View 3 Replies View Related

Android : StartActivity Intent Fails When Certain Apps Are Running

Jan 27, 2010

I am running into a critical conflict of sorts. My app is a remote service which essentially starts an activity when the screen goes to sleep. How it does this is very simple via screen off broadcast receiver and then an explicit intent to start the activity as a new task. The activity is basically in charge of responding to key events and displaying some simple text.

Thanks to a few window flags added in 2.0, activities can do this. They can be created in a way that either puts them on top of the lockscreen, or completely dismiss the lockscreen. This way they basically have focus without the lockscreen having to be dismissed by user. The alarm clock in 2.0 uses the flags to wake up the device and show the alarm dialog. I use them to place my activity when the screen sleeps so the user sees a custom wakeup lockscreen. The reason we create it at screen off is to get rid of lag the user experiences at wakeup involving first seeing the lockscreen, then seeing the activity appear. Also doing it immediately at sleep allows it to have focus so it can handle key events effectively.

The process works perfectly except in certain apps. So far, it seems the bug is consistent while browser (and even dolphin browser) as well as the facebook app are running. The bug never happens in GTalk or Launcher. It is rare but can still be duplicated in the messaging app every so often. I can't figure out why my activity doesn't get created at sleep while these apps are active. My remote service still gets the screen off broadcast and does the startActivity for the explicit intent, and that's all I get in the log. My onCreate is not being called. Instead it gets called when we wake the screen up again.

I have tried, as a control, to hold the partial wakelock starting when my remote service gets created, and the issue persists. So I don't believe it is a problem that the CPU has gone to sleep. Since only these particular apps cause the issue to duplicate, I can't imagine why the activity start fails. What could those apps be doing to interfere with another app's ability to get created? I use singleInstance as the launch mode so that I can ensure that the activity will never be able to be recalled by user process. I want it to go away when user unlocks and it is working fine like this, as long as it is able to be created. The singleInstance ensures I can have the same lockscreen handle an intent to do something specific based on user actions that the remote service monitors.

my source code can be viewed on my project page. http://code.google.com/p/mylockforandroid/source/browse/#svn/trunk/myLock/src/i4nc4mp/myLock

The issue happens to both my CustomLockService and NoLockService variations. These two services will start Lockscreen or ShowWhenLockedActivity and the bug is witnessed. The build illustrating the bug's end result-- user has to try to unlock 3 times due to the bug because on wakeup when the oncreate finally succeeds, user is seeing the activity when normally it would have auto-dismissed thanks to key event logic that also isn't seeming to happen due to the delayed onCreate, so they have to send it to sleep again. Now that the activity is properly done being started, and screen is asleep, the expected functionality happens at next wakeup-- can be downloaded also from the downloads tab.

This seems like an extremely irrational thing to be caused only by specific apps. I am quite baffled and out of ideas for a solution unless I've made some critical mistake in my activity definitions.

View 1 Replies View Related

Android :: Video View - Fails To Load File From SD Card

May 5, 2010

I have an activity that uses VideoView and MediaController. I have a .mp4 file. When I put the file in res/raw folder, I can play the video using Uri.parse("android.resource://<package>/" + R.raw.id_video)
However, when I put the same file in the filesystem, it plays properly. I use videoView.setVideoPath("/sdcard/myfile.mp4");

View 1 Replies View Related

Android :: Change Intent Bundle Data Before Activity Recreated After Orientation Change

Jul 30, 2009

I have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?

I tried the following:

Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}

But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?

View 2 Replies View Related

Android :: Possible To Load A Layout XML At Runtime And Load Into Activity?

Sep 4, 2010

Is it possible to load a layout XML at runtime and load into activity?

In my app, I have various types of data like Person, Company, City, etc; The requirement is to dynamically load the layout, find views by tags (property names like Person.name, Person.address) and then fill in data. For example, if user has selected an object of type Company, we want to load a company.xml layout, inflate it and then associate various properties (company name, company slogan, city, address, revenue) to tagged views. One possibility I see here is - each view in the layout will be associated with property-name as tag and then appropriate data will be loaded in appropriate views.

What should be the best design you would recommend?

View 1 Replies View Related

General :: Android Fails To Load WiFi Access Login Page

Aug 20, 2010

When I try to connect to my University's network , the my Galaxy S is able to connect JUST fine. However, when I open a browser it says the incoming certificate is not secure and then I have NO INTERNET on any page. It tries to redirect me to the login page for the network but fails to do so with a "communications error" and subsequent no internet access of any sort.

What the network is supposed to do is redirect me to the login page so that I can register the device to the network and login using my university account. My phone can't do that apparently and just sits connected to the network with NO INTERNET connectivity.

This is the university network and the instructions how to get on it for Android devices: [URL] .... I connect to it just fine but am UNABLE to get to that device registration/login page.

This is NOT just for my university. ANY public network which requires me to accept an "agreement" before it lets me have internet access, my phone KILLS ITSELF and CANNOT pull up the agreement page but instead tells me there is no internet. I'm SURE its a software problem or something with settings but can't figure out just what it is.

Just about the only networks I can connect to on Wi-Fi are home networks.

View 5 Replies View Related

HTC Desire :: Messages - Calls & Internet Fails To Fully Load

Sep 1, 2010

the internet often fails to fully load the page I request, even when the display at the top is indicating 3g/3g+. The web address bar will half load and then stop and the only way to get the internet working again appears to be by turning the phone off and on. It does this 3 or 4 times a day. Also, whilst on the topic of internet problems, Google will often look to have loaded, but the location bit under the search box will never appear, nor will my default email address at the bottom of the Google homepage. When this happens whilst I can type in the search box, clicking the search button does nothing and can only be remedied, again, by turning off and on. This also happens a couple of times per day at least.

Secondly, since weekend, my phone has been 'crashing' (for want of a better word) mid-way through text messaging (very annoying if it's a long message as it doesn't save any progress). The screen will go black, signal will drop to nothing with a cross through it and then I'll be returned to the screen I was in previously. The same happens during calls - the phone will hang up, call will end, and the screen will go black with a line through the middle of it. I've had the phone since May and, as it's Orange branded, is still on 2.1. To be honest, overall I'm becoming fed up with it - seems to have more problems than it does positives at the moment, but I'm stuck with it for a while yet it would seem.

View 1 Replies View Related

Android :: Intent To Load Call Log

Oct 12, 2010

I am trying to locate the intent to load the call log view , does android platform provide that out of the box? the functionality that i am looking is just like picking a contact from address book , you can do that by using intent.ACTION_PICK and using the people content URI Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); It 'll show all the contacts of the system and on selecting one it 'll return the data URI of that particular contact by using callback if you start it by using startActivityForResult.

View 4 Replies View Related

Android :: Texts Are Not Adding To Intent For Email

Jan 31, 2009

I am sending image using following. the image successfully send by application. But The subject and text r not getting added to email.I want to add body containing some hyperlink, I am doing this Intent.EXTRA_TEXT but it is not going to added. Will somebody will clear suggest me for. None of EXTRA working (subject, title, text);

View 2 Replies View Related

Android :: Exclude Own Activity From Activity.startActivity - Intent

Oct 17, 2010

My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.

As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).

Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?

View 1 Replies View Related

Android :: SetContentView Fails / When Creating New Activity

Jan 19, 2010

My code is calling setContentView(R.layout.someLayoutID); from an activities' onCreate method. The activity is launched with the following: Code...

View 4 Replies View Related

Android :: Opening A Second Activity And Fails To Launch?

Apr 12, 2010

What i'm trying to do is to open an Activity when i click on a button.

This is my code in my main activity.

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

The program launches no problem when i just implement the first button (restuarant).

But when i try to implement the button that i have commented out it fails to launch. and yes i have added the activity to the manifest file.

View 1 Replies View Related

Android :: AsyncTask To Run On Activity Start Fails After Previously Getting Cancelled

Sep 10, 2010

I am using an AsyncTask to fetch the ring tone for a contact when my application starts, it works fine until after my Activity closes a couple of times during the AsyncTask, after this happens the AsyncTask will only ever get to onPreExecute() and never doInBackground, so I can never fetch the ringtone then until either a force stop or device restart.

Why this might be happening? Why the AsyncTask would get to onPreExecute but then never run doInBackground()?

Here is my code: (Following the Shelves source code)

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

And onAddRingtone() is used in onCreate and onCancelRingTone() is used in onDestroy() as well as where you can see if in the code above. I have spent 3 days on this and I haven't been able to find a solution? Am I taking the wrong approach? Using cancel wrong? Is there a bug?

View 1 Replies View Related

Android :: Handle Existing Instance Root Activity Launching Root Activity From Intent Filter

Apr 3, 2010

I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?

View 1 Replies View Related

Android :: Activity Does Not Load After First Run?

Apr 24, 2010

This is a silly question... but after following the instructions and running my application, I can't get it to run again. I hit run, the emulator opens up, and nothing happens at startup. When I attempt to launch the app from the applications menu, I get the old version of the app. Breakpoints etc. don't seem to do anything. Tried creating a new project altogether with different names for the activity, etc. and running that, still nothing.

View 2 Replies View Related

Android : Way To Get Activity From An Intent?

Nov 2, 2010

Is it possible to get the Activity from an Intent?

View 2 Replies View Related

HTC Desire :: Occasionally Mobile Data Fails To Re-engage / Solution For This?

Jul 23, 2010

I have an un-branded Desire with the latest HTC OTA firmware update and it's running on T-Mobile here in the UK. I have Web n'Walk so I get the full-speed HSDPA data service when it's in range.

I also use Google Maps Navigation a lot. The problem I notice is that sometimes after setting a new route the mobile data connection to download the route data fails to fire up. I can see the mobile signal strength bars, but no 3G or HSDPA signal indicators. And of course without the data connection the new route details don't get downloaded. I usually have to power off the phone and then re-power to get around this.

It doesn't happen consistently - sometimes no problems at all. And the problem seems unrelated to signal strength.

Does anyone else experience this and has anyone found a solution?

View 3 Replies View Related

Android :: Adding Animation In Activity Change

Aug 25, 2010

I have two Activities A and B . When i swithc between activity A to B the Activity b comes with 3d transition animation.when i press a back button in Activity B the Activity B exits with Animation.

View 1 Replies View Related

Android :: Activity Timeout On WebView Load

Aug 3, 2009

In my app I have to load external page into WebView-based activity. Some of my users with slower connections are reporting screen timeout while waiting for the page to load. What would be a good way of loading the page on backgorund thread and then refreshing the screen? Use HttpClient to fetch it and then use WebView#loadData? My fear is - the page I'm loading is pretty complicated there's some JS that happens on load - wouldn't I just mess it up? Is there an alternative way of doing what I need?

View 5 Replies View Related

Android :: Load Activity Before Loading All Images?

Oct 25, 2010

In my android application i am trying to download images from remote server dynamically ( no of images dynamically come ). for downloading all images it is taking 30 to 40 seconds mean time user has to wait to see the activity . But it is the worst case that loading activity after loading all images. I want to load activity first then load images one by one.

View 3 Replies View Related

Android :: Set Root Activity/intent ?

Oct 14, 2010

I'm switching between different Activities using Intents. For one Activity, I would like it to clear the history stack so when the user presses the back button, it takes them Home instead of previous activities in my application.

View 2 Replies View Related

Android : Way To Handl An Intent Without Activity UI?

Jun 9, 2009

I've searched for a few hours for a solution to this, so hopefully this isn't a repost I'm setting a shortcut on the Home screen which raises an Intent to my application - the problem is that I don't want to show my app, just run a little code and display a Toast notification. This must be possible - I just can't work out how.. Once I'm handling the shortcut Intent in onCreate() the UI has initialised and I get a little screen flicker if I then run my code and finish().

View 4 Replies View Related

Android : How To Use An Intent To Update An Activity?

Aug 24, 2009

I have a service that is downloading a file. When the download is done, I would like to update my "Downloaded files" list in my Activity, but only if the Activity is running. I do not want the Activity to start if it's not already running. I was hoping I could do this by making a new Intent with some special flag. Anyone have any idea how I can achieve this? A tiny code example maybe?

View 3 Replies View Related







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