2014년 12월 24일 수요일

Please help Me

Dear App Inventor,

Please let my package to make build up and it says sorry it cant be packaged because your file is larger than 5 MB My current Package MB is 23,58MB Can you help me to make it please



In AI2 on the Internet the aia can not be larger than 5Mb. You may have put images or other resources in your Media (resources) that you do not use in the app. 
 All the images and sounds in resources count toward the 5Mb limit along with the source code.    You can program 
apps larger than 5Mb in the browser, but the apps will not compile and might not run in the 
emulator or the project may not save as an aia. If this is the case you need to reduce 
the size of your image and/or sound files.   Most image files can be made quite small 
by re-sizing them using a photo manipulation program on your PC to less than 50Kb each.



Actually I wanted to build a music mp3 player so I uploaded the mp3 files through it that's why



Taifun presents this solution  http://puravidaapps.com/filebyfile.php



I could not understand this



you have several options and these are all described here

How to overcome the App Inventor project limit of 5 MB



How to add share button on my app and how to add splash screen to my app?

How to add share button on my app, so that users can use pre installed apps on their phones (e.g. whatts app, sms, Line, Facebook etc...) to share and spread my app. & i have complete my app. Now i want to add splash screen of 2-3 second before start of my app. how to do that?




you can use the Sharing component to share for example a link to your app on Google Play

concerning the Splash Screen, Screen1 is always the first screen, but you can "move" the screens using this method: copy Screen1 to Screen2, then remove all blocks in Screen1 and add your Splash screen logic there

How to copy screens by  Scott and a video by  Hossein


Is it possible to set in - app time

I am building an app for a game server, within the app I would like to have a countdown timer for showing when the server restarts (every 4 hours) I have made the app and it works beautifully but the only issue I have is that it works from the time on my device (GMT+0) obviously if another person living in any other time zone should use the app it would be inaccurate.

What I wanted to know was: Is it possible to set the time in the app to be GMT+0 regardless of where you are in the world?



you could get that time from an API, for example this one https://developers.google.com/maps/documentation/timezone/ or do a Google search for other APIs




Maybe a good idea for someone who knows what they are doing! Lol. I have no idea how to set something like that up. Are there any other ways of doing it that are more simple?

Merry Christmas!



Simple?   App Inventor is not simple, it is merely convenient to use to program for a small subset of things that can be done on an Android device.

Here are different ways programmers using other various Android languages can determine the time zone of the device an app is being run on.  https://www.google.com/search?q=android+find+time+zone&oq=android+find+time+zone&aqs=chrome..69i57.4415j0j7&sourceid=chrome&es_sm=93&ie=UTF-8

How you get that information to work with Ai2 is your holiday assignment Jon.  Do some reading about it, have some fun and when you get a solution, post your conclusions.

Merry Christmas,



to work with APIs is not too complicated, see also


how to make android mobihone battery level indicator application???


hello sir i want to make application which is so my current phone battery level.

-- 

probably you can do it using the Activity Starter, for more info see 

--
i just want to get my battery level in percentage

--
you can't get it with App Inventor directly

--

Published game apps not working but showing in google play


I have published two free game apps created by students, the .apk files downloaded fine and was able to publish. They went live on google play and you can see them on there. However after you have downloaded them on android phones you go to open and it comes up with an error message stating the game has had to close. Any idea why this is happening and why you can't actually use the download?

-- 

before uploading an apk file to Google Play, let me recommend to test it first on a device...
do you get the same problem then? whaat is the size of the apk file?

--
The file size is is 4.33 MB they have been tested on  5 different android devices pre upload to google play and they worked fine so that's why it is is confusing the apps are VirtualWOW and LightUpWOW any help most appreciated

--
what you can do after downloading the app from Google Play is to find out, why it force closes. You can use logcat for that, see also

--
I just tried that for you, see screenshot,


