Problems with executing 'substring':

by Prabakar » Sun, 21 Feb 2010 21:20:01 GMT


Sponsored Links
 Hello,

I am wondering whether 'substring' support is there or not on Android 1.1 
minimum SDK set in Eclipse project. Actually i installed Android 1.6 SDK.
I use the following parse function, where-in i use 'substring' for few places. 
I am not getting any result from the 'substring' code and it jumps to 
Timer.class file to show 'The JAR of this class file belongs to 'Android 1.1 
which does not allow modifications to source attachments on its entities' etc. 
message, when debugging 'substring' line of code. 
I don't know why it is not executing 'substring' line of code in my below 
function and jumps to show such message like that to me?
Note: This function is under Timer running code.

private String parseContentsString(String inputDataStr)
 {
 String parsedOutput = null;
 int i = 0;
 int nameIndEnd = 0;
 int startIndex = 0;
 int endIndex = 0;
 
 i = inputDataStr.indexOf("TickerTxt>");
 if (i != -1)
 {
 nameIndEnd = inputDataStr.indexOf("", i);
 if (nameIndEnd > 0)
 {
 startIndex = i + 10;
 endIndex = nameIndEnd - startIndex;
 parsedOutput += " ";
 parsedOutput = inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }
 }
 while ((i = inputDataStr.indexOf("name=", i)) != -1)
 {
 nameIndEnd = inputDataStr.indexOf("target=", i);
 startIndex = i + 5;
 endIndex = (nameIndEnd - 2) - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }
 i = inputDataStr.indexOf("<B>", i);
 startIndex = i + 3;
 nameIndEnd = inputDataStr.indexOf("</B>", i);
 endIndex = nameIndEnd - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 } 
 i = inputDataStr.indexOf("font color=", i);
 i = inputDataStr.indexOf(">", i);
 startIndex = i + 1;
 nameIndEnd = inputDataStr.indexOf("", i);
 endIndex = nameIndEnd - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }  
 i = inputDataStr.indexOf("", i);
 startIndex = i + 12;
 nameIndEnd = inputDataStr.indexOf("%]", i);
 endIndex = (nameIndEnd + 2) - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ; ";
 }
 i++;
 }
 return parsedOutput;
 }
 
Could someone help me on get rid of this problem and to execute 'substring' 
successfully?


Martin.



      

--



Problems with executing 'substring':

by Prabakar » Mon, 22 Feb 2010 02:39:56 GMT


 UPDATED: I tried putting this code in onCreate place itself directly instead of 
under Timer code as i said earlier, and found that it throws message as "source 
not found - ThreadGroup.class file" when crossing 'substring' line of code. 




From: Prabakar <prabhu_mp...@yahoo.com>
Subject: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Sunday, February 21, 2010, 6:49 PM

Hello,

I am wondering whether 'substring' support is there or not on Android 1.1 
minimum SDK set in Eclipse project. Actually i installed Android 1.6 SDK.
I use the following parse function, where-in i use 'substring' for few places. 
I am not getting any result from the 'substring' code and it jumps to 
Timer.class file to show 'The JAR of this class file belongs to 'Android 1.1 
which does not allow modifications to source attachments on its entities' etc. 
message, when debugging 'substring' line of code. 
I don't know why it is not executing 'substring' line of code in my below 
function and jumps to show such message like that to me?
Note: This function is under Timer running code.

