MIT App Inventor 2: May I / How to place alarms in the Android notification area?

浪子不回头ぞ 提交于 2020-01-16 04:45:13

问题


With MIT Inventor 2, may I create a Notification Area Notification caused by an Alarm, which is placed in the notification area of an Android smartphone? So that I may create a silent alarm, as standard with Android apps? And if so, how to do it?

See Requirement #5 in this document ( describing an Android programmming task, which is not intended to be implemented with a code generator, of course ) My research:

  1. With the discontinued MIT Inventor 1, it was obviously possible to create notifications, which can be viewed by pulling down the status bar. See "AlertMe: Texting in the background, when app is not running". http://appinventor.mit.edu/explore/content/alertme.html I didn´t find a corresponding tutorial for MIT Inventor 2...

  2. With MIT Inventor 2, you may create Notifications, which are displayed immediately by modale windows, or which are pushed to Android logfiles, invisible to ordinary Android smartphone users. I didn´t find any option to create a "silent alarm" visible just in the notification area. Am I right?!

So is this maybe a "lost feature" of version1, not available with version2, so one of the very-raw drawbacks?

As there are now frameworks based on MIT Inventor like Punya and Ai2LiveComplete, does any of it cover this "silent messaging"?


回答1:


Currently there the following alternatives:

  1. The Texting component can display a notification also in App Inventor 2, see also the documentation. This feature however is available only in the United States.
  2. The Punya Framework offers a Google Cloud Messaging component, see also here. See also the Overview: Different App Inventor distributions.

    If you use another server, you always have to think about
    a) is it a reliable service?
    b) will it be updated (bug fixes and new features)?
    because once you create a project using another server, which uses other blocks, you will not be able to import your project back into MIT App Inventor anymore!

  3. I also can offer a simple Notification Extension to send a notification. As you know, App Inventor apps have some restrictions. Which means for the Notification extension: the app must be still running (at least in the background) to be able to send a notification after n seconds.

    The App Inventor Extensions are currently in testing. See the announcement for more information about how to use an App Inventor Extension.



来源:https://stackoverflow.com/questions/36965603/mit-app-inventor-2-may-i-how-to-place-alarms-in-the-android-notification-area

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!