Answer the question
In order to leave comments, you need to log in
How to use plugins for cordova in vue templates?
A tax question in a dead off community.
Integrating cordova plugins for Vue and Nuxt?
Answer the question
In order to leave comments, you need to log in
it took really a lot of time, 15-20 hours, few examples, the docks are bare, and the debug of the application is generally tin, made a build, fell off, sit and explain why.
<template>
<div>
<h1 v-text="this.title"></h1>
<hr>
<h1 v-text="this.steps"></h1>
<hr>
<small>
Above should be number
</small>
</div>
</template>
<script>
import Vue from 'vue';
import {mapActions, mapGetters} from 'vuex';
import {SESSION} from '../store/modulesNames';
export default {
layout: 'default',
data: () => (
{
title: 'Steps:',
test: 0,
}
),
computed: {
...mapGetters(
SESSION,
{
steps: `getSteps`,
}
),
},
methods: {
...mapActions(
SESSION,
{
updateSteps: `updateSteps`,
}
),
error (err) {
alert(`Something went wrong, please contact support`);
alert(JSON.stringify(err));
},
startWatch () {
const offset = 0;
const options = {
pedometerIsCountingText: 'SGX counts your steps',
pedometerStepsToGoFormatText: '~%s steps to finish',
pedometerYourProgressFormatText: '~%s progress',
pedometerGoalReachedFormatText: '%s congrats finish!',
};
const goal = 1000;
window.stepper.setGoal(goal, ()=>{}, this.error);
window.stepper.startStepperUpdates(
offset,
this.updateStepsSuccess,
this.error,
options
);
},
updateStepsSuccess (result) {
const {steps_today, total, average} = result;
// alert(JSON.stringify(result));
this.updateSteps({steps: steps_today});
},
},
mounted () {
document.addEventListener('deviceready', () => {
alert('Device ready event fired!');
this.startWatch();
});
},
}
</script>
<style lang="scss" scoped>
</style>
Give an example of code, in any case, the addmob could be integrated normally
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question