private String parseContentsString(String inputDataStr)
 {
 String
 parsedOutput = null;
 int i = 0;
 int nameIndEnd = 0;
 int startIndex = 0;
 int endIndex = 0;
 
 i = inputDataStr.indexOf("TickerTxt>");
 if (i != -1)
 {
 nameIndEnd = inputDataStr.indexOf("", i);
 if (nameIndEnd > 0)
 {
 startIndex = i +
 10;
 endIndex = nameIndEnd - startIndex;
 parsedOutput += " ";
 parsedOutput = inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }
 }
 while ((i = inputDataStr.indexOf("name=", i)) != -1)
 {
 nameIndEnd = inputDataStr.indexOf("target=",
 i);
 startIndex = i + 5;
 endIndex = (nameIndEnd - 2) - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }
 i = inputDataStr.indexOf("<B>", i);
 startIndex = i +
 3;
 nameIndEnd = inputDataStr.indexOf("</B>", i);
 endIndex = nameIndEnd - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 } 
 i = inputDataStr.indexOf("font color=",
 i);
 i = inputDataStr.indexOf(">", i);
 startIndex = i + 1;
 nameIndEnd = inputDataStr.indexOf("", i);
 endIndex = nameIndEnd - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ";
 }
  
 i = inputDataStr.indexOf("", i);
 startIndex = i + 12;
 nameIndEnd = inputDataStr.indexOf("%]", i);
 endIndex = (nameIndEnd + 2) - startIndex;
 if (i > 0 && nameIndEnd > 0)
 {
 parsedOutput += inputDataStr.substring(startIndex, endIndex);
 parsedOutput += " ;
 ";
 }
 i++;
 }
 return parsedOutput;
 }
 
Could someone help me on get rid of this problem and to execute 'substring' 
successfully?


Martin.





      



--


Sponsored Links


Problems with executing 'substring':

by Prabakar » Mon, 22 Feb 2010 04:25:51 GMT


  could able to resolve 'source not found' problem after following the steps 
mentioned in the following link:
http://android.opensourceror.org/2010/01/18/android-source/

But still 'substring' doesn't work. It does nothing there seems to be, don't
know why?

--- On Mon, 2/22/10, Prabakar <prabhu_mp...@yahoo.com> wrote:

From: Prabakar <prabhu_mp...@yahoo.com>
Subject: Re: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Monday, February 22, 2010, 12:09 AM

UPDATED: I tried putting this code in onCreate place itself directly instead of
under Timer code as i said earlier, and found that it throws message as "source
not found - ThreadGroup.class file" when crossing 'substring' line of code.

--- On Sun, 2/21/10, Prabakar <prabhu_mp...@yahoo.com> wrote:

From: Prabakar <prabhu_mp...@yahoo.com>
Subject: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Sunday, February 21, 2010, 6:49 PM

Hello,

I am wondering whether 'substring' support is there or not on Android 1.1
minimum SDK set in Eclipse project. Actually i installed Android 1.6 SDK.
I use the following parse function, where-in i use 'substring' for few places.
I am not getting any result from the 'substring' code and it jumps to
Timer.class file to show 'The JAR of this class file belongs to 'Android 1.1
which does not allow modifications to source attachments on its entities' etc.
message, when debugging 'substring' line of code.
I don't know why it is not executing 'substring' line of code in my below
function and jumps to show such message like that to me?
Note: This function is under Timer running code.

