Go Back   Android Forums > Android Development > Application Development > App Inventor

test: Reply
 
LinkBack Thread Tools
Old January 9th, 2011, 06:29 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jan 2011
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Confused Closing Media player through activity starter?

Hey guys,

I am building an app where the user can click a button, choose an audio file and then play that audio file on demand by clicking a button. A label would display the file path to the audio file.

I found I needed to use the activity starter to launch an existing file browser, only problem is that when I click on my desired sound file, it will play it. After hitting the back button a few times, I get back to my app screen but the file path isn't displayed.

I suppose this is 2 questions.

Does anybody know How I can kill the media player and go back to my App ?
I have tried Close Screen with Result, the best I got with it was, closing MY app's screen with I hit back, not exactly helpful lol.

And does anybody know why I cannot display my file path. I have tried Set Text as Resultname/DataUri/ResultUri but neither of them seem to work.

any help would be greatly appreciated.
Thanks for your time.

Advertisements
ClassixUK is offline  
Reply With Quote
sponsored links
Old January 9th, 2011, 08:57 AM   #2 (permalink)
Junior Member
 
tAIIC's Avatar
 
Join Date: Dec 2010
Posts: 29
 
Device(s): HTC EVO 4G
Carrier: Not Provided

Thanks: 0
Thanked 2 Times in 2 Posts
Default

1) The close screen blocks are only meant to close your app, hence the result. Hardware button access is also not supported yet. Also, when you open another app, your app does not pass any controls so you are at the mercy of how that app exits. Usually you can get back to your app with the back key. I have noticed that if you exit your app using the home button, it remains running in the background. Need to install on device for this.

2) Why not just set the label.text to the .text value of the component holding the file path variable?

I know the answer to the first question isn't what you're looking for, but hopefully the second will help.

Gene
App Inventor Info Center
tAIIC is offline  
Reply With Quote
Old January 9th, 2011, 11:00 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jan 2011
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by tAIIC View Post
1) The close screen blocks are only meant to close your app, hence the result. Hardware button access is also not supported yet. Also, when you open another app, your app does not pass any controls so you are at the mercy of how that app exits. Usually you can get back to your app with the back key. I have noticed that if you exit your app using the home button, it remains running in the background. Need to install on device for this.

2) Why not just set the label.text to the .text value of the component holding the file path variable?

I know the answer to the first question isn't what you're looking for, but hopefully the second will help.

Gene
App Inventor Info Center
Thanks for your response, the media player issue isn't a problem if I could pass back the correct path but all the methods I have tried do not work, what would you expect to carry the location ?
I have tried:

ResultUri,DataUri,ResultName

but they all return nothing, when I run adb logcat it says result = 0

what would you suggest ?

Thanks again
ClassixUK is offline  
Reply With Quote
Old January 9th, 2011, 01:53 PM   #4 (permalink)
Junior Member
 
tAIIC's Avatar
 
Join Date: Dec 2010
Posts: 29
 
Device(s): HTC EVO 4G
Carrier: Not Provided

Thanks: 0
Thanked 2 Times in 2 Posts
Default

I just re-read your original post again. I think I misunderstood. You are opening the file browser and picking a file. You want to take that selection and write it to a label.text. Correct?

Are you using activitystarter.afteractivity to set .text to the result?

If that doesn't work for you, I recommend also posting on the official AI forums.
App Inventor for Android

Gene
App Inventor Info Center
tAIIC is offline  
Reply With Quote
Reply
Tags
activity, app, browser, button, close, file, google, inventor, media, result, sound, starter


Go Back   Android Forums > Android Development > Application Development > App Inventor
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:05 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.