com.samsung.android.simplehealth E/SimpleHealth: Getting step count fails - android

I'm trying to use Samsung sample SimpleHealth for retrieving data from Samsung Health app, but when I give the permission to get StepCount data, I get a weird error:
java.lang.SecurityException: com.samsung.android.simplehealth does not match with registered signature. 4A:E1:B9:8D:04\
at android.os.Parcel.createException(Parcel.java:2074)\
at android.os.Parcel.readException(Parcel.java:2042)\
at android.os.Parcel.readException(Parcel.java:1990)\
at com.samsung.android.sdk.healthdata.IDataResolver$Stub$Proxy.readData2(IDataResolver.java:588)\
at com.samsung.android.sdk.healthdata.HealthDataResolver.read(HealthDataResolver.java:576)\
at com.samsung.android.simplehealth.StepCountReporter.readTodayStepCount(StepCountReporter.java:67)\
at com.samsung.android.simplehealth.StepCountReporter.start(StepCountReporter.java:48)\
at com.samsung.android.simplehealth.MainActivity$1.onConnected(MainActivity.java:72)\
at com.samsung.android.sdk.healthdata.HealthDataStore$ErrorMessageHandler.handleMessage(HealthDataStore.java:593)\
at android.os.Handler.dispatchMessage(Handler.java:107)\
at android.os.Looper.loop(Looper.java:224)\
at android.app.ActivityThread.main(ActivityThread.java:7548)\
at java.lang.reflect.Method.invoke(Native Method)\
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)\
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Faced same error. You need to add dev access code.
Follow Prerequisites section carefully from this page https://developer.samsung.com/health/android/sample/simple-health.html

Related

No ChallengeStatusReceiver for transaction id

My React Native app is crashing when some users try to add a payment method in production. This is happening on Android only. I cannot reproduce it in debug. I'm getting this mysterious error report in Sentry and after some Googling I have no idea what this error means:
No ChallengeStatusReceiver for transaction id
d.q.a.g1.i.d: No ChallengeStatusReceiver for transaction id
at d.q.a.g1.l.s.a
at d.q.a.g1.l.q.c
at d.q.a.g1.l.q.b
at d.q.a.g1.l.y$a.onPostExecute
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
I'm using tipsi-stripe and I'm pretty sure this error is happening when calling stripe.confirmSetupIntent(). This method presents an authentication "challenge" if the user's bank requires it.
The flow I'm using now is:
user enter payment details:
const createPaymentMethodParams = {
"billingDetails":{
"name":"First Last"
},
"card":{
"cvc":"333",
"expMonth":12,
"expYear":23,
"number":"4111111111111111"
}
}
Call the backend, which creates a setup intent with confirmation_method=manual. This returns a client_secret
"Create" the payment method with createPaymentMethod, which returns payment method id.
const paymentMethodData = await
stripe.createPaymentMethod(createPaymentMethodParams)
Finally, confirm the setup intent (this is the step which sometimes crashes):
// confirm the setup intent:
// - if authentication is required user will be redirected to auth flow
// - if no authentication is required this directly returns paymentMethodId
const { status, paymentMethodId } = await stripe.confirmSetupIntent({
clientSecret: intent.client_secret, // previously obtained from backend
paymentMethodId: paymentMethodData.id,
})
The most relevant result I found on Google was this https://adyen.github.io/adyen-3ds2-android/com/adyen/threeds2/ChallengeStatusReceiver.html
It refers to a 3DS sdk (as in "3-D Secure"), which would make sense to see at this stage when the user is required to authenticate. However I'm really not sure I'm on the right track...
Has anyone encountered this issue and can help me understand it, or point me in a direction? Any help greatly appreciated!

Detect added libraries to pirated Android app?

It appears from my crash reports that some people pirate my app and add advertisements to monetise it.
The stack trace from the crash report seems to show a bunch of calls to a library to show interstitials?
Is it possible for me to add code to detect the presence of the com.test.ylh or com.qq.e library?
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy#da2c866 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1126)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:439)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
at android.app.Dialog.show(Dialog.java:473)
at com.qq.e.comm.plugin.intersitial2.e.a(A:315)
at com.qq.e.comm.plugin.intersitial2.e.show(A:113)
at com.qq.e.comm.plugin.intersitial2.e.show(A:107)
at com.qq.e.comm.plugin.intersitial2.d.show(A:35)
at com.qq.e.ads.interstitial2.UnifiedInterstitialAD.show(Unknown Source:4)
at com.test.ylh.InterAd$2.run(InterAd.java:53)
at android.app.Activity.runOnUiThread(Activity.java:6972)
at com.test.ylh.InterAd.showAd(InterAd.java:50)
at com.test.ylh.InterAd.onADReceive(InterAd.java:108)
at com.qq.e.comm.plugin.intersitial2.a$1.run(A:169)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Method.java:-2)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
You can check if a class exists with a method as described over here: How to check if class exists somewhere in package?
However, they could also remove that check when recompiling the app. So it won't be airtight. You can make it more difficult for the "pirates" by adding proper code obfuscation: https://developer.android.com/studio/build/shrink-code#obfuscate