I'm not sure, but as far as I understand the error message it seems to be, there is an image with size = 0 inside the app, but maybe I'm wrong?
probably someone from the MIT developers can help?

12-18 10:59:06.255: E/AndroidRuntime(8844): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

12-18 10:59:06.255: E/AndroidRuntime(8844):  at com.google.appinventor.components.runtime.Canvas$CanvasView.onMeasure(Canvas.java:467)
12-18 10:59:06.255: E/AndroidRuntime(8844):  at android.view.View.measure(View.java:17430)

meanwhile you could open the aia file, then go to the folder assets and check, if there are assets with size = 0, see also example screenshot...
as you know, there have been problems with zero sized assets lately...


Thanks so much I will try all of this tomorrow, not techy enuff for this stuff, but really appreciate your help.

--
I can not find the problem in either of the apps and it's weird that it is both as they we're build by two different students, shall I re upload them onto google play to see if that makes a difference? Really annoying as the students are having a launch party on January 13th.....

--
What I would do with both apps is:

Load them in Ai2.
Remove all items in Media  ... delete all of them, one by one
Replace all items in Media
Make an apk
Then email the apk to yourself and the open it on the phone.  To test to see if it runs on the phone.
   Here is how to do that:  
If  the 'fixed' app runs on the phone,  then resubmit to Google Play...you will have to change the version number (as mentioned in the above link because Google Play is fussy).
If not, tell us what you did.

If you re-instantiate all the media, you do not have to go through the process of checking for 0 bytes images.  MIT believes the problem that 0 bytes caused with compiling and sometimes corrupting the apk (where the app may run on the live development  and it might not run on a device)  has been fixed.  The problem started on the 11th December and is now fixed (19 December).    If the apk's the students submitted were compiled within that window, the above should fix the issue.

Hint:  ALWAYS test an apk on a device BEFORE submitting it to Google Play.

--
Thanks so much for your help, will give this all a go and let you know. Thanks :-)

--
Steve, have had a look at this, only problem is if I delete all the media it will delete all from the blocks and as I didn't create it the students did I would not have a clue how it was originally set. There is quite a lot of media. Also the .apk files were tested on a mobile phone using a file manager system and they worked fine before Google play upload two weeks ago. Any thoughts be appreciated. Thanks, may need to pay a pro a fixers fee if can't get it sorted :-)

--
Then just upload the clean files over the files in Media.  ...and yes there are issues.    If this is a zero bytes issue,  you can do what Taifun suggests earlier in the thread or  replace all the files, even the ones that are not zero bytes

The other way to get the project to compile properly is to use the aia source files.   Delete the current project, then re-install it from an aia.   You do have aia's?

If you do not have aia's, there is no way you can get these projects to a third party that I am aware of.

The problem is probably related to this:  Problems loading projects? 

The apps are the apps are VirtualWOW and LightUpWOW   ... to attempt a 'restore' by MIT, MIT would need the student's log ins (because they have to be able to find the files); ift MIT can do anything, you (or the students) are still going to have the issue in that the students will  have to replace the files from their master image folder (or wherever they stored the originals).    Yes, painful.

Why don't you try"

--
Firstly how do I upload the clean files in media?

I do have the .aias as students have emailed them to me

So basically I upload the .aia as a new project, then save it and then render it to make a .apk file then email that to my phone and test and if works then delete the first release on google play and re release

--
As Steve said, you would have to go into the project, and add each piece of media again.  You would have to have access to all original media files... photos, graphics, sounds, videos etc.

Once you have reloaded all of the media, you should be fine again.

--
Erica you are correct.    If the aia file was created before the 0 byte image problem on the Google Server occurred, all you got to do is use the aia..
If the aia was created during the period Dec 11-18, you will have to delete files and then replace them.

