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. MMS

HI,,,,

          Using content provider("content://mms/" ,,,, "content://mms/
part") i am getting MMS details.i.e., Subject, Txt Message,
Attachment. These details are getting from SQLite database. Same like
how can getting mms sender,receiver phone number. In SQLite DB, we
have "addr" table. its containing sender, receiver phone number. But
whenever i try to access this table("content://mms/addr"), the cursor
value is null. How can getting mms sender/Receiver phone number???


Thanks,
Chitra

-- 

2. (WTA) Diag Mode HTC incredible

Malem semua,

Mau tanya ada yg punya driver diag mode HTC incredible ??? mau coba inject
begitu di bikin diag mode ##3424 koq ngga ke install ya..

Thanks

-- 
"Indonesian Android Community [id-android]" 

3. Soner X10i tdk konek internet

4. Need your expertise on Tab control

5. PV Decoder output buffer management with MIO node

6. Force Close when trying to use getApplication()

7. someone please help me with these issues.