TagManager in Android : Failed to load the container. NO default container resource found with resource ID -1

I followed every step right in setting up tag manager + firebase:
FirebaseB, GA and Tag Manager properly set up
Install necessary nugets as stated above.
Put the JSON of the tag manager container inside assets/containers
When I tested in iOS, it went smoothly, however in Android, I kept getting this error:
Invalid macro: _gtm.loadEventEnabled
I also encounter this in the device log afterwards:
Failed to load the container. NO default container resource found with resource ID -1
refresh test, containerHolder: com.google.android.gms.tagmanager.dc#XXXXXXX
Steps to Reproduce:
1) Create a Xamarin Forms app.
2) In the Android project, install the necessary nuget packages.
3) Enable firebase and call _firebaseAnalytics.SetAnalyticsCollectionEnabled(true);.
4) Log some events
5) Create a GA and google tag manager account. Create a container (Android), then download the JSON file. Put the JSON file inside Assets/containers folder.
6) Run the application while Device logcat is running (you can check error here)
These are the packages that I used:
PackageReference Include="Xamarin.GooglePlayServices.Analytics" Version="71.1608.1"
PackageReference Include="Xamarin.GooglePlayServices.Base" Version="71.1610.1
PackageReference Include="Xamarin.GooglePlayServices.TagManager" Version="71.1604.1
PackageReference Include="Xamarin.Firebase.Analytics" Version="71.1630.1
PackageReference Include="Xamarin.Firebase.Messaging" Version="71.1740.1
Has anyone encountered this and knows how to fix this?
Welcome to SO !
Using Tag Manager in Xamarin Android , after installing Nuget Package for solution . There are follow steps for reference :
1, Create a Google Analytics account, please make sure you select a mobile account (Under New Property - you'll have to select mobile/Web).
2,Create a Google Tag Manager account - create a container, then create a tag of type Google Analytics - universal analytics. a) Put your analytics account id in the Tracking ID (should be in the form "UA-XXXXXX-X"). b) Create a macro for screen name (you can view in the screenshots 'TagManagerMacro.jpeg') c) The Rule Track Type should be App View. d) In the more settings --> basic configuration --> screen name - add the macro we defined in step b. e) In Firing rules - make sure your rule is set for always.
In your Activity, call to
var tagmanager = TagManagerClass.GetInstance(this);
var pendingResult = _tagmanager.LoadContainerPreferNonDefault("GTM-XXXXXX",
Resource.Raw.gtm_analytics);
pendingResult.SetResultCallback(new TagMnagerResultCallback(), 2, TimeUnit.Seconds);
After the callback as returned, you can fire events like this:
_tagmanager.DataLayer.PushEvent("openScreen", DataLayer.MapOf("screenName", "testScreen"));
This guide was followed by the guidelines instructed here.

Using ACRA with tracepot as backend