private String parseContentsString(String inputDataStr)
{
String
parsedOutput = null;
int i = 0;
int nameIndEnd = 0;
int startIndex = 0;
int endIndex = 0;

i = inputDataStr.indexOf("TickerTxt>");
if (i != -1)
{
nameIndEnd = inputDataStr.indexOf("", i);
if (nameIndEnd > 0)
{
startIndex = i +
10;
endIndex = nameIndEnd - startIndex;
parsedOutput += " ";
parsedOutput = inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
}
while ((i = inputDataStr.indexOf("name=", i)) != -1)
{
nameIndEnd = inputDataStr.indexOf("target=",
i);
startIndex = i + 5;
endIndex = (nameIndEnd - 2) - startIndex;
if (i > 0 && nameIndEnd > 0)
{
parsedOutput += inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
i = inputDataStr.indexOf("<B>", i);
startIndex = i +
3;
nameIndEnd = inputDataStr.indexOf("</B>", i);
endIndex = nameIndEnd - startIndex;
if (i > 0 && nameIndEnd > 0)
{
parsedOutput += inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
i = inputDataStr.indexOf("font color=",
i);
i = inputDataStr.indexOf(">", i);
startIndex = i + 1;
nameIndEnd = inputDataStr.indexOf("", i);
endIndex = nameIndEnd - startIndex;
if (i > 0 && nameIndEnd > 0)
{
parsedOutput += inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}

i = inputDataStr.indexOf("", i);
startIndex = i + 12;
nameIndEnd = inputDataStr.indexOf("%]", i);
endIndex = (nam



Problems with executing 'substring':

by Prabakar » Mon, 22 Feb 2010 20:04:33 GMT


  resolved substring problem. It was my mistake that 'substring' 'endoffset' 
value was wrong.
"substring(startIndex, endIndex);"

Martin.

--- On Mon, 2/22/10, Prabakar <prabhu_mp...@yahoo.com> wrote:

From: Prabakar <prabhu_mp...@yahoo.com>
Subject: Re: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Monday, February 22, 2010, 1:55 AM

I could able to resolve 'source not found' problem after following the steps
mentioned in the following link:
http://android.opensourceror.org/2010/01/18/android-source/

But still 'substring' doesn't work. It does nothing there seems to be, don't
know why?

--- On Mon, 2/22/10, Prabakar <prabhu_mp...@yahoo.com> wrote:

From: Prabakar <prabhu_mp...@yahoo.com>
Subject: Re: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Monday, February 22, 2010, 12:09 AM

UPDATED: I tried putting this code in onCreate place itself directly instead of
under Timer code as i said earlier, and found that it throws message as "source
not found - ThreadGroup.class file" when crossing 'substring' line of code.

--- On Sun, 2/21/10, Prabakar <prabhu_mp...@yahoo.com> wrote:

From: Prabakar <prabhu_mp...@yahoo.com>
Subject: [android-beginners] Problems with executing 'substring':
To: android-beginners@googlegroups.com
Date: Sunday, February 21, 2010, 6:49 PM

Hello,

I am wondering whether 'substring' support is there or not on Android 1.1
minimum SDK set in Eclipse project. Actually i installed Android 1.6 SDK.
I use the following parse function, where-in i use 'substring' for few places.
I am not getting any result from the 'substring' code and it jumps to
Timer.class file to show 'The JAR of this class file belongs to 'Android 1.1
which does not allow modifications to source attachments on its entities' etc.
message, when debugging 'substring' line of code.
I don't know why it is not executing 'substring' line of code in my below
function and jumps to show such message like that to me?
Note: This function is under Timer running code.

private String parseContentsString(String inputDataStr)
{
String
parsedOutput = null;
int i = 0;
int nameIndEnd = 0;
int startIndex = 0;
int endIndex = 0;

i = inputDataStr.indexOf("TickerTxt>");
if (i != -1)
{
nameIndEnd = inputDataStr.indexOf("", i);
if (nameIndEnd > 0)
{
startIndex = i +
10;
endIndex = nameIndEnd - startIndex;
parsedOutput += " ";
parsedOutput = inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
}
while ((i = inputDataStr.indexOf("name=", i)) != -1)
{
nameIndEnd = inputDataStr.indexOf("target=",
i);
startIndex = i + 5;
endIndex = (nameIndEnd - 2) - startIndex;
if (i > 0 && nameIndEnd > 0)
{
parsedOutput += inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
i = inputDataStr.indexOf("<B>", i);
startIndex = i +
3;
nameIndEnd = inputDataStr.indexOf("</B>", i);
endIndex = nameIndEnd - startIndex;
if (i > 0 && nameIndEnd > 0)
{
parsedOutput += inputDataStr.substring(startIndex, endIndex);
parsedOutput += " ";
}
i = inputDataStr.indexOf("font color=",
i);
i = inputDataStr.indexOf(&q



Other Threads

1. List onItemSelectedListener not working

Hey Guys,

While working with fragments i am trying to have one list in left panel and
detail fragment in right side of it.
I have my first item item already selected as soon as i launch app. And
"SHOULD HOLD ITS SELECTED STATE"
I tried using onItemSelectedListener with setSelection(0), but it didn't get
called. Any one knows the reason?

Reg,
Varun

-- 

2. How to mark touch points in an image

Hi,
In my project there is an image. When user touches any place in image
it should be marked with a cross sign. Also we have to clear this
crosses on button click. I managed to display the image. What i have
to do in the ontouchlistener() function to display the  cross point??


pls help???

-- 

3. Licensing Service

4. what's the unit of "setStrokeWidth()" (dp or pixel)

5. [WTA] A2SD+ benarkah bikin boros?

6. [oot] happy bday suhu muda lutfi.

7. Code an Education Revolution (@Qykno) in 54 hours! Location:聽San Francisco Bay Area