I would load an aia as a new project, compile it and cross your fingers.  Test it on the emulator/WIFI, if it is OK, then compile an apk.   Email the apk to yourself, load it on your device and make sure it runs.    If it is perfect, load on Google Play...you will have to change the Project's version number to allow the 'fixed' version to load (possibly you should change the version after you load the aia to be sure).     If the compiled app still has problems, you will have to go the painful route.  
How to load the clean files to media?  Here is an example using the Hello Purr tutorial..it loads an mpg file, the other file types load the same way.  Very good you have the original images etc.

Modified by SteveJG.   Under the Media pane, Click Upload New... (#2) Browse to the location of the meow.mp3file  and other student's images and upload these to theproject (#3). Under the Properties pane, see that the Source property currently says None.... Click the wordNone... to change the Sound1 component's Source to meow.mp3 (#4).



To delete the existing files, go to the button that shows Upload File ...look above, here there is a file called kitty.png ... you won't have that but will have a list of the student's files.  Left click on one of them; when a pop up shows, select Delete.   The file is deleted.   Another way to do this is just to use the Upload File button and upload the clean files ..the app will balk and ask, do you really want to replace an existing file... ignore the message and replace.

--
Great thanks Steve and all, guess what I am going to be doing on Christmas Eve.?.. Will give that a go and if not then the students will have to sort when schools first back. Appreciate your help. 

--
Hi Steve , the great news is that it works perfectly well so that is all good, however in google developer console the uploading has failed, I have changed the version code of the app within MITAi2 but it still won't upload. Is this because I have unpublished the one that didn't work and it just takes time to clear or is it because I am not the student who was the developer? Can I just publish from scratch with a new key vide, will this solve the issue? 

--
Very glad you got the projects to work.    Your Google Play questions "the uploading has failed, I have changed the version code of the app within MITAi2 but it still won't upload. Is this because I have unpublished the one that didn't work and it just takes time to clear or is it because I am not the student who was the developer? Can I just publish from scratch with a new key vide, will this solve the issue?"    I don't know.   I expect the issue  might be you are not the 'owner'  of the app but I do not know or it does not associate you with the developers account for the project.

You could change the names of the apps and you can republish under your account (if you have a Google Play Developer account).  You could do that by Projects > Save project as ...     and instead of  GreatStudentApp call it  FantasticStudentApp   (as an example)... Google has some 'funny' rules and they may decide you are guilty of plagiarism however.  So, perhaps, the students will need to resubmit. There are several guys here who are very knowledgeable about GP and I expect one will provide some advice (I'll send a note to one).

--
Ok we only have one developer account and they were both published under this account but the students were the developers of the app, so this is why I am not sure why it is not letting me as in Mit I have changed the project name to VirtulWOW2 thinking this makes sense as version 2 but it still does not like it. The only thing I can think of is that I am logged into MIT and my login is different to the students as they were the developers. Hope that makes sense. Erica.

--
 I have changed the version code of the app within MITAi2 but it still won't upload

you always have to change both, version code and version name
do you get an error message?

--
Yes the error message states upload failed, you need to assign a new version code as this one already exists.
However I get this message even when uploading a file where I have changed the name. If I have to change a code as well as file name, where do I do this. If not I  am wondering if I need to change it elsewhere or actually just wait for google play to unpublish the app before re uploading as it says it can take hours.....

--
as already said, you always have to change both, version code and version name
see also screenshot below
--
Thanks Taifun, I will give this a go next week after the festive period, but thankfully no bug and this is all I have to do now. Has given me brain ache. 

--
Hi I have changed the version code but I still get this error message, any idea where I put the existing certificate?

The below is my error message 

Upload failed
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: D3:48:F5:EA:22:60:23:46:55:A6:A7:5C:7E:65:CF:38:17:DF:79:A2 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: 96:0D:C3:73:EC:62:4A:3E:91:11:F4:83:22:F5:74:DC:8A:DB:31:5C ]


Your APK needs to have the package name appinventor.ai_jamie_richardson.VirtualWOW1.

--

1. did you log in to App Inventor using the account of jamie_richardson? 
2. did you rename the project name?

if you want to upload a new version of the same project, the login (jamie_richardson) and the project name (VirtualWOW1) must stay the same, only version code and version name must be updated!

But probably easier for you is to unpublish both apps in the Developer Console and upload them to Google Play as new apps.

--
No I don't have students login only my own. So if I unpublish. Can I republish both apps on my login?
Thanks for getting back to me.

--
but you will get another package name then

--
Thanks have managed to publish, you guys are really helpful on here so I really appreciate your support. Awesome Forum :-)

