BluetoothLeScanner: could not find callback wrapper - flutter

While developing the app I got this problem.
Some Android devices cannot find the Bluetooth connection (Not all of them)
And it shows this error.
D/BluetoothLeScanner(27109): Start Scan with callback
I/BluetoothAdapter(27109): STATE_ON
I/BluetoothAdapter(27109): STATE_ON
D/BluetoothLeScanner(27109): could not find callback wrapper
I have tried to add Fine Location permission, but there is no luck.
<uses-permission android:name="Manifest.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="Manifest.permission.ACCESS_COARSE_LOCATION" />

Related

OnReceive method of my Broadcast Receivers not working in Marshmallow

I am searching for about 5 hours for a solution to receive my custom broadcast that is sent from a service. All things were good before testing app on android 6.0.
I know that user-permissions have changed. My manifest.xml file includes:
<application>
<receiver android:name="my_receiver" />
</application>
<permission android:name="name"
android:label="my_permission"
android:protectionLevel="signature">
<uses-permission android:name="name"/>
But onReceive method is not called?
first you have to mention the action inside the receiver on which you want to call the receiver. in higher sdk version broadcast not work directly you have to register broadcast in main activity.

OpenIAB Unity consume failure for amazon store

I am testing OpenIAB to upgrade from amazon IAP v1 to v2 in Unity. I am using the latest OpenIAB unity plugin.
I am able to query and purchase an IAP but then the call to OpenIAB.consumePurchase returns a failure callback. I am testing with App Tester on amazon.
I get the error below "original json invalid" after calling OpenIAB.consumeProduct(..)
Original json is invalid:
{"itemType":"inapp","orderId":"","packageName":"","sku":"productexample","purchaseTime":0,"purchaseState":0,"developerPayload":"","token":"q1YqVrJSSi_OKynKLEhNzC4uyc9OzSvOTS3Ozc8vKMnMzzNU0lFKAaoxNDEzMzY3NzM2NjY1AoqVAsVyjD18zCMKClx9M4r83V3ySossdUtzygrzc4uC080KK_1dvHMTM8zNcrxCbYFaSpSsDGoB","originalJson":"","signature":"","appstoreName":"com.amazon.apps","receipt":”"}
I am having multiple other issues like I don't get back orderId or receiptID from queryInventorySuccess callback for the purchase that is already made. I see the valid productId but no orderId even though I see the receiptId on App Tester. What is the difference between Token, ReceiptId and OrderId?
Also what is the difference in using the below in manifest for android:name in receiver. Could there be a problem here?
<receiver android:name="com.amazon.inapp.purchasing.ResponseReceiver">
<intent-filter>
<action
android:name="com.amazon.inapp.purchasing.NOTIFY"
android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY"/>
</intent-filter>
</receiver>
compared to using
<receiver android:name="com.amazon.device.iap.ResponseReceiver">
<intent-filter>
<action
android:name="com.amazon.inapp.purchasing.NOTIFY"
android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY"/>
</intent-filter>
</receiver>
If I use the first version in android manifest, then the app just crashes on start
Just purely for the record Htcls,
Since about 2015 Unity3D now has
in-app purchase built-in, as a integrated feature of Unity.
It is incredibly easy to use, compared to any previous approach for IAP/IAB.
https://docs.unity3d.com/Manual/UnityIAP.html
https://unity3d.com/learn/tutorials/topics/analytics/integrating-unity-iap-your-game
It is completely free and completely built-in to Unity.
This has been one of the most significant changes to App industry in some years.
Previously, achieving IAP/IAB (Apple/Google) was a HUGE effort on game titles. (The Prime31 plugins were popular for this.) Often it was more of a chore than making the actual game. It can now be achieved relatively simply WITH NO PLUGINS AT ALL inside Unity.
At this point it would be extremely unusual to use any other approach for IAP/IAB. It is an incredible advance and huge time saver that it is now built-in to Unity.
Regarding
Amazon...
store coverage, follow the thread here
http://forum.unity3d.com/threads/unity-iap-store-guides-amazon-apple-google-play-windows.372647/
https://docs.google.com/document/d/1QxHRo7DdjwNIUAm0Gb4J3EW3k1vODJ8dGdZZfJwetYk
Unity staffer "nicholasr" and others are actively answering all questions on the topic.
Consider this extremely simple code base which shows how the built-in IAP/IAB works
http://forum.unity3d.com/threads/unity-iap-store-guides-amazon-apple-google-play-windows.372647/page-3#post-2565610

Installing app on 2014 model / app doesn't appear

I'm using SDK 5.1 and have tested a javascript app on the emulator. Now I'm struggling to install the app on my 2014 model.
I followed the samsung guide for 2014 models (http://www.samsungdforum.com/Guide/art00121/index.html).
I've logged in with the "develop" account, typed in the ip and clicked "start user app sync". Then I get a popup "User Apps sync requested - OK"
My problem is, that (even after several minutes) the app doesn't appear in the app-section of my tv.
I've checked my access.log of the apache and have found code 200 for the widgetlist.xml and the zip-file:
GET /widgetlist.xml?timestamp=1420139182690 HTTP/1.1' 200 307
GET /Widget/MyApp_0.100_Europe_20150101.zip HTTP/1.1' 200 460823
So, the tv should have received the files, but doesn't install the app.
Here is my widgetlist.xml:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<rsp stat='ok'>
<list>
<widget id='MyApp'>
<title>Test</title>
<compression size='460823' type='zip'/>
<description>Test</description>
<download>http://xxx.xxx.xxx.xxx/Widget/MyApp_0.100_Europe_20150101.zip</download>
</widget>
</list>
</rsp>
Here my widget.xml:
<?xml version="1.0"encoding="UTF-8"?>
<widget>
<ThumbIcon>icon/ThumbIcon.png</ThumbIcon>
<BigThumbIcon>icon/BigThumbIcon.png</BigThumbIcon>
<ListIcon>icon/ListIcon.png</ListIcon>
<BigListIcon>icon/BigListIcon.png</BigListIcon>
<category>Information</category>
<autoUpdate>n</autoUpdate>
<cpname></cpname>
<cpauthjs></cpauthjs>
<login>y</login>
<ver>0.100</ver>
<mgrver>1.000</mgrver>
<fullwidget>y</fullwidget>
<srcctl>y</srcctl>
<ticker>n</ticker>
<childlock>n</childlock>
<audiomute>n</audiomute>
<videomute>n</videomute>
<dcont>y</dcont>
<network>y</network>
<widgetname>MyApp</widgetname>
<description></description>
<width>960</width>
<height>540</height>
<author>
<name></name>
<email></email>
<link></link>
<organization></organization>
</author>
</widget>
Do you have any idea, what the problem could be? Is there any log on the tv, which could be accessed to get more information?
Thanks for your help!
Try zipping it up and putting it on the USB stick. Open SmartHub and insert the drive. You should see your app in the hub. If all goes well.
In my case, it was a problem in the index.html?!? After changing the order of the included files in the (.css before .js) it's now working.
Interesting for me, that this causes a problem during sync between web server and tv
Same thing happened to me when my completely tested app on other Samsung platforms(Samsung TV 2012,2013,2014) Failed to load on Samsung Blu-Ray player which have similar steps of loading app on TV.
After enormous test and trials i finally figured out that there was one particular jquery library jquery-latest.js which was stopping the app from being uploading to Blu-Ray player. So i re factored the app to another jquery library...and now app is working fine

Android4.0 Service kicked out

Here is my code for starting a service.
public class MyStartupIntentReceiver extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent)
{
Intent callService = new Intent();
callService.setAction("com.xxxx.yyyy.services.StartServiceActivity");
context.startService(callService);
}
}
In manifest file i'm defining broadcast receiver like following.
<receiver android:name=".MyStartupIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
Im declaring the service like following in manifest file
<service android:name=".services.CallService">
<intent-filter>
<action
android:name="com.xxxx.yyyy.services.StartServiceActivity" />
</intent-filter>
</service>
Once user launched my application im starting service from my activity
serviceIntent = new Intent(SplashScreen.this, StartServiceActivity.class);
getApplicationContext().startService(serviceIntent);
Issue is service is working fine with android2.3.5 SDK devices. but not with 4.0 devices. Anything wrong with my code. Please help me to solve.
I find a article from the Internet, hope that it can help u:
Broadcast Regression Confirmed
In a previous post, I cited evidence that the BOOT_COMPLETED broadcast will not work out of the box on Android 3.1 until the user uses your app.
It’s actually somewhat bigger than that.
In the issue that I filed seeking clarification, Ms. Hackborn indicated:
Starting with 3.1 when applications are installed they are in a “stopped” state so they will not be able to run until the user explicitly launches them. Pressing Force Stop will return them to this state.
As a result, when applications are first installed, they are totally ignored by the system until and unless the user manually launches something: clicking on a launcher activity or adding an app widget, most likely.
Developers who had been relying upon getting some sort of system broadcast without user intervention will need to adjust their apps for Android 3.1.
As I wrote in the previous post:
I expect that most apps will be OK. For example, if your boot receiver is there to establish an AlarmManager schedule, you also needed to establish that schedule when the app is first run, so the user does not have to reboot their phone just to set up your alarms. That pattern doesnot change – it’s just that if the user happens to reboot the phone, it will not set up your alarms, until the user runs one of your activities.
UPDATE: To clarify the above quote, once the user runs the app for the first time (and does not Force Stop it), everything behaves as before — a reboot will cause BOOT_COMPLETED broadcasts to be received and so on. However, if the user installs the app, until and unless they run the app manually, no broadcasts will be received. And if the user force-stops the app, until and unless they run the app manually, no broadcasts will be received.
This change is not terribly shocking, as it ratchets up the security another notch by limiting ways malware can run without user knowledge. While it does not offer perfect security — the malware can still install its own copy of an Angry Birds launcher icon and hope users screw up — it is an improvement.

