I am first mobile application developing on Smartface App Studio. I have tho question.
1- I see this error: Access violation at address 00000000. Read of address 00000000 when add second Dataset. And does not run application on emulator or usb real phone until delete Dataset.
2- I read Local.Notifications guide but could not run notifications on phone screen. I saved dates to table but can not make them as reminder. Which page should i add the function block and how should i do this.
Thanks.
It seems a problem is occured when adding a Dataset. Did you try with a second project ? It seems working with the latest version of Smartface App Studio which downloadable via Account page.
Local Notifications are not added to the calendar/reminder. These are app specific notifications.
First off all, you should create a local notification.
For example;
var localNotification = new Notifications.LocalNotification({
id : id,
fireDate : new Date(),
alertTitle : "AlertTitle",
alertBody : "Alert Body",
smallIcon : "icon_notification_small.png",
launchImage : "icon_notification.png",
sound : "notifsound.mp3",
repeatInterval : Notifications.CalendarUnit.minute,
onReceivedNotification : function (e) {
alert("onReceived");
}
});
It creates a notification for you and it works at given date.
If you want to immaediately show the notification , you should run that code below;
Notifications.local.presentNotification(localNotification);
Related
We are adding push notifications to an Android app using Parse backend.
It has standard initialisation code like this:
Parse.initialize(Parse.Configuration.Builder(this)
.applicationId("...")
.clientKey("...")
.server("...")
.build()
)
val installation = ParseInstallation.getCurrentInstallation()
installation.put("GCMSenderId", "...")
installation.saveInBackground()
When this changes go to production, we started seeing random "Object not found" error in the backend like this:
app/web.1 verbose: REQUEST for [GET]
/parse/classes/_Installation/null: {} method=GET,
url=/parse/classes/_Installation/null, host=..., connection=close,
x-parse-application-id=..., x-parse-app-build-version=...,
x-parse-app-display-version=..., x-parse-os-version=11,
user-agent=Parse Android SDK API Level 30,
x-parse-installation-id=..., x-parse-client-key=...,
accept-encoding=gzip, x-request-id=..., x-forwarded-for=...,
x-forwarded-proto=https, x-forwarded-port=443, via=1.1 vegur,
connect-time=0, x-request-start=1676010960572, total-route-time=0,
app/web.1 error: Object not found. message=Object not found.,
stack=Error: Object not found. at
/app/node_modules/parse-server/lib/Routers/ClassesRouter.js:70:15
This error appears to happen only on a small group of users. For all our test devices, push notifications work correctly.
It is unclear if these particular users will have problem in receiving push notifications eventually.
Why is Android app getting _Installation/null?
I'm trying to get deferred deep links working on Android. I added a test device in the dashboard & reset the device data and made sure the app is uninstalled. When I click a branch.io link, it takes me to the play store as expected. I then launch the app from Android Studio onto the phone, then the logs say that Branch SDK sent a request to https://api2.branch.io/v1/install, but the problem is the response doesn't contain the original link, query params, or key value pairs I set in the dashboard. This is the JSONObject I'm receiving in onInitFinished:
{"+match_guaranteed":true,"link_click_id":"976953359423305632","+clicked_branch_link":true,"+click_timestamp":1634196720,"+is_first_session":true,"utm_source":"test-referrer"}
Where is all the other information? This doesn't include the original link, the key-value pairs, tags, etc.
For a comparison, this is what I receive in the iOS app:
["$ios_passive_deepview": "branch_passive_default", "source": "test-referrer", "+is_first_session": 1, "~channel": test-referrer, "$matching_ttl_s": 7200, "~id": 976763609660742721, "~creation_source": 1, "$one_time_use": 0, "~marketing": 1, "~referring_link": "https://myapp.test-app.link/test-referrer", "~feature": "test", "+click_timestamp": 1634249299, "+match_guaranteed": 0, "$og_description": "My app description", "$og_title": "MyApp", "+clicked_branch_link": 1, "$marketing_title": "Test Referral Link", "~tags": ["test-referrer"], "~campaign": "test"]
If I rotate the phone to recreate the Activity or reopen the app a single time, it then sends a request to https://api2.branch.io/v1/open and returns all the info I expected initially. How do I get the information after installing the app?
I'm currently testing with myapp.test-app.link, and I call Branch.enableTestMode() before Branch.getAutoInstance(this) in my custom Application class's onCreate(). I also tried with a live link and got the same result.
These are the libraries I'm using in build.grade:
implementation 'io.branch.sdk.android:library:5.0.13'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
implementation 'androidx.browser:browser:1.3.0'
I've also set up app links and the uri scheme in the dashboard as well as in the app. Using getFirstReferringParams() and getLatestReferringParams() on the first session after installing doesn't help either.
UPDATE:
Repeating the exact same testing process I described above, now the JSONObject that gets passed into onInitFinished has even less information and is claiming that I'm not clicking a branch link:
{"+clicked_branch_link":false,"+is_first_session":true}
And getFirstReferringParams() returns an empty json object.
I'm about to start looking for an alternative at this rate.
I fixed this issue by adding intent.putExtra("branch_force_new_session", true); right after this.activity.setIntent(intent); when initialising the intent. Something like this:
...
this.activity.setIntent(intent);
intent.putExtra("branch_force_new_session", true);
Branch
.sessionBuilder(this.activity)
.withCallback(branchReferralInitListener)
.reInit();
...
Look here for the branch_force_new_session reference.
The other reason for the missing data is the non-existent link alias, but it looks like it is not the case as soon as you tried with the same link in iOS.
I'm having trouble using a custom sound for react-native-onesignal push notifications. I have used the exact same sound file for an old ionic app without problems but I can't get it working in react-native.
https://documentation.onesignal.com/docs/customize-notification-sounds
Paths I've added the file to:
project/android/app/src/main/res/raw/bells.mp3
project/android/res/raw/bells.mp3
project/res/raw/bells.mp3
I have also tried adding a file named onesignal_default_sound.mp3 to replace default sound like the docs say but it has no effect.
let otherParams = {
"android_sound": "bells", // I have tried bells.mp3 also
"priority": 10,
...customOtherParams
}
OneSignal.postNotification(content, data, playerId, otherParams)
Notifications still play default android sound
I'm working on Ionic mobile app development.
My requirement is to create client side logger to track issues in app. I used the methods mentioned in https://github.com/pbakondy/filelogger, and I could able to create the log file in both Android and iOS.
For the first time when I open the app, it creates the log file in cordova.file.dataDirectory, when I close and reopen the app in i*OS, I'm trying to read the content of the file which was created using the below
$fileLogger.getLogfile().then(function (loggerContent) {
var temp =loggerContent;
});
But the application says
{
"applicationDirectory":null,
"applicationStorageDirectory":null,
"dataDirectory":null,
"cacheDirectory":null,
"externalApplicationStorageDirectory":null,
"externalDataDirectory":null,
"externalCacheDirectory":null,
"externalRootDirectory":null,
"tempDirectory":null,
"syncedDataDirectory":null,
"documentsDirectory":null,
"sharedDirectory":null
}
So I couldn't able to find the file where i saved my logs.
Please help me resolve this issue or if you could recommend me a different method to get around this issue, that would be great!
Thanks for the answers
There is a check list here and should solve your problem :
1-Be sure that the cordova-file-plugin is installed and works in your test environment.
2-Be sure that the cordova.js file is refrenced by your html and before your code usage.
3-Be sure to call your codes after device_ready state :
check this
4-Call your function after a short delay (use setTimeOut in Javascirpt)
Ali's item 4 is very important:
I had a similiar problem on different platforms: cordova.file.dataDirectory was null.
I tracked cordova.file.dataDirectory over the lifecycle and it was first accessed by my Ionic 2 code BEFORE the device ready event was fired.
My "mistake": I wanted to load data during the constructor(!) of a service. Seems too early.
I need to know what the activities available of a given application are in Android.
I know you can do this: List of all activities in App but I was wondering if there is a simpler way an also I DONT WANT TO INSTALL THE APP TO SEE AVAILABLE ACTIVITIES
Let's say I want to open Google PlayStore using startapp plugin: https://github.com/lampaa/org.apache.cordova.startapp to download a specific app, then I need to know what activity to use right ?
navigator.startApp.start([
"com.example.hello", // applucation
"com.example.hello.MainActivity", // activity
"product_id", // key
"100" // value
], function(message) { /* success */
console.log(message); // => OK
},
function(error) { /* error */
console.log('47', error);
});
By the way I'm using Cordova and Sencha Touch (if that matters).
Any help appreciated :)
They are actually listed on AndroidManifest.xml
And there are a couple of apps that can help you getting the file of installed apps.
https://play.google.com/store/apps/details?id=jp.susatthi.ManifestViewer&hl=en