--

adding a text file to my project

i'm trying to add a text file that will be part of my project and will be packaged with my APK file
i have manage to upload the text file 
however when i try to acces it i get error 2101 file could not found

i need this preloaded data to be part of me app

any ideas?



How do you access it? Please post screenshot of relevant blocks.


Is it possible to freeze Horizontal Arrangement on top of the screen?

I want freeze horizontal arrangement on top of my screen other part of the screen is scrollable ... should it is possible??



Sorry not currently possible. Star issue 2150 herehttps://code.google.com/p/app-inventor-for-android/issues/detail?id=2150&q=scroll&colspec=ID%20Status%20Summary%20Owner%20Reporter%20Stars



Ok.. 
Thanks


Help connect internal DB

I have a MS SQL db in my office internal server.

I would to create a table or send some data or update the data of  my big database, in something on internet where my app can connect and download fresh entry.

Unfortunately my intranet access in internet only at port 80.

Can you help me?



Do you have some one at the office who can add a web server front end to the DB to receive requests from web browser?



I could reach my server with a special APN in our sim with 3g protocol!


Ok resolved connectivity but, how protocol or procedure i use to download db data with my app?


I lost all my work!

My project blocks disappeared!!! My app name is Pet Painting and project  digitaldooding  
Can you please help!!
my email is shakked.z@gmail,com



Before we try to recover your project, try these things:

Go tot he blocks editor... right click in the white space, and choose "Arrange Blocks Horizontally" and see if your blocks come back.


problem in duplication screen

problem in duplication screen

I downloaded the file on the local PC .aia
I renamed the file in .zip
I extracted the contents
I entered in the src \ AppInventor \ myaccount \ myapp \
I created a copy of the 3 rows of a screen that I wanted to duplicate
I created again the zip file
I renamed the zip in .aia
I imported the files into the app inventor 2 completed

** I get the error message **
the selected project is not a project source files! Project source files arefiles Hague

while the original file .aia imports it without problems, the only thing that has changed between the two files .aia is the addition of this new screen

for you what's the problem?



Did you use Scott's method to duplicate a screen?  He demonstrates two methods here   https://groups.google.com/forum/#!searchin/app-inventor-developers-library/copy$20screens

You have to follow the procedure exactly.    I suspect somewhere, you did not follow a step.  The way to duplicate a screen is fairly complicated.  My advice is to 
protect your 'good' aia, make a copy of the aia and use that to try again.

"I created a copy of the 3 rows of a screen that I wanted to duplicate" might be where you had a problem.  Try duplicating one screen at a time.



I solved you must edit the copy of the original file that you unzippedcreating a copy of the screen are interested then you should notrecompress those folders but drag those screen just duplicate theoriginal file farmyard that has never been neither modified nor renamedby entering the screen in the correct folder.

then be imported back into the file urinal .aia app inventor


Easy Remote Universal remote control using arduino+bluetooth+android

My new app Easy Remote , is a universal remote control using arduino+bluetooth+android 

here the app

blog for intruccion



Looks nice... congrats



thanks



Pretty informative blog you have.


integration with google maps

is it possible toget a location fix using Google Maps and then get that data backed into an AI2 app without having to ever enter anything manually.



Get coordinates for any Location on Google Maps back to App Inventor




Everything you want to know about Google Maps (well almost) is probably here:  https://developers.google.com/maps/

