Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Simple Problem With Intent Extras

Simple Problem With Intent Extras

Put your problem here if it does not fit any of the other categories.

Simple Problem With Intent Extras

Postby starnix17 » Mon Nov 30, 2009 5:08 pm

Hello,

I'm working on an app widget for the home screen. I'm trying to make it so when a user taps on the widget it changes the data being displayed in the widget. However, I'm also allowing multiple instances of widgets open with different data. So in order to tell my method which widget to update, I'm adding an extra to the intent that is launched to change the data.

Here's the intent I have:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. Intent changeData = new Intent("com.tonycosentini.mintdroid.CHANGE_DATA");
  3.  
  4. changeData.putExtra("widget_id", currentWidgetId);
  5.  
  6. PendingIntent changeDataPendingIntent = PendingIntent.getBroadcast(this, 0, changeData, 0);
  7.  
  8.  
Parsed in 0.016 seconds, using GeSHi 1.0.8.4


This correctly stores the widget id, but when the change data method is called, the widget id that is read from the intent is the first widget instance. That is, there is is a for loop that generates all of the widgets and no matter what widget you tap, the widget id that is recieved is always the first widget id in the first widget.

Anyone have an idea on how to solve this? Hopefully I didn't word it too poorly.

Thanks for reading,
Tony
starnix17
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Nov 30, 2009 5:01 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 8 guests