How to embed audio/video on HTML page that plays on iPhone browser over GPRS

Although I don't have an iPhone to test this out, my colleague told me that embedded
media files such as the one in the snippet below, only works when the iphone is connected over the
WLAN connection or 3G, and does not work when connecting via GPRS.
<html><body>
<object data="http://joliclic.free.fr/html/object-tag/en/data/test.mp3" type="audio/mpeg">
<p>alternate text</p>
</object>
</body></html>
Is there an example URL with a media file, that will play in an iPhone browser
when the iphone connects using GPRS (not 3G)?
The iPhone YouTube application automatically downloads lower quality video when connected via EDGE than when connected via Wi-Fi, because the network is much slower. That fact leads me to believe Apple would make the design decision to not bother downloading an MP3 over EDGE. The browser has no way to know in advance if the bit rate is low enough, and chances are, it won't be. So rather than frustrate the users with a sound file that takes too long to play (and prevents thems from receiving a call while downloading), it's better to spare them the grief and encourage them to find a Wi-Fi hotspot.
Try something like this, it works on a web page. This is actually a 320kps mp3 but it is only 30 seconds long. You can use a program called LAME to convert mp3's to a bitrate you
that will work for you.
<div class="music">
<p>Pachelbel's Canon</p>
<!--[if !IE]>-->
<object id="Cannon" type="audio/mpeg" data="http://calgarydj.ca/sound%20files/Pachebels%20Cannon.mp3" width="250" height="16">
<param name="autoplay" value="false" />
<param name="src" value="http://calgarydj.ca/sound%20files/Pachebels%20Cannon.mp3" />
<!--<![endif]-->
<object id="Cannon" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="250" height="60">
<param name="autostart" value="false" />
<param name="url" value="http://calgarydj.ca/sound%20files/Pachebels%20Cannon.mp3" />
<param name="showcontrols" value="true" />
<param name="volume" value="100" />
<!--[if !IE]>--></object><!--<![endif]-->
</object>
</div><!-- end of control -->
I wasn't aware of that limitation. Although it does make sense to disable potentially data-hefty OBJECT or EMBED tags when on the cellular data service for which your provider may be charging by the byte, if that were the reason it wouldn't make sense that it would still work on 3G and only not on GPRS.
Perhaps the problem is one of basic data throughput? Not having an iPhone yourself (or myself) makes it difficult to test your colleague's statement.
Remember that GPRS is much slower than Wi-Fi or 3G. According to Wikipedia, GPRS will provide between 56 and 114 kbps of total duplex throughput, not all of which is in the download direction. You can already see that's not fast enough to instantly stream a typical 128 kbps mp3, even if you were getting the optimal throughput and getting it all as download speed.
Looking at this forum discussion as an example that came up on Google, the GPRS customers (the ones not using Telestra, which is an EDGE provider in that area) are getting around 40 kbps. So if as the question implies, you're stuck in EDGEland, NOT 3Gland or anything inbetween, it's going to take about 20 seconds of buffering to play a 30 second mp3. And when you use a behaviour-ambiguous tag like OBJECT or EMBED, there's no guarantee in how the browser will interpret it and whether it's going to try to intelligently stream the file rather than having to download the whole thing before starting it.
So, it's quite possible your colleague just didn't wait long enough to see if whatever embedded media he chose as a test started to play (assuming he wasn't using your 17KB test mp3 there). It's also possible that the iPhone does indeed have this limitation, though I'd think Google would be more forthcoming with it than my quick search uncovered, since people have been vocal enough with other things they don't like about iPhone. Another possibility would be that it's a limitation in the build of Safari that currently ships with the iPhone which might be changed in future versions or in another browser.
Ultimately though, the question is, what kind of user experience do you really want? Embedded audio on GPRS is going to take a long time to load, and users aren't going to enjoy the experience, or potentially even experience it at all if it's supposed to start playing on page visit and it doesn't load before they navigate away. It might not be a goal worth striving towards in that case.