Your post was successfully created

KNOWLEDGE BASE

Community.

Share and learn. Create something amazing with
the collaboration of our great community.

#177 Hype on Android uses an implicit broadcast receiver banned since API 26

Hey, I was playing a bit with Hype over Christmas (not yet certain whether I want to use it in a product, still testing it for fun at this point). I noticed that Hype on Android registers an implicit (i.e. registered via manifest) broadcast receiver for the `android.bluetooth.adapter.action.STATE_CHANGED` action. I see this in the logs: ``` 2018-12-27 14:07:09.957 298-313/system_process W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.bluetooth.adapter.action.STATE_CHANGED flg=0x4000010 (has extras) } to me.komorowski.circabeamer/com.hypelabs.hype.drivers.BluetoothCommons.BluetoothStateListenerImpl ``` This is banned since Android API 26 released in August 2017 (obligatory on Google Play for new apps since August 1, 2018 and for existing apps since November 1, 2018 -- basically a hard requirement at this point). See https://developer.android.com/about/versions/oreo/background#broadcasts for more info. Is this broadcast receiver an essential part of the SDK? Can you replace it with a runtime call to `Context.registerReceiver()` to fix the problem? Best, Konrad PS: Merry Christmas and all the best in the new year! PPS: Congrats on the 2.0.50 release -- anecdotally it's more stable than the previous one!

Konrad Komorowski . Dec. 27, 2018, 8:03 a.m.

0

#176 Cant add credit card for billing

Hello, while trying to move our application into production mode and setting up the authentication server we can not add a credit card to our project. All the information is filled in correctly but when clicking on "add card" there comes a progress dialog and then shows the credit card page again. Any suggestions? Kind regards

Kolja Kaufmann . Dec. 9, 2018, 7:16 a.m.

closed

1

#175 PubSub Android project- facing problem in communication.

hello there, I am using three phones for this application. two of them having API-26, and One having API-25. The problem is whatever I am publishing, it is only notified in only one mobile having API-25, and other two having API-26 does not get any notification. I don't know what I am doing wrong in this. whether I am doing something wrong???? because it works completely fine in One android phone having API-25, need your suggestions...Thanks

Diwakar Deep . Nov. 10, 2018, 10:13 a.m.

2

#174 pubsub Android project- error after compiling in my phone

hello, the above project compiled and installed in my samsung galaxy-A5, but facing some problems in running in other android phones having the same API-26, I am having few problems when I click any of the given options. ERRORS- Hype SDK could not be started. Suggestion: Please check your internet connection. Description: The HTTP request to the Hype server failed or Adapter is off check this links-- https://ibb.co/dA64Cq https://ibb.co/da59dV I have tried enabling/disabling wifi, hotspot, bluetooth etc to fix this error still not able to solve this. Thanks.

Diwakar Deep . Nov. 10, 2018, 7:22 a.m.

closed

1

#173 Pubsub Android project - Devices not talking with each other

Hello there, newbie question perhaps. I downloaded the "Pubsub Android project" from github, updated the app keys etc., and deployed it on a Google Nexus 6 and a Samsung Tablet SM-T237P. The apps installed fine and can subscribe to the channel. However, when I publish an update, it only shows up on the device from which I have published it. The services show up in each device's subscription. [Link](https://ibb.co/gjf9sq) For some reason, the two devices are not connecting. I have enabled/disabled wi-fi, tried airplane mode etc. Is there something really simple that I am missing? Also, are there any settings that I need to turn on for this. The two devices can see each other when I go to the Bluetooth settings. Thanks

Saurabh G . Nov. 8, 2018, 7:56 p.m.

0

#172 Error building the GIT Sample Project for Android

Hello there, I just downloaded the Pubsub Android project, added the Hype SDK and updated the app keys. However, my Android studio is not compiling it. ![Here is the error I am getting](https://ibb.co/jL2MNq "enter image title here") [Link](https://ibb.co/jL2MNq)

Saurabh G . Nov. 8, 2018, 1:05 p.m.

closed

3

#171 Android API 26+ startup crash: `java.lang.IllegalStateException: Not allowed to start service Intent`

A very simple Android phone app is frequently failing to start with this exception: ``` 2018-10-24 21:16:51.713 3178-3178/me.komorowski.simpleuiapp E/AndroidRuntime: FATAL EXCEPTION: main Process: me.komorowski.simpleuiapp, PID: 3178 java.lang.RuntimeException: Unable to create application me.komorowski.simpleuiapp.MainApplication: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=me.komorowski.simpleuiapp/com.hypelabs.hype.HypeService }: app is in background uid UidRecord{eec5c47 u0a86 SVC idle change:uncached procs:1 seq(0,0,0)} at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5876) at android.app.ActivityThread.access$1100(ActivityThread.java:199) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=me.komorowski.simpleuiapp/com.hypelabs.hype.HypeService }: app is in background uid UidRecord{eec5c47 u0a86 SVC idle change:uncached procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577) at android.app.ContextImpl.startService(ContextImpl.java:1532) at android.content.ContextWrapper.startService(ContextWrapper.java:664) at com.hypelabs.hype.au.a(Unknown Source:17) at com.hypelabs.hype.ae.d(Unknown Source:31) at com.hypelabs.hype.Hype.start(Unknown Source:7) at me.komorowski.simpleuiapp.MainApplication.startHype(MainApplication.kt:76) at me.komorowski.simpleuiapp.MainApplication.onCreate(MainApplication.kt:13) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871) at android.app.ActivityThread.access$1100(ActivityThread.java:199)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:6669)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858 ``` Details of the API I'm targeting (this is important I think!): ``` compileSdkVersion 28 minSdkVersion 21 targetSdkVersion 28 ``` And here is the source code of the application: [https://pastebin.com/FS1aZzN0](https://pastebin.com/FS1aZzN0) It seems seems to be an API 26+ issue, according to this [Stack Overflow question](https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten). 1. Are you familiar with the problem? 2. Are there any accepted workarounds? Is the [BaseApplication](https://github.com/Hype-Labs/HypeChatDemo.android/blob/e4b51b1a2cf5d3780dfb39a67fc4302c829270bf/app/src/main/java/com/hypelabs/hypechatdemo/BaseApplication.java) class one of them? 3. Is there any timeline for when there will be no workarounds needed? Thanks! Konrad PS: I hope that I'm not posting too much - let me know if these reports are useful to you, and what's the best way to see what are the currently open SDK issues so that I don't post duplicates.

Konrad Komorowski . Oct. 24, 2018, 3:44 p.m.

0