I have just finished my first android app as part of a school project ..one of my friends encountered a problem while trying to explore one of the activities in the app ..so i searched for solutions to get the crashes reports whenever they happen to fix the bugs ..i came across ACRA ..and I followed one of SO threads to setup ACRA to my app ..
RESULT: when the crashs happens the gmail app get launch in the device and the user (if he want to) he'll send the crash report by email ..Consedering not all users will want to ..i found in a comment in one of the SO threads that some developers use tracepot.
so i have used their link for integration in formUri but exploring my account on tracepot i get nothing ..is there something i am doing wrong (or if there is a better solution than using tracepot a backend , please suggest/explain or link a good tutorial, thanks!)
MyApplication.Java ( AFTER EDITING
#ReportsCrashes(
formUri = "https://collector.tracepot.com/79b1***",
reportType = org.acra.sender.HttpSender.Type.JSON,
httpMethod = org.acra.sender.HttpSender.Method.PUT,
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text
)
public class MyApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
CaocConfig.Builder.create()
//.errorActivity(CustomErrorActivity.class) //default: null (default error activity)
.apply();
// The following line triggers the initialization of ACRA
ACRA.init(this);
}
}
EDIT :
msg in logcat if i use the http and email:
09-17 18:37:33.700 14329-14812/ma.ac.iav.menunaviagtion:acra W/ACRA: ma.ac.iav.menunaviagtion reports will be sent by email (if accepted by user).
09-17 18:37:33.703 14329-14812/ma.ac.iav.menunaviagtion:acra I/ACRA: Sending report /data/user/0/ma.ac.iav.menunaviagtion/app_ACRA-approved/2018-09-17T18:37:33.441+01:00-IS_SILENT.stacktrace
if i use only the http :
09-17 22:47:00.648 20116-20137/ma.ac.iav.myapplication:acra E/ACRA: Failed to send crash report for /data/user/0/ma.ac.iav.myapplication/app_ACRA-approved/2018-09-17T22:44:52.199+00:00-IS_SILENT.stacktrace
IMPLEMENTATION:
compile 'ch.acra:acra:4.9.2'
LOGCAT FOR F43nd1r
09-18 01:39:49.631 18508-18803/? E/AndroidRuntime: FATAL EXCEPTION: Thread-5
Process: ma.ac.iav.myapplication, PID: 18508
java.lang.InternalError: Thread starting during runtime shutdown
at java.lang.Thread.nativeCreate(Native Method)
at java.lang.Thread.start(Thread.java:733)
at android.app.SharedPreferencesImpl.startLoadFromDisk(SharedPreferencesImpl.java:119)
at android.app.SharedPreferencesImpl.<init>(SharedPreferencesImpl.java:112)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:392)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:373)
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
at cat.ereza.customactivityoncrash.CustomActivityOnCrash.getLastCrashTimestamp(CustomActivityOnCrash.java:673)
at cat.ereza.customactivityoncrash.CustomActivityOnCrash.hasCrashedInTheLastSeconds(CustomActivityOnCrash.java:683)
at cat.ereza.customactivityoncrash.CustomActivityOnCrash.access$200(CustomActivityOnCrash.java:52)
at cat.ereza.customactivityoncrash.CustomActivityOnCrash$1.uncaughtException(CustomActivityOnCrash.java:112)
at org.acra.builder.ReportExecutor.endApplication(ReportExecutor.java:269)
at org.acra.builder.ReportExecutor.dialogAndEnd(ReportExecutor.java:254)
at org.acra.builder.ReportExecutor.access$400(ReportExecutor.java:42)
at org.acra.builder.ReportExecutor$2.run(ReportExecutor.java:217)
By default, if the mail config is present, Acra 4 will send via mail and nothing else.
To use both you'd have to configure the reportSenderFactories.
400: Client error
Indicates that tracepot rejected your report. This could have multiple reasons. To find out what the problem is, call ACRA.DEV_LOGGING = true; right before ACRA.init and post all logcat with the ACRA tag.
Also note that ACRA 4.9.2 does not support android Oreo and above, it is recommended to upgrade to at least ACRA 4.11, or just the newest version 5.2.0.
You are not sending all required fields to Tracepot.
https://tracepot.uservoice.com/knowledgebase/articles/355272-what-are-the-required-fields-acra-needs-to-send
ANDROID_VERSION
APP_VERSION_CODE
APP_VERSION_NAME
PACKAGE_NAME
REPORT_ID
STACK_TRACE
USER_APP_START_DATE
USER_CRASH_DATE

Google Places api for android network error

I'm using the google places autocomplete fragment to search for places. It has been working for a few weeks now and all of a sudden today, I'm getting the following error:
E/AsyncOperation: serviceID=65, operation=AddPlace
OperationException[Status{statusCode=NETWORK_ERROR, resolution=null}]
at amsa.b(:com.google.android.gms:266)
at amro.a(:com.google.android.gms:60)
at lin.run(:com.google.android.gms:111)
at llt.run(:com.google.android.gms:450)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at lqc.run(:com.google.android.gms:17)
at java.lang.Thread.run(Thread.java:761)
I've tried setting the filter to null as the posted solution here.
My manifest has the following meta-data :
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="Axxxxxxxxxxxxxxxxxxxxxxxxx8"/>
I'm calling the fragment with the following code:Intent intent =
new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)
.setFilter(null)
.build(MainActivity.this);
startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);
I would like to point out that this code has been working for a few weeks without any problems, and I haven't made any changes to it.
Everything is working again over here, hope you guys can say the same. Looks like it was a problem at google
Seeing errors as well. Looks like Google Places API might be having an outage.
GooglePlacesSDK Returning Error 500

Categories

Resources