Is it possible to get a location fix using Google Maps?   Yes.  Type 4000 Pennsylvania Ave Washington, D.C. into your browser search  and you can get:  https://www.google.com/maps/place/4000+Pennsylvania+Ave+SE,+Washington,+DC+20020/@38.864287,-76.94721,17z/data=!3m1!4b1!4m2!3m1!1s0x89b7b910b5aa3a25:0xb3360cbac3bc6d8e          This is the latitude and longitude of that address:  38.864287,-76.94721   

The second part might be more difficult.   You should be able to capture that location data using the Web component; parse the url and you have the coordinates.

..."without having to ever enter anything manually?     well, perhaps.    Once you have the coordinates in your app, you can do anything you want to do with them, you can post them on a Google Static Map, you can post them on your own flat map, you can calculate the distance from the captured location to another location etc.

Or maybe you want to do something a little differently?   Then you need to be more explicit about what you want to do Branden.

Try some things.



Guess i dont need to use it....but i do need to be able to use all available providers to get a hood location fix quickly, say withing about 10 seconds or so.  My app currently doesnt get the fix quick at all.  How can i use all available providers?



There are several MIT tutorials that touch on the subject of mapping using Google and using the LocationSensor...  have you done the tutorials?   They are here: http://appinventor.mit.edu/explore/ai2/tutorials3818.html?&page=2 

The LocationSensor tutorial explains how to use all providers.      Be aware, the gps is the most accurate, the other options are less accurate.  The gps may take 2 to 20 seconds or more to get a satellite fix.   It takes longer to get a fix under cover (in a building, under trees, driving through a skyscraper canyon).  How long it takes to get a fix is influenced by many factors w.r.t. gps, the quality of the GPS receiver is one issue.

Be aware, to use the other settings other than gps, you must allow Google to find your location (you either deny them or accept them using the Android Settings in the device under Location. depending on the Android version, there are several options).



I have done the tutorials.  Also, found somewhere at one point in time a timer for waiting for the location to get a fix, can you point me in the direction of one?



The 'timers' all have values in milliseconds (ms).    1000 ms = 1 second.   One should never ask the gps to get a fix more frequently than about five ms ..about the speed most phones will take to get a fix under 'average conditions'.   Also, under less than ideal conditions the gps will either to fail to get a fix or take about 20 seconds or more.   I am not sure if there is a default time when the gps decides that a satellite fix failed or not.    I would never sample once more than every 10 seconds and believe once a minute is probably adequate for most apps.    If you call the gps to resample and it has not yet obtained a fix, it could go into a loop such that the sensor will never update a fix.

Not sure what you are asking about here:  "a timer for waiting for the location to get a fix," ... could you clarify?


PhoneCall / PhoneNumber Variable if Number is hidden?

i am new to AppInventor and just build a Program, that can send 
SMS to callers if the call was missed.
It is thought for Meetings. I turn off sound and let the App send 
SMS to callers to let them know i am busy at the moment.

It works fine by now, but if someone with hidden (secret) number calls
the app causes an error.

Bad arguments to PhoneNumber
The operation PhoneNumber cannot accept the arguments: *nothing*


I tested:  (see Screenshot )

If get PhoneNumber <> ""
If get PhoneNumber <> "nothing"
If get PhoneNumber <> "*nothing*"
If get PhoneNumber <> false

but nothing helps...

does anyone know what Value phoneNumber has in that case?


SMS_Abwesenheitsnotiz.apk



If   get phoneNumber =/  nothing   will work ... if get phoneNumber does not equal "nothing" ... This block construction should work if the default response for a blocked phone ID is  nothing.

Try it.   If it works for you, please let us know, if you still have issues let us know and explain what you tried.



i got it :-)

Strings wont work, tried empty String, "nothing", "*nothing*" and so on.

If  is_a_number?  get_phoneNumber
works fine.