Niko Gamulin
Niko Gamulin

Reputation: 66555

Android: Intent problem

Debugging the following piece of code I get "Source not found" notification which probably means some variables are not set:

btnEdit.setOnClickListener(new View.OnClickListener(){

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(v.getContext(), DlgTitleTags.class);
            intent.putExtra(Client.STORED_TITLE, mTitle);
            intent.putExtra(Client.STORED_TAGS, mTags);
            startActivityForResult(intent, SHOW_SUBACTIVITY_TITLE_TAGS);

        }

    });

Here intent is successfully created and all other varables are set as well so I'm still trying to figure out what causes the problem.

I noticed the log messages:

07-28 13:29:09.642: DEBUG/dalvikvm(56): GC freed 2010 objects / 86744 bytes in 230ms
07-28 13:29:14.861: WARN/WindowManager(56): Key dispatching timed out sending to dev.client.android/dev.client.android.DlgEditFile
07-28 13:29:14.862: WARN/WindowManager(56): Dispatch state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} @ 1248780547618 lw=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} lb=android.os.BinderProxy@43449e78 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false}}}
07-28 13:29:14.862: WARN/WindowManager(56): Current state:  {{null to Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} @ 1248780554868 lw=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} lb=android.os.BinderProxy@43449e78 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false}}}
07-28 13:29:14.872: WARN/WindowManager(56): Continuing to wait for key to be dispatched
07-28 13:29:15.212: INFO/ActivityManager(56): Starting activity: Intent { comp={dev.client.android/dev.client.android.DlgTitleTags} (has extras) }
07-28 13:29:15.522: WARN/ResourceType(1647): Failure getting entry for 0x7f030005 (t=2 e=5) in package 0: 0xffffffb5

I would really appreciate any help in solving the problem.

Upvotes: 4

Views: 4799

Answers (2)

carbonr
carbonr

Reputation: 6067

  1. open the AndroidManifest.xml
  2. at the bottom add another Activity
  3. once added, click the activity and on the right side besides Name
  4. click browse and select the other class file (.java file)

Upvotes: 1

reflog
reflog

Reputation: 7645

most likely your activity DlgTitleTags is not defined in the Manifest.

Upvotes: 4

Related Questions