casio freas

+ Follow
since May 16, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by casio freas

hello all,
i'm an android beginner/intermediate programmer.

I encountered a big problems were not resolved almost 1 week.
i creating of an android app sms auto responder were using BroadcastReceiver to catch

what i doing is almost haven't problems at all, and running well
except on part of transfering process data from bundle sms to

the permission on manifest i already input :

on above code i using

it used for function 1st priority sms receiver, and also to override so that other applications do not read and save the sms input.
the app were i created is using more than 3 activity, and using bluetooth service receiver (those part is working well, so ti doesn't need to showed here).

the MainActivity are the central function control for enable/disable the bluetooth service, reading databases, and others.
so the smsReceiver start working after i installing the app and also start the MainActivity.
these some part state method oncreate, onstart, onpause, onstop, etc in MainActivity :

OnStart state :

On Start there a timer using to viewing and update data from databases :

Onresume part:

OnStop :

For receiving sms i using SmsReceiver as BroadcastReceiver, here the codes :

here the code DisplaySmsPrompt class for processing the incoming sms as an Activity :

i have tested as separate app only using class broadcastreceiver, Activity, single layout xml, & database helper (by implementing as SQLiteOpenHelper)
as an sms app (receiving and storing data to SQLite db) and it works fine,
after receiving sms, the mainActivity (only single Activity) displaying the sms and stored the sms data.

but after i implementing in more complex app, the sms broadcastreceiver success receive the sms and also success sending to DisplaySMSPrompt Activity (showing log at on create and resume state )
but the Activity SMSLogAdapter has stopping work (just displaying blank and the textview not displayed) then it gets launch timeout, here are logcat :

i also trying implementing PARTIAL_WAKE_LOCK to avoding the sms receiver activity not dead, but it useless too, it get same problem.
as in part :

i guess some of my mistakes are the implementing double multi intent filter as MAIN LAUNCHER, as showed on above XML. but i also try change it using single MAIN LAUNCHER just
for MainActivity and for DisplaySmsPrompt Activity just implementing intent filter action VIEW :

what part were i wrong implementing the broadcast/activity, or others ?

as far as i know, i doesn't found any documentation/forum (that implementing broadcast receiver on Activity more than one) were maybe related of this problem.

i hope someone had the solution, and gave fast reply. Because, I need to resove these problem to get finish the app before deadline in 2 days later.


thank you.
10 years ago
thanks for the advice for using "adb logcat". but still almost all the XML data can be readed,
and other tag part can't be readed, those are :

on part "startElement" method i use logical "if" rather than "else if" because some part called twice, an some part be skipped (i also commented and ask from the suspicious alogarithm at some line that maybe wrong ) :

and on endElement method i use (i think these part doesn't have wrong alogarithm) :

then on characters method i use :

and last is the fact log from "adb logcat" :

i very appreciate of your assistance to resolve my problem.

11 years ago
thanks for advice, i have inserting the function in "characters" method :

and correcting the others. Then the fully code (as WorldWeatherHandler.class), become like these :

but after compile. it result doesn't gave output value (from the android app), the display like these :

these are output display before i modify it (from the original source using API yahoo wheather) :

how to substitute "System.out.println(ch)" method ?
since android doesn't have an the console output.

i have try using sample code from, to using "println" but it can't compile/run.
i hope you know how to made /know the samples code standard java of implementing class org.xml.sax for parsing XML data.

and what are the mistakes from my code of reading those above XML structure ?
11 years ago
hello everyone. i beginner in android & java programming.

i'm trying build some weather report apps for Android.
i think (i do) the easiest way to modifying the WeatherReporter project from ebook Unlocking Android - A Developer’s Guide, Manning because the project are using API Yahoo Weather (those only works on US region only). instead of, i rather use other Weather API from that available international weather report data.

1. the problem is i'm still beginning learning parsing XML data using package org.xml.sax as SAX handler for API bean.

these the request URL format (to able accessing it, needed to register for free) :
sample :

(the key are my registered ID number, it required in every request)

then it gave XML data bean :

after i learning from some manual (because the site/owner API only gave .NET sample code, instead implemented in java), i modify the Handler class to able working for API
these are the code :

the every text data can be read it using getAttributeValue method.
i admit that the code doesn't work to read the API from.

but those code the best i know to resolve it or knowing other manual that have solution reading for those similar XML data.
i hope anyone can help to resolve these problem , at least the right way to read data x inside every element and on sub element :

and i hope someone gave manual reference with sample code to reading XML data for implemented in android/java.

the i want to ask how to pasing XML data from
these are the XML data

2. next i want to ask how to change the string link using local data from res/drawable/image.png instead downloading image from a web URL (from

these are the code :

i've try change

by using

those i realize, it just gave integer value output because from generated class

how to change it to locally accessed as link URL name ?
or are able to mixed using cache handlers of sprites /drawables

i hope someone respond it sooner.
last, sorry for my bad english
11 years ago
hello everyone,
i want to develop an J2ME application on mobile communication with PC as server, and the server are able to connecting with
other mobile app too (data collection, remote sensing on smart homes).
I've been develop some standalone J2ME app (such as games, tools).
and I've learn how to communicate using bluetooth connection.

I've been searching samples code, from the open source projects.
such as JM2PC (
and Moccatroller (

after i learn from the code. i still doesn't understand the communication.
are everyone have some complete source code application to communicate using Http and sending data (text, Image or video from PC to phone, and opposite direction).

please reply ASAP, i need in hurry